Genes¶
- class pyrodigal.Genes¶
A list of raw genes found by Prodigal in a single sequence.
New in version 0.5.4.
- sequence¶
The compressed input sequence for which the gene predictions were made.
- Type
- training_info¶
A reference to the training info these predictions were obtained with.
- nodes¶
A collection of raw nodes found in the input sequence.
- Type
- write_genes(file, prefix='gene_', width=70)¶
Write nucleotide sequences of genes to
filein FASTA format.- Parameters
file (
io.TextIOBase) – A file open in text mode where to write the nucleotide sequences.prefix (
str) – The prefix to use to make identifiers for each predicted gene.width (
int) – The width to use to wrap sequence lines. Prodigal uses 70 for nucleotide sequences.
- Returns
int– The number of bytes written to the file.
- write_gff(file, prefix='gene_', width=60)¶
Write the genes to
filein General Feature Format.- Parameters
file (
io.TextIOBase) – A file open in text mode where to write the features.prefix (
str) – The prefix to use to make identifiers for each predicted gene.
- Returns
int– The number of bytes written to the file.
- write_scores(file, header=True)¶
Write the start scores to
filein tabular format.- Parameters
file (
io.TextIOBase) – A file open in text mode where to write the features.header (
bool) –Trueto write a header line,Falseotherwise.
- Returns
int– The number of bytes written to the file.
New in version 0.7.0.
- write_translations(file, prefix='gene_', width=60, translation_table=None)¶
Write protein sequences of genes to
filein FASTA format.- Parameters
file (
io.TextIOBase) – A file open in text mode where to write the protein sequences.prefix (
str) – The prefix to use to make identifiers for each predicted gene.width (
int) – The width to use to wrap sequence lines. Prodigal uses 60 for protein sequences.translation_table (
int, optional) – A different translation to use to translation the genes. IfNonegiven, use the one from the training info.
- Returns
int– The number of bytes written to the file.
- class pyrodigal.Gene¶
A single raw gene found by Prodigal within a DNA sequence.
New in version 0.5.4.
- __init__(*args, **kwargs)¶
- confidence()¶
Estimate the confidence of the prediction.
- Returns
float– A confidence percentage (between 0 and 100).
- sequence()¶
Build the nucleotide sequence of this predicted gene.
New in version 0.5.4.
- translate(translation_table=None, unknown_residue='X')¶
Translate the predicted gene into a protein sequence.
- Parameters
translation_table (
int, optional) – An alternative translation table to use to translate the gene. UseNone(the default) to translate using the translation table this gene was found with.unknown_residue (
str) – A single character to use for residues translated from codons with unknown nucleotides.
- Returns
str– The proteins sequence as a string using the right translation table and the standard single letter alphabet for proteins.- Raises
ValueError – when
translation_tableis not a valid genetic code number.
- rbs_motif¶
The motif of the Ribosome Binding Site.
Possible non-
Nonevalues areGGA/GAG/AGG,3Base/5BMM,4Base/6BMM,AGxAG,GGxGG,AGGAG(G)/GGAGG,AGGA,AGGA/GGAG/GAGG,GGAG/GAGG,AGGAG/GGAGG,AGGAG,GGAGGorAGGAGG.- Type
str, optional
- rbs_spacer¶
The number of bases between the RBS and the CDS.
Possible non-
Nonevalues are3-4bp,5-10bp,11-12bpor13-15bp.- Type
str, optional