<div dir="ltr">Hi Nathalie,<div><br></div><div>It seems we have an issue with the HapMap genotypes in our release/80 database.</div><div><br></div><div>For 1000 genomes phase 3 data, this is available though it requires a couple of extra steps to retrieve genotypes and LD data.</div><div><br></div><div>1) Install the tabix utility and Perl module</div><div><br></div><div>cd [somewhere/to/install/software]</div><div>git clone git@github.com:samtools/tabix.git</div><div>cd samtools</div><div>make</div><div>cd perl</div><div>perl Makefile.PL PREFIX=/somewhere/in/your/PERL5LIB</div><div>make && make install</div><div><br></div><div>2) Install the ensembl-io module</div><div><br></div><div>cd [path/where/ensembl/is]</div><div>git clone git@github.com:Ensembl/ensembl-io.git</div><div>[add ensembl-io/modules to your PERL5LIB]</div><div><br></div><div>You can then add the following line to your code before you retrieve the LDFeatureContainer:</div><div><br></div><div><span style="font-size:12.8000001907349px">$ldFeatureContainerAdaptor->db->use_vcf(1);</span><br></div><div><br></div><div>Apologies, this is currently missing from our formal documentation. We will get this fixed soon.</div><div><br></div><div>Regards</div><div><br></div><div>Will McLaren</div><div>Ensembl Variation</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 June 2015 at 15:53, Nathalie Conte <span dir="ltr"><<a href="mailto:nconte@ebi.ac.uk" target="_blank">nconte@ebi.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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" target="_blank">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" target="_blank">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></div><br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" rel="noreferrer" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>