sugar._io.fasta module

FASTA IO

sugar._io.fasta.append_fasta(seq, f)[source]

Append a BioSeq sequence to a FASTA file

Warning

This function should NOT be called directly, it registers via BioBasket.write(), call this instead.

sugar._io.fasta.is_fasta(f, **kw)[source]
sugar._io.fasta.iter_fasta(f, comments=None)[source]

Iterate through a FASTA file and yield BioSeq sequences

Parameters:

comments (list) – comment lines inside the file are stored in the comments list (optional)

Warning

This function should NOT be called directly, it registers via read() and iter_(), call this instead.