[ensembl-dev] Getting SNP information from location. Bug?

Alexia Cardona ac812 at cam.ac.uk
Thu Mar 27 12:01:46 GMT 2014


Hi,
I am trying to get SNP information given a location on the genome.  I am
basically creating a slice from a location (Chromosome 1 pos 564598) and
use it to get the list of variant features in that slice
(fetch_all_by_Slice).  The problem is that the array is empty.  When
searching through Ensembl browser online however there is SNP at that
location.  Does anyone know if this is a bug or if I'm doing something
wrong please?

(Code snipped below)

Thanks

Ensembl link online:
http://www.ensembl.org/Homo_sapiens/Variation/Mappings?db=core;r=1:564098-565098;v=rs144350286;vdb=variation;vf=4442009

##############################

use strict;
use warnings;

use Bio::EnsEMBL::Registry;

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

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


#create slice
my $sliceAdaptor = $registry->get_adaptor('human', 'core', 'slice');
my $slice = $sliceAdaptor->fetch_by_region('chromosome', 1, 564598 ,
564598);
my $vfa = $registry->get_adaptor('human', 'variation', 'variationfeature');
my$vfs = $vfa->fetch_all_by_Slice($slice);
print scalar @$vfs; #returns 0
my $vfs2 = $vfa->fetch_all_somatic_by_Slice($slice);
print scalar @$vfs2; #returns 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20140327/f9e818cc/attachment.html>


More information about the Dev mailing list