Functions#
Reading#
- gb_io.load(fh)#
Load all GenBank records from the given path or file handle.
- gb_io.iter(fh)#
Iterate over the GenBank records in the given file or file handle.
- Parameters:
fh (
stror file-handle) – The path to a GenBank file, or a stream that contains data serialized in GenBank format.- Returns:
RecordReader– An iterator over the GenBank records in the given file or file-handle.
Writing#
- gb_io.dump(records, fh, *, escape_locus=False, truncate_locus=False)#
Write one or more GenBank records to the given path or file handle.
- Parameters:
records (
Recordor iterable ofRecord) – The records to write to the file.fh (
stror file-handle) – The path to a GenBank file, or a stream that contains data serialized in GenBank format.escape_locus (
bool) – PassTrueto escape any whitespace in the locus name with an underscore character.truncate_locus (
bool) – PassTrueto trim the locus fields so that the locus line is no longer than 79 characters.
Added in version 0.2.0.