<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello, <div><br></div><div>I am trying to work my head around LD. As you might see from my questions it is all quite new to me.</div><div><br></div><div>I have the following snp : <span style="background-color: rgb(255, 255, 255);">rs11010067</span></div><div><span style="background-color: rgb(255, 255, 255);">and I am trying to get the r2 value using the script I’ve copied past below.</span></div><div><span style="background-color: rgb(255, 255, 255);"><br></span></div><div><span style="background-color: rgb(255, 255, 255);">If I enter as population : Europe </span></div><div><span style="background-color: rgb(255, 255, 255);">then I don’t get anything back. </span></div><div><span style="background-color: rgb(255, 255, 255);"><br></span></div><div><span style="background-color: rgb(255, 255, 255);">If I enter as population : </span><span style="background-color: rgb(255, 255, 255);">CSHL-HAPMAP:HapMap-CEU</span></div><div><div>Then I get back a list of variation1, variation2 and r2. </div></div><div><br></div><div>I don’t understand why I don’t get anything with Europe. </div><div>Could somebody explain that to me or point me to some documentation about LD I could read. </div><div><br></div><div>I would want to use r2 to determine if a snp I have is in the same LD Block then the gene I’m supposing it is linked to using a threshold for r2 (which I haven’t determine yet, I’ve just started working on that). The problem is that the indication I have as population for this snp in my data (Gwas catalog) is Europe which doesn’t return anything. </div><div><br></div><div>Thanks for your help,</div><div>Catherine</div><div><br></div><div><br></div><div><br></div><div><br></div><div><pre style="background-color: rgb(255, 255, 255);"><font face="Helvetica">use strict;<br>use warnings;<br>use Bio::EnsEMBL::Registry;<br><br><br>my $registry = 'Bio::EnsEMBL::Registry';<br><br>$registry->load_registry_from_db(<br>-host   => '<a href="http://ensembldb.ensembl.org">ensembldb.ensembl.org</a>',<br>-user   => 'anonymous',<br>);<br><br>my $rs_id = "rs11010067";<br><br>my $variation_adaptor = $registry->get_adaptor( 'human', 'variation', 'variation' );<br>my $variation = $variation_adaptor->fetch_by_name($rs_id);<br><br>my $population_adaptor = $registry->get_adaptor('human', 'variation', 'population'); <span style="font-style: italic;">#get adaptor for Population object<br></span>my $population = $population_adaptor->fetch_by_name("CSHL-HAPMAP:HapMap-CEU");<br><span style="font-style: italic;">#my $population = $population_adaptor->fetch_by_name("Europe");<br></span><span style="font-style: italic;"><br></span>foreach my $variation_feature (@{$variation->get_all_VariationFeatures()}) {<br>    print $variation_feature->seq_region_name(),':', $variation_feature->seq_region_start(), '-', $variation_feature->seq_region_end(),"\n";<br><br>    my $ldFeatureContainerAdaptor = $registry->get_adaptor('human', 'variation', 'ldfeaturecontainer'); <span style="font-style: italic;">#get adaptor for LDFeatureContainer object<br></span><span style="font-style: italic;">    </span>my $ldFeatureContainer = $ldFeatureContainerAdaptor->fetch_by_VariationFeature($variation_feature, $population);<br><br>    my $r_square_values = $ldFeatureContainer->get_all_r_square_values();<br>    foreach my $r_square_value (@{$r_square_values}){<br><br>        my $variation_feature_1 = $r_square_value->{variation1};<br>        my $variation1_name = $variation_feature_1->name();<br>        <span style="font-style: italic;">#$variation1<br></span><span style="font-style: italic;">        </span>my $variation_feature_2 = $r_square_value->{variation2};<br>        my $variation2_name = $variation_feature_2->name();<br><br>        my $r2 = $r_square_value->{r2};<br><br>        print "variation1 = " , $variation1_name, "variation1_region_name = ", $variation1_name, " \n";<br>        print "variation2 = " , $variation2_name, "variation2_region_name = ", $variation2_name, " \n";<br>        print "r2 = " , $r2 , "\n\n";<br><br>    }<br>}<br><br></font></pre><div><br></div></div><div><br></div><div><br></div></body></html>