[ensembl-dev] Problem with retrieving VariationAnnotations

Tjaart de Beer tjaart at ebi.ac.uk
Tue Jul 3 10:30:04 BST 2012


Hi all,

I currently have a list of RSID's from the 1000 Genomes project for which
I would like to determine the population in the 1000 Genomes which they
belong too. My thoughts were to take every rsid, query Ensembl and find
out either the frequency of the allele in each population or at least the
population set it belongs too. I tried the following example from the
Ensembl Variation tutorial but it doesn't seem to work:

use strict;
use warnings;
use Bio::EnsEMBL::Registry;

my $registry = 'Bio::EnsEMBL::Registry';

$registry->load_registry_from_db(
    -host => 'ensembldb.ensembl.org',
    -user => 'anonymous',
);

# Fetch a variation object
my $var_adaptor = $registry->get_adaptor('human', 'variation', 'variation');
my $var = $var_adaptor->fetch_by_name('rs149944086');

# Fetch all the variation annotations associated with the variation
my $va_adaptor = $registry->get_adaptor('homo_sapiens', 'variation',
'variationannotation');
foreach my $va (@{$va_adaptor->fetch_all_by_Variation($var)})
{
    print $va->variation_names."\n";
    print $va->source_name."\n";
    print $va->study_name."\n";
}


According to the webinterface
(http://www.ensembl.org/Homo_sapiens/Variation/Population?db=core;r=1:870729-871729;v=rs149944086;vdb=variation;vf=30949909)
of Ensembl this rsid is annotated and I can see that it was imported from
dbSNP. I can also see the 1000 Genomes allele frequencies on the webpage.
But when I run my script I get no output whatsoever. I also updated the
API this morning.

I have two questions which I hope someone can help me with:

1. What is wrong with my script? Or am I missing something?
2. Is there a better approach for me to find out which rsid occurs in
which 1000 Genome population (along with its frequency)?

Thanks!

--
Dr. Tjaart de Beer
Thornton group
EMBL-EBI
Cambridge
United Kingdom





More information about the Dev mailing list