[ensembl-dev] Gene adaptor returns nothing
Allan Kamau
kamauallan at gmail.com
Tue May 22 12:05:26 BST 2012
Hi,
I have a list of gene names from EntrezGene for which I would like to
obtain transcripts for.
The code:
@genes=@{ $gene_adaptor->fetch_all_by_external_name('BRCA1') };
returns nothing.
I have composed the test code below mainly from the sample code on the
ensembl api documentation.
What am I overlooking?
use Bio::EnsEMBL::Registry;
Bio::EnsEMBL::Registry->load_registry_from_db(
-host ='ensembldb.ensembl.org',
-user ='anonymous',
);
if(1==2)
{
$gene_adaptor=Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "gene"
);
$gene=$gene_adaptor->fetch_by_dbID(1234);
$gene=$gene_adaptor->fetch_by_stable_id('ENSG00000184129');
}
@genes=@{ $gene_adaptor->fetch_all_by_external_name('BRCA1') };
if(1==2)
{
$slice_adaptor =
Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "slice" );
$slice =
$slice_adaptor->fetch_by_region( 'chromosome', '1', 1, 1000000 );
@genes = @{ $gene_adaptor->fetch_all_by_Slice($slice)};
}
while (my $gene = shift @{$genes})
{
print "Here";
#$gene.list_stable_ids();
}
Allan.
More information about the Dev
mailing list