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 the pickle module.

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 the pickle module.

Raises

EOFError – When less bytes than expected could be read from the source file handle.

New in version 0.6.4.

bias

The GC frame bias for each of the 3 positions.

Type

tuple of float

gc

The GC content of the training sequence.

Type

float

start_weight

The start score weight to use for the training sequence.

Type

float

translation_table

The translation table used during training.

Type

int

type_weights

The weights for ATG, GTG and TTG.

Type

tuple of float

uses_sd

True if the sequence uses a Shine/Dalgarno motif.

Type

bool

class pyrodigal.MetagenomicBin

A pre-trained collection used to find genes in metagenomic mode.

training_info

The training info for this metagenomic bin.

Type

TrainingInfo

description

A condensed text description for this metagenomic bin.

Type

str

index

The index of this metagenomic bin.

Type

int