Training Info¶
- class pyrodigal.TrainingInfo¶
A collection of parameters obtained after training.
New in version 0.5.0.
- __init__(*args, **kwargs)¶
- dump(fp)¶
Write a training info to a file-like handle.
- Parameters
fp (file-like object) – An file-like handle opened in binary mode, into which the training info should be written.
Danger
This method is not safe to use across different machines. The internal binary structure will be dumped as-is, and because the C types can change in size and representation between CPUs and OS, the file will not portable. This method is only provided to offer the same kind of features as the Prodigal binary. For a safe way of storing and sharing a
TrainingInfo, use thepicklemodule.New in version 0.6.4.
- load(fp)¶
Load a training info from a file-like handle.
- Parameters
fp (file-like object) – An file-like handle opened in binary mode, from which to read the training info.
- Returns
TrainingInfo– The deserialized training info.
Danger
This method is not safe to use across different machines. The internal binary structure will be dumped as-is, and because the C types can change in size and representation between CPUs and OS, the file will not portable. This method is only provided to offer the same kind of features as the Prodigal binary. For a safe way of storing and sharing a
TrainingInfo, use thepicklemodule.- Raises
EOFError – When less bytes than expected could be read from the source file handle.
New in version 0.6.4.