FASTA#
- class pyncbitk.objtools.FastaReader#
An iterative reader over the sequences in a FASTA file.
- classmethod __new__(*args, **kwargs)#
- __init__(file, *, split=True, parse_ids=True)#
Create a new FASTA reader from a file or a file-like object.
- Parameters:
file (
str,os.PathLikeor file-like object) – Either the path to a file to be open, or a Python file-like object open in binary mode.split (
bool) – Set toFalseto force the reader to produceBioSeqobjects where the instance is aContinuousInstobject.parse_ids (
bool) – IfTrue(the default), the FASTA header line will be parsed to build a sequence identifier. This may cause errors on certain files where the IDs are too long (>50 letters). PassFalseto generate aLocalIdfor eachBioSequsing a counter. The whole FASTA header line can be accessed asTitleDescinstances of theBioSeqin both cases.
- __iter__()#
Implement iter(self).
- __reduce__()#
Helper for pickle.