[Bioperl-l] annotating existing Seq objects
Jason Stajich
jason@chg.mc.duke.edu
Fri, 1 Jun 2001 08:43:36 -0400 (EDT)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---559023410-851401618-991399416=:24964
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Fri, 1 Jun 2001, Stephen Henderson wrote:
> I have used the BioPerl tools to write some simple scripts for retrieving
> batches of Ref_sequences from Genbank (in Fasta flat file format). I have a
> slight problem in that some of the retrieved sequence objects:
>
> $seq= $gb->get_Seq_by_id($ets[$i])
All methods (and then some) that one can initialize on in a constructor
are available through get/set methods. To achieve what you are asking
just use the following:
$seq->display_id($ets[$i]);
>
> have a distinct display_id from that which I have retrieved them with e.g I
> put in X98048, and I get back HS408N23 (I'm not exactly sure why?)
LOCUS is what we put into display_id();
However, in your example I get back EHPAKMCM3 NOT 'HS408N23'
EHPAKMCM3 is the LOCUS name.
If you wanted to the existing display_id just do
$seq->display_id($seq->display_id() . ' ' . $ets[$i] );
>
> Anyway to work round this I simply want to append my initial query to the
> end of the display_id in the fasta comment line, and then save the files.
> The documentation here shows good examples of creating new Seq objects, or
> returning various properties of seq objects, but are there simple methods to
> append/change Seq features such as accession_id, display_id themselves
> without recourse to creating new objects.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
Jason Stajich
jason@chg.mc.duke.edu
Center for Human Genetics
Duke University Medical Center
http://www.chg.duke.edu/
---559023410-851401618-991399416=:24964
Content-Type: APPLICATION/x-perl; name="genbankdownload.pl"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.05.10106010843360.24964@hardy.mc.duke.edu>
Content-Description: example
Content-Disposition: attachment; filename="genbankdownload.pl"
IyEvdXNyL2xvY2FsL2Jpbi9wZXJsIC13CnVzZSBzdHJpY3Q7CnVzZSBCaW86
OkRCOjpHZW5CYW5rOwp1c2UgQmlvOjpTZXFJTzsKCm15ICRzZXFpbyA9IG5l
dyBCaW86OlNlcUlPKCctZm9ybWF0JyA9PiAnZmFzdGEnLAoJCQkgICAnLWZo
JyAgICAgPT4gXCpTVERPVVQpOwpteSAkZGIgPSBuZXcgQmlvOjpEQjo6R2Vu
QmFuaygpOwoKbXkgJHNlcSA9ICRkYi0+Z2V0X1NlcV9ieV9pZCgnWDk4MDQ4
Jyk7CiNwcmludCAiZGlzcGxheSBpZCBmb3IgWDk4MDQ4IGlzICIsICRzZXEt
PmRpc3BsYXlfaWQoKSwgIlxuIjsKJHNlcWlvLT53cml0ZV9zZXEoJHNlcSk7
Cgokc2VxLT5kaXNwbGF5X2lkKCRzZXEtPmRpc3BsYXlfaWQgLiAnIFg5ODA0
OCcpOwojcHJpbnQgImRpc3BsYXkgaWQgZm9yIFg5ODA0OCBpcyAiLCAkc2Vx
LT5kaXNwbGF5X2lkKCksICJcbiI7Cgokc2VxaW8tPndyaXRlX3NlcSgkc2Vx
KTsK
---559023410-851401618-991399416=:24964--