[ensembl-dev] Variation Features from Slice

Stuart Meacham sm766 at cam.ac.uk
Wed May 1 14:50:06 BST 2013


Hi,

If I have the data chr:pos for a SNP can I expect to retrieve the 
Variation Feature(s) at that location via a Slice with something like:

my $chr = '9';
my $pos = '136131022'
my $slice = $sa->fetch_by_region('chromosome',$chr,$pos,$pos); #create a 
slice of 1 base length
     foreach my $vf (@{$vfa->fetch_all_by_Slice($slice)}){ #get all 
variations at that position
         my $snp = $vf->variation_name();
         my $as = $vf->allele_string;
         my $maf = $vf->minor_allele_frequency();
         my $ma = $vf->minor_allele();
         my $cons = $vf->display_consequence();
         my $vc = $vf->var_class();
         print OUTPUT "$chr\t$pos\t$snp\t$as\t$cons\t$vc\t$gene\n";
     }
}

The reason I ask is because 9:136131022 doesn't seem to return rs8176751 
although I have had success with other locations.

Thanks

Stuart







More information about the Dev mailing list