[ensembl-dev] question variation APi

Nathalie Conte nconte at ebi.ac.uk
Tue Oct 7 10:38:40 BST 2014


Hi, 
I would like to get all variation ID  (ie rs1822893 )from ensembl, I am using the variation API to do so.
Is it the best way? the fetch_all method seems to get all germline variation, is there another method for somatic ones?

my $vf_adaptor = Bio::EnsEMBL::Registry->get_adaptor('human', 'variation', 'variationfeature'); 
my @vfs = @{$vf_adaptor->fetch_all()};
foreach my $vf(@vfs){
		 if ($vf){
			my $varID=defined($vf->variation_name) ? $vf->variation_name :'No_variation';
			if ($varID) {
print  "$varID\n";
			}
		}
}





More information about the Dev mailing list