<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi<div>I am trying to get LD scores from slice, I am using the tutorial script from ensembl</div><div><a href="http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html#ld">http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html#ld</a></div><div><br></div><div>I retrieve data with 79, not with 80</div><div>any idea of why?</div><div>thanks</div><div>Nathalie</div><div><br></div><div><div>#!/usr/local/bin/perl</div><div>use strict;</div><div>use warnings;</div><div>use Bio::EnsEMBL::Registry;</div><div><br></div><div>my $registry = 'Bio::EnsEMBL::Registry';</div><div><br></div><div>$registry->load_registry_from_db(</div><div>    -host=>"<a href="http://ensembldb.ensembl.org">ensembldb.ensembl.org</a>", -user=>"anonymous",</div><div>    -port=>'5306', 'db_version' => 80,);</div><div>my $chr = 6;  #defining the region in chromosome 6</div><div>my $start = 25_834_000;</div><div>my $end = 25_854_000;</div><div><br></div><div><br></div><div>my $population_name = 'CSHL-HAPMAP:HapMap-CEU'; #we only want LD in this population</div><div>#my $population_name ='1000GENOMES:phase_3:CEU'; # I also tried with this population</div><div><br></div><div>my $slice_adaptor = $registry->get_adaptor('human', 'core', 'slice'); #get adaptor for Slice object</div><div>my $slice = $slice_adaptor->fetch_by_region('chromosome',$chr,$start,$end); #get slice of the region</div><div><br></div><div>my $population_adaptor = $registry->get_adaptor('human', 'variation', 'population'); #get adaptor for Population object</div><div>my $population = $population_adaptor->fetch_by_name($population_name); #get population object from database</div><div><br></div><div>my $ldFeatureContainerAdaptor = $registry->get_adaptor('human', 'variation', 'ldfeaturecontainer'); #get adaptor for LDFeatureContainer object</div><div>my $ldFeatureContainer = $ldFeatureContainerAdaptor->fetch_by_Slice($slice,$population); #retrieve all LD values in the region</div><div><br></div><div><br></div><div>foreach my $r_square (@{$ldFeatureContainer->get_all_r_square_values}){</div><div>  if ($r_square->{r2} > 0.8){ #only print high LD, where high is defined as r2 > 0.8</div><div>    print "High LD between variations ", $r_square->{variation1}->variation_name,"-", $r_square->{variation2}->variation_name, "\n";</div><div>  }</div><div>}</div></div></body></html>