needle -filter

David Mathog mathog at mendel.bio.caltech.edu
Tue Jun 10 15:47:49 UTC 2003


> Peter Rice wrote:
> 
> EMBOSS does not (always) read the entire stream - but it would have to 
> rewind the input to read a second sequence.
> 
> Consider, for example, FASTA format:
> 
>  >abc
> aaacccgggttt
>  >def
> tttgggcccaaa
> 
> EMBOSS has to read the first line of the second sequence -
> just to know  that the first sequence has ended.

Only the first character of that line, which is what I was
referring to in my earlier post.  If the input uses getc()
it can do an ungetc() at the second '>' and then exit.
The next "firstfasta" should pick up the same '>'
as its first character.  At least on Unix.  ungetc() isn't
the most portable of functions - but all the OS's I know
of allow it to be called at least once.  Just don't
expect to be able to call it a thousand times sequentially.

Regards,

David Mathog
mathog at caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech



More information about the EMBOSS mailing list