in reply to How to convert the NCBI Gene ID to GenBank ID?
As per Bio::DB::GenBank's documentation the function you are calling get_Seq_by_gi() returns a Bio::Seq object. Whose documentation is here Bio::Seq. In there it shows how to print the sequence, for example, using a method like : print $seq->seq()."\n";
That said, be warned that in your script you hammer in your '7157' ID to a remote service which expects GenBank's IDs (NM_000546.5). You do get a response which is garbage unfortunately as it relates to "Dictyostelium discoideum (Slime mold)" and not to "Homo Sapiens" - what's the difference one can ask (sidenote: more evidence that the old GIGO effect is deep-rooted into the heart of the lite "sciences").
In order to get the response you want you must supply the get_Seq_by_id() with this $id='NM_000546.5'. Then it remains to explore the documentation in order to extract what you want from that large (>100KB) dataset you just transfered from 4000km away across land and sea and possibly through aether.
If your main aim is to convert programmatically the ID 7157 to an ID understood by GenBank, e.g. NM_000546.5 then welcome to the club of gene id conversions. Probably a tenth of the net's transfers are to sites claiming to convert between the numerous ID standards imposed by bio-narcissi and fund-whores and desperate users who somewhere got lost in these standards or found that the mapping is not 1-1. I can not help you with that although, additionally to Bioperl, R (bioconductor) may offer you another lifeline.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to convert the NCBI Gene ID to GenBank ID?
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 | |
|
Re^2: How to convert the NCBI Gene ID to GenBank ID?
by supriyoch_2008 (Monk) on Jun 23, 2018 at 17:47 UTC |