[ensembl-dev] identifying known variants that map to multiple genome locations

Will McLaren wm2 at ebi.ac.uk
Thu Dec 9 09:43:35 GMT 2010


Hi Andrea,

I'm not quite sure why you're creating a variation feature object for
a known variant in that way; you should be retrieving it via the
variation object using either

$v->get_all_VariationFeatures

or

$variation_feature_adaptor->fetch_all_by_Variation($v)

There is no way to get the other variation features from the variation
feature itself; the quickest way (or the least amount of code) would
be:

$vf->variation->get_all_VariationFeatures

Will

On 8 December 2010 23:38, Andrea Edwards <edwardsa at cs.man.ac.uk> wrote:
> Esteemed api developers,
>
> Is there any easy way with the perl api to tell if a known variant (by this
> i mean one that has a an rsID and that i have created like this:
>
> # Variation feature representing a single nucleotide polymorphism
> $vf = Bio::EnsEMBL::Variation::VariationFeature->new
> (-start => 100,
> -end => 100,
> -strand => 1,
> -slice => $slice,
> -allele_string => 'A/T',
> -variation_name => 'rs635421',
> -map_weight => 1,
> -variation => $v);
>
> is known to map to another region of the genome other than the region have
> specified with the slice/start/end properties?
>
> dbSNP variants can be assigned to multiple genome locations when it hasn't
> been possible to unambiguously assign them to a single location.
>
> If i can't tell from the variation feature directly i believe i can do this:
>
> $vfa = $reg->get_adaptor("human","variation","variationfeature");
> $va = $reg->get_adaptor("human","variation","variation");
>
> # fetch all genome hits for a particular variation
> $v = $va->fetch_by_name('rs56');
> $count =  @{$vfa->fetch_all_by_Variation($v)}
> if $count > 1 then it maps to more than one place?
>
> I was hoping to be able to do it directly from teh variation feature
>
> thanks
>
>
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev
>
>




More information about the Dev mailing list