[ensembl-dev] Variations without LD and warnings of deprecated method call (Ensembl API v84)

Anja Thormann anja at ebi.ac.uk
Wed Mar 16 14:17:24 GMT 2016


Dear Johanne,

I replaced the method that was causing the warning. Please refresh your checkout and the message should go away.

The variants for which you cannot compute LD have no reported alternative alleles for the selected population. This means for the given population CEU only the reference allele has been seen in the set of individuals. For example rs116998215: http://www.ensembl.org/Homo_sapiens/Variation/Population?db=core;r=15:54342925-54343925;v=rs116998215;vdb=variation;vf=23224014 <http://www.ensembl.org/Homo_sapiens/Variation/Population?db=core;r=15:54342925-54343925;v=rs116998215;vdb=variation;vf=23224014>

If you change the population to any of the East Asian populations you could compute LD for the variant.

HTH,
Anja

> On 16 Mar 2016, at 07:44, Johanne Håøy Horn <johannhh at ifi.uio.no> wrote:
> 
> Dear Ensembl dev team,
> 
> If I use the script below, I get this warning: 
> Deprecated method call in file /Users/Johanne/src/ensembl-variation/modules/Bio/EnsEMBL/Variation/LDFeatureContainer.pm line 505.
> Method Bio::EnsEMBL::Slice::get_all_VariationFeatures is deprecated.
> get_all_VariationFeatures is deprecated and will be removed in e88. Please use Bio::EnsEMBL::Variation::DBSQL::VariationFeatureAdaptor::fetch_all_by_Slice_SO_terms instead.
> Ensembl API version = 84
> 
> SCRIPT, where $variation_name is in {rs145155926, rs111309268, rs150384273, rs137966595, rs7675152, rs116998215, rs184066894, rs149535525, rs186235844}:
> 
> my $variation_adaptor = $registry->get_adaptor('homo_sapiens', 'variation', 'variation');
> my $ldfc_adaptor = $registry->get_adaptor('homo_sapiens', 'variation', 'ldfeaturecontainer');
> $ldfc_adaptor->max_snp_distance(100_000);
> my $pop_adaptor = $registry->get_adaptor('homo_sapiens', 'variation', 'population');
> $variation_adaptor->db->use_vcf(1);
> 
> 
> my $variation = $variation_adaptor->fetch_by_name($variation_name);
> my @var_features;
> 
> if ($variation) {
> @var_features = @{ $variation->get_all_VariationFeatures() };
> } else {
> print 'failing variation name: ', $variation_name, "\n";
> next;
> }
> 
> foreach my $vf (@var_features) {
> if ($vf->slice->is_reference) {
> 
> my $rsid = $vf->name;
> print $rsid, "\n";
> my $start = $vf->start;
> my $region = $vf->seq_region_name;
> my $ldfc = $ldfc_adaptor->fetch_by_VariationFeature($vf, $ld_population);
> my @ld_values = @{ $ldfc->get_all_ld_values() };
>  
>       foreach my $ld_hash (@ld_values) {
>         
> my $r2 = $ld_hash->{r2};
>    
> my $variation_name1 = $ld_hash->{variation_name1};
>    
> my $variation_name2 = $ld_hash->{variation_name2};
>    
> my $pos1 = $ld_hash->{variation1}->seq_region_name();
>    
> my $pos2 = $ld_hash->{variation2}->seq_region_name();
>    
> my $start1 = $ld_hash->{variation1}->start;
>    
> my $start2 = $ld_hash->{variation2}->start;
> 
>    
> if ($variation_name1 eq $rsid) {
>    
> print OUT "$pos2\t$start2\t$start2\t$variation_name2\t$rsid\t$r2\n";
>    
> } else {
>    
> print OUT "$pos1\t$start1\t$start1\t$variation_name1\t$rsid\t$r2\n";
>    
> }
>    }
>       
> } else {
>       
> print "Failed to get, not a reference allele: ", $vf->name;
>       
> }
> }
> 
> The issue seems to be related to get_all_ld_values(). If I use get_all_ld_values(1), no warning occurs. I also tried get_all_ld_values(0), but with the same warning of deprecated method call appeared.
> 
> 
> I am trying to expand variations with their variations in LD. However, quite a few rsids seem to have no LD. A list of these is included in this email. Could you help me with why they get no LD variations? Is it because they do not have any? Or is it a technical limitation that cause this?
> 
> Best,
> Johanne Håøy Horn
> <unaccounted_old.txt>
> _______________________________________________
> 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/20160316/9c77b6ba/attachment.html>


More information about the Dev mailing list