<div dir="ltr">That method only retrieves values that have been calculated already.<div><br></div><div>When you fetch an LDFeatureContainer from the adaptor, the LD values are precalculated for the relevant Slice or VariationFeature; all the methods on the LDFeatureContainer apply only to retrieving these results.</div><div><br></div><div>Will</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 October 2014 15:09, Genomeo Dev <span dir="ltr"><<a href="mailto:genomeodev@gmail.com" target="_blank">genomeodev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Will. I have actually just found this, it may actually do exactly that pairwise calculation:<div><br></div><div><div style="font-size:11.8181819915771px;font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;color:rgb(37,53,85);border-top-width:1px;border-top-style:solid;border-top-color:rgb(168,184,217);border-left-width:1px;border-left-style:solid;border-left-color:rgb(168,184,217);border-right-width:1px;border-right-style:solid;border-right-color:rgb(168,184,217);padding:6px 0px;font-weight:bold;border-top-right-radius:8px;border-top-left-radius:8px;background-image:url(http://static.ensembl.org/info/docs/Doxygen/compara-api/nav_f.png);background-color:rgb(226,232,242);background-repeat:repeat-x"><table style="color:black;white-space:nowrap;margin-left:6px"><tbody><tr style="vertical-align:top"><td style="font-size:1em;border:0px;color:rgb(51,51,51);margin-left:6px">public Float Bio::EnsEMBL::Variation::LDFeatureContainer::get_r_square</td><td style="font-size:1em;border:0px;color:rgb(51,51,51)">(</td><td style="font-size:1em;border:0px;color:rgb(96,32,32)"></td><td style="font-size:1em;border:0px;color:rgb(51,51,51)">)</td><td style="font-size:1em;border:0px;color:rgb(51,51,51)"></td></tr></tbody></table></div><div style="font-size:11.8181819915771px;font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;color:rgb(0,0,0);border-width:0px 1px 1px;border-bottom-style:solid;border-bottom-color:rgb(168,184,217);border-left-style:solid;border-left-color:rgb(168,184,217);border-right-style:solid;border-right-color:rgb(168,184,217);padding:2px 5px;border-bottom-left-radius:8px;border-bottom-right-radius:8px;background-color:rgb(251,252,253)"><pre style="font-family:'Courier New',Courier,monospace;font-size:1em;margin-top:0px;margin-bottom:16px;line-height:16px">    Arg [1]     : <a href="http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1VariationFeature.html" style="color:rgb(70,101,162);font-weight:bold" target="_blank">Bio::EnsEMBL::Variation::VariationFeature</a> $variationFeature
    Arg [2]     : <a href="http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1VariationFeature.html" style="color:rgb(70,101,162);font-weight:bold" target="_blank">Bio::EnsEMBL::Variation::VariationFeature</a> $variationFeature
    Arg [3]     : (optional) int - population_id of population you want to get the r_square value
    Example     :</pre><div style="font-size:12.7272720336914px;font-family:monospace,fixed"><pre style="font-family:monospace,fixed;font-size:9pt;margin:4px 8px 4px 2px;line-height:15.0000009536743px;border:1px solid rgb(196,207,229);padding:4px 6px;overflow:auto;word-wrap:break-word"> $r_square = $obj->get_r_square($vf1,$vf2,$population_id);
</pre></div><pre style="font-family:'Courier New',Courier,monospace;font-size:1em;margin-top:0px;margin-bottom:16px;line-height:16px">    Description : Get the r_square value for a pair of variation features in the given population. If no population is provided,
    return the r_square for the default population with more sample counts (in case more than 1)
    ReturnType  : float
    Exceptions  : throw on incorrect arguments
    Caller      : general
    Status      : At Risk</pre></div></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On 2 October 2014 14:43, Will McLaren <span dir="ltr"><<a href="mailto:wm2@ebi.ac.uk" target="_blank">wm2@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 dir="ltr">Hello,<div><br></div><div>The LDFeatureContainer and adaptor should help you here, see <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>The tutorial has a guide for fetching via a slice (a genomic region), but you can also fetch LD blocks around a VariationFeature object, see the full API docs:</div><div><br></div><div><a href="http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1LDFeatureContainerAdaptor.html" target="_blank">http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1LDFeatureContainerAdaptor.html</a><br></div><div><br></div><div>Mike, I'm afraid there isn't a method to retrieve LD between an arbitrary pair of variants. The two main methods mentioned above are locus based, ie they will only retrieve LD values between pairs of variants within a set distance of each other.</div><div><br></div><div>There's absolutely no technical reason why you couldn't have a method to do the calculation between any two arbitrary variants though; we will look into adding it to the API.</div><div><br></div><div>Regards</div><span><font color="#888888"><div><br>Will McLaren</div><div>Ensembl Variation</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 2 October 2014 14:37, Mike Pierce <span dir="ltr"><<a href="mailto:mikepierce2000@gmail.com" target="_blank">mikepierce2000@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">A related question, is there a function that calculates/returns LD for a pair of variants in a specific population?<div><br></div><div>Because you can use that to calculate a relationship matrix and do your own clustering.<div><br></div><div>Mike</div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On 2 October 2014 14:22, Genomeo Dev <span dir="ltr"><<a href="mailto:genomeodev@gmail.com" target="_blank">genomeodev@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>Hi,</div><div><br></div><div>I have a list of SNPs which I want to cluster into Linkage disequilibrium blocks assuming European ancestry. I was wondering whether there is a quick way to do that using Ensembl variation API?</div><div><br></div><div>Thanks!</div><span><font color="#888888"><div><br></div>-- <br><div dir="ltr">G.</div>
</font></span></div>
<br></div></div>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr">G.</div>
</font></span></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" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>