Nodes

class pyrodigal.Nodes

A list of dynamic programming nodes used by Prodigal to score ORFs.

New in version 0.5.4.

__init__(*args, **kwargs)
clear()

Remove all nodes from the vector.

copy()

Create a copy of the Nodes object.

extract(sequence, *, closed=False, min_gene=90, min_edge_gene=60, translation_table=11)

Extract nodes from the given sequence based on the training info.

After calling this method, nodes won’t be sorted; make sure to call Nodes.sort before using this further.

Parameters

sequence (Sequence) – The sequence to extract the nodes from.

Keyword Arguments
  • closed (bool) – Set to True to prevent proteins from running off edges when finding genes in a sequence.

  • min_gene (int) – The minimum gene length. Defaults to the value used in Prodigal.

  • min_edge_gene (int) – The minimum edge gene length. Defaults to the value used in Prodigal.

  • translation_table (int) – The translation table to use. Check the Wikipedia page listing all genetic codes for the available values.

Returns

int – The number of nodes added from the given sequence.

Note

This function is adapted from the add_nodes function in the node.c file of the Prodigal source code.

reset_scores()

Reset node scores.

score(sequence, training_info, *, closed=False, is_meta=False)

Score the start nodes currently scored.

Note

This function is reimplemented from the score_nodes function of node.c from the Prodigal source, and already contains the patch from hyattpd/Prodigal#88.

sort()

Sort all nodes in the vector by their index and strand.

with_capacity(capacity)

Create a new node array with the given capacity.

class pyrodigal.Node

A dynamic programming node used by Prodigal to score ORFs.

New in version 0.5.4.

__init__(*args, **kwargs)
cscore

The coding score for this node, based on 6-mer usage.

Type

float

edge

True if the node runs off the edge.

Type

bool

gc_bias

The frame of highest GC content within this node.

Type

int

gc_cont

The GC content for the node.

Type

float

index

The position of the node in the sequence.

New in version 0.7.0.

Type

int

rscore

The score for the RBS motif.

New in version 0.7.0.

Type

float

score

The score of the total solution up to this node.

Type

float

sscore

The score for the strength of the start codon.

New in version 0.7.0.

Type

float

strand

-1 if the node is on the reverse strand, +1 otherwise.

New in version 0.7.0.

Type

int

tscore

The score for the codon kind (ATG/GTG/TTG).

New in version 0.7.0.

Type

float

type

The node type (ATG, GTG, TTG, or Stop).

Type

str