in reply to How to avoid using array in concatenating string of multiple lines OR How To Read FASTA
use Bio::SeqIO; my $in = Bio::SeqIO->new(-format => 'fasta', -fh => \*DATA); my $i =1; while( my $s = $in->next_seq ) { print $i++, " : ", $seq->seq(), "\n"; } __DATA__ > Seq 1 (two lines) AAAAAAAAAAAAA CCAAAAAAAAAAA > Seq 2 (two lines) AAAAAAAAAAAAA AAAAAAAAAAAAA > Seq 3 (one line) TTTTTTTTTTTTAACTGAAGATTCGC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to avoid using array in concatenating string of multiple lines
by monkfan (Curate) on Dec 10, 2004 at 03:17 UTC | |
by reneeb (Chaplain) on Dec 10, 2004 at 07:28 UTC | |
by monkfan (Curate) on Dec 10, 2004 at 08:57 UTC | |
by stajich (Chaplain) on Dec 10, 2004 at 21:11 UTC | |
by monkfan (Curate) on Dec 11, 2004 at 05:29 UTC | |
by stajich (Chaplain) on Dec 12, 2004 at 15:32 UTC |