[Bioperl-l] How to read in FASTA formatted sequence without fasta header?

Sean Davis sdavis2 at mail.nih.gov
Fri Sep 30 18:06:52 EDT 2005


On 9/30/05 4:43 PM, "Ryan Golhar" <golharam at umdnj.edu> wrote:

> I'm looking for the easier way to read in a fasta file that doesn't
> contain the fasta header, ie the ">..." line.
> 
> I tried just specifying fasta, but then the first line of the sequence
> is taken as the name of the sequence.  I also tried specifying raw, but
> then only the first line is read.
> 
> Is there any (easy) way to do this without reformatting the fasta file
> or creating a new one?  Thanks,

Unfortunately, fasta format is NOT equal to strings of "actg".  Instead, it
includes the >... line.  Therefore, if you want to do anything using
fasta-based tools, then you really need fasta format.  I may stand
corrected, but I think the easiest thing to do is to write a quick piece of
code to insert the > lines with names like seq1, seq2, etc., if the
sequences do not have proper names.

Sean



More information about the Bioperl-l mailing list