Package Bio :: Package Fasta :: Class SequenceParser
[hide private]
[frames] | no frames]

Class SequenceParser

source code

Parses FASTA sequence data into a SeqRecord object.

Instance Methods [hide private]
 
__init__(self, alphabet=Alphabet(), title2ids=None, debug=0)
Initialize a Scanner and Sequence Consumer.
source code
 
parse_string(self, text) source code
 
parse(self, handle) source code
Method Details [hide private]

__init__(self, alphabet=Alphabet(), title2ids=None, debug=0)
(Constructor)

source code 

Initialize a Scanner and Sequence Consumer.

Arguments: o alphabet - The alphabet of the sequences to be parsed. If not passed, this will be set as generic_alphabet. o title2ids - A function that, when given the title of the FASTA file (without the beginning >), will return the id, name and description (in that order) for the record. If this is not given, then the entire title line will be used as the description.