supriyoch_2008 has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to convert the NCBI Gene ID to GenBank ID?
by bliako (Abbot) on Jun 22, 2018 at 15:37 UTC | |
by Anonymous Monk on Jun 22, 2018 at 23:32 UTC | |
by bliako (Abbot) on Jun 23, 2018 at 09:44 UTC | |
by Anonymous Monk on Jun 25, 2018 at 12:14 UTC | |
by supriyoch_2008 (Monk) on Jun 23, 2018 at 17:49 UTC | |
by supriyoch_2008 (Monk) on Jun 23, 2018 at 17:47 UTC | |
|
Re: How to convert the NCBI Gene ID to GenBank ID?
by Anonymous Monk on Jun 22, 2018 at 07:02 UTC |