[ensembl-dev] Linkage disequilibrium clustering

Will McLaren wm2 at ebi.ac.uk
Thu Oct 2 15:44:25 BST 2014


That method only retrieves values that have been calculated already.

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.

Will

On 2 October 2014 15:09, Genomeo Dev <genomeodev at gmail.com> wrote:

> Thanks Will. I have actually just found this, it may actually do exactly
> that pairwise calculation:
>
> public Float Bio::EnsEMBL::Variation::LDFeatureContainer::get_r_square()
>
>     Arg [1]     : Bio::EnsEMBL::Variation::VariationFeature <http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1VariationFeature.html> $variationFeature
>     Arg [2]     : Bio::EnsEMBL::Variation::VariationFeature <http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1VariationFeature.html> $variationFeature
>     Arg [3]     : (optional) int - population_id of population you want to get the r_square value
>     Example     :
>
>  $r_square = $obj->get_r_square($vf1,$vf2,$population_id);
>
>     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
>
>
> On 2 October 2014 14:43, Will McLaren <wm2 at ebi.ac.uk> wrote:
>
>> Hello,
>>
>> The LDFeatureContainer and adaptor should help you here, see
>> http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html#ld
>>
>> 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:
>>
>>
>> http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1LDFeatureContainerAdaptor.html
>>
>> 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.
>>
>> 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.
>>
>> Regards
>>
>> Will McLaren
>> Ensembl Variation
>>
>> On 2 October 2014 14:37, Mike Pierce <mikepierce2000 at gmail.com> wrote:
>>
>>> A related question, is there a function that calculates/returns LD for a
>>> pair of variants in a specific population?
>>>
>>> Because you can use that to calculate a relationship matrix and do your
>>> own clustering.
>>>
>>> Mike
>>>
>>> On 2 October 2014 14:22, Genomeo Dev <genomeodev at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> 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?
>>>>
>>>> Thanks!
>>>>
>>>> --
>>>> G.
>>>>
>>>> _______________________________________________
>>>> Dev mailing list    Dev at ensembl.org
>>>> Posting guidelines and subscribe/unsubscribe info:
>>>> http://lists.ensembl.org/mailman/listinfo/dev
>>>> Ensembl Blog: http://www.ensembl.info/
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Dev mailing list    Dev at ensembl.org
>>> Posting guidelines and subscribe/unsubscribe info:
>>> http://lists.ensembl.org/mailman/listinfo/dev
>>> Ensembl Blog: http://www.ensembl.info/
>>>
>>>
>>
>> _______________________________________________
>> Dev mailing list    Dev at ensembl.org
>> Posting guidelines and subscribe/unsubscribe info:
>> http://lists.ensembl.org/mailman/listinfo/dev
>> Ensembl Blog: http://www.ensembl.info/
>>
>>
>
>
> --
> G.
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20141002/e05978ab/attachment.html>


More information about the Dev mailing list