[Bioperl-l] Printing string fragments?

Brian Osborne brian_osborne at cognia.com
Wed Mar 10 09:02:06 EST 2004


If you are actually creating this fasta file yourself then you could change
the format of the header a bit by adding a space, to:

 >seqname1 #uninteresting_information

Then, $seq_obj->display_id will give "seqname1", not

Brian O.

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Gyoergy Abrusan
Sent: Wednesday, March 10, 2004 7:32 AM
To: bioperl-l at bioperl.org
Subject: [Bioperl-l] Printing string fragments?

Dear All,

I would like to ask how can I print out certain fragments of strings.
my data are in the format:


I wrote a script that makes some statistics on the nucleotide sequences.
I would like to print the results out as:

seqname1    results
seqname2    results

at the moment I can print them out only as:

 >seqname1#uninteresting_information     results
 >seqname2#uninteresting_information     results

Because the scriprt prints out the entire seqname-sting.
How can I print out parts of a string, say from symbol '>' to
symbol '#'?

Thanking you in advance.
Kind regards,

Gyorgy Abrusan,

Max-Planck Institute for Limnology,
Ploen, Germany

Bioperl-l mailing list
Bioperl-l at portal.open-bio.org

More information about the Bioperl-l mailing list