Hi Perl Monks,
I am interested in converting the Gene ID of NCBI to GenBank ID. In NCBI Gene database, when I write 7157 as Gene ID in search box, the page opens with the heading "TP53 tumor protein p53 Homo sapiens (human)". Almost at the bottom of that page the sub-heading appears as "mRNA and Protein(s)" which shows the GenBank ID as "NM_000546.5" (first entry) with a hyperlink. When clicked, the GenBank page opens up and shows the details. This is a cumbersome process when one has to get the GenBank ID of many genes. I searched in the web for a perl script which can convert Gene ID to GenBank ID using internet directly. But I did not get such a script. However, the link http://biodb.jp/ can perform this task of conversion in a very lengthy procedure. Then, I tried to get the sequence of Gene ID 7157 using a script:
Here goes the script for sequence:
#!/usr/bin/perl use warnings; use strict; use Bio::DB::GenBank; use Bio::SeqIO; use Text::Wrap; my $gb= new Bio::DB::GenBank; my $id='7157'; my $seq = $gb->get_Seq_by_gi($id); print "\n seq: $seq\n"; exit;
But I got the wrong result and not the sequence in cmd as follows: Here goes the result in cmd:
C:\Users\x>cd d* C:\Users\x\Desktop>g2.pl seq: Bio::Seq::RichSeq=HASH(0x780b234) C:\Users\x\Desktop>
I need suggestions from PerlMonks to solve this problem of ID conversion so that I can get the results of Gene IDs: 7157, 7422 as follows in cmd:
I expect results in the following format:
GenBank ID NM_000546.5 NM_001025366.2
In reply to How to convert the NCBI Gene ID to GenBank ID? by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |