[ensembl-dev] Urgent information to extract the refseq_mrna and HGNC symbol for given gene from ENSEMBL
Manam, Monica (NIH/NCI) [F]
monica.manam at nih.gov
Tue Jun 25 13:12:00 BST 2013
Hello Dev Team !
The API version used is 71.
I am an intern at the NIH(National Institutes Of health), Bethesda. I am working on a project & I need the ensembl API to extract the ref_seq mrna & HGNC symbol for a given gene .
I tried to use the following but got no results, I was getting an exception
"refseq_mrna not known " :
sub feature2string
{
my $feature = shift;
my $stable_id = $feature->stable_id();
my $seq_region = $feature->slice->seq_region_name();
my $start = $feature->start();
my $end = $feature->end();
my $strand = $feature->strand();
return sprintf( "%s: %s:%d-%d (%+d)",
$stable_id, $seq_region, $start, $end, $strand );
}
my $logic_name= 'refseq_human_import';
my $slice_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Slice' );
my $slice = $slice_adaptor->fetch_by_region( 'chromosome', '2',17997763,17998368);
my $genes = $slice->get_all_Genes();
while ( my $gene = shift @{$genes} ) {
my $gstring = feature2string($gene);
print "$gstring\n";
my $transcripts = $gene->get_all_Transcripts();
while ( my $transcript = shift @{$transcripts} ) {
my $tstring = feature2string($transcript);
print "\t$tstring\n";
print $logic_name."\tGene_biotype=".$gene->biotype.
"\tTranscript_name=".$transcript->stable_id."\tTranscript_biotype=".$transcript->biotype."\n";
print $logic_name."\tGene_refseq=".$gene->refseq_mrna."\n";
print $logic_name."\tGene_hgnc=".$gene->hgnc_symbol."\n";
Could you kindly help me with this, asap. As this is a time constrained project.
Thanks,
Monica Manam
NIH- Intern 2013
More information about the Dev
mailing list