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 node list.
- 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 toTrue
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 thenode.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 stored.
Note
This function is reimplemented from the
score_nodes
function ofnode.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.
- classmethod 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.
- index¶
The position of the node in the sequence.
Hint
This coordinate is zero-based: a node at index 0 will correspond to a start or stop codon at the very beginning of the sequence.
New in version 0.7.0.
- Type: