biopython v1.71.0 Bio.NeuralNetwork.Gene.Pattern.PatternIO
Allow reading and writing of patterns to files.
This just defines a simple persistence class for patterns, making it easy to write them to a file and read ‘em back.
Link to this section Summary
Functions
Intialize the reader and writer class
Read patterns from the specified handle
Write a list of patterns to the given handle
Convenience function to write Seq objects to a file
Link to this section Functions
Link to this function
__init__()
Intialize the reader and writer class.
Arguments:
- alphabet - An optional argument specifying the alphabet which patterns should follow. If an alphabet is set it’ll be used to verify that all patterns follow it.
Attributes:
- separator - A character to use in separating items in a signature when it is written to a file and read back. This character should not be in the possible alphabet of the sequences, or there will be trouble.
Link to this function
read()
Read patterns from the specified handle.
Link to this function
write()
Write a list of patterns to the given handle.
Link to this function
write_seq()
Convenience function to write Seq objects to a file.
This can take Seqs and MutableSeqs, and write them to a file as strings.