[Bioperl-l] Fasta headers

Ewan Birney birney at ebi.ac.uk
Mon Jan 3 09:59:13 EST 2005



On Mon, 3 Jan 2005, Rasa Gulbinaite wrote:

> Hello,
>
> i'm new to bioperl and a bit confused with fasta file headers. I'm working
> with SNPs and i would like to get only the fasta headers form the fasta
> file, not the sequences. What would be the best way to do this? Thank you.

The desc() method on a sequence object has this - eg:


$seqin = Bio::SeqIO->new( -file => 'my_filename' , -format => 'fasta');

while( ($seq = $seqin->next_seq()) ) {
   $header = $seq->desc();
}




>
> Rasa
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list