Skip to content

Commit

Permalink
Fix some typos in documentation and pyrodigal.lib docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Jul 17, 2024
1 parent 5605cdb commit d828d73
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/guide/publications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Pyrodigal is being used in the following research works:
- Cook, R., Telatin, A., Bouras, G., Camargo, A. P., Larralde, M., Edwards, R. A., Adriaenssens, E. M. Driving through stop signs: predicting stop codon reassignment improves functional annotation of bacteriophages, ISME Communications, Volume 4, Issue 1, January 2024, ycae079, :doi:`10.1093/ismeco/ycae079`.
- Bouras, G., Grigson, R., Papudeshi, B., Mallawaarachchi, V., Roach, M. J. Dnaapler: A tool to reorient circular microbial genomes. Journal of Open Source Software, 9(93), 5968. :doi:`10.21105/joss.05968`.
- Salamzade, R., Tran, P., Martin, C., Manson, A. L., Gilmore, M. S., Earl, A. M., Anantharaman, K., Kalan, L. R. zol & fai: large-scale targeted detection and evolutionary investigation of gene clusters. bioRxiv 2023.06.07.544063; :doi:`10.1101/2023.06.07.544063`.
- Duan, Y., Dias Santos-Junior, C., Schmidt, T.S., Fullam, A., de Almeida, B. L. S., Zhu, C., Kuhn, M., Zhao, X.M., Bork, P., Coelho, L. P. A catalogue of small proteins from the global microbiome. bioRxiv 2023.12.27.573469; :doi:`10.1101/2023.12.27.573469`.
- Duan, Y., Santos-Junior, C. D., Schmidt, T.S., Fullam, A., de Almeida, B. L. S., Zhu, C., Kuhn, M., Zhao, X.M., Bork, P., Coelho, L. P. A catalogue of small proteins from the global microbiome. bioRxiv 2023.12.27.573469; :doi:`10.1101/2023.12.27.573469`.
- Dimonaco, N. J., Clare, A., Kenobi, K., Aubrey, W., Creevey, C. J. StORF-Reporter: finding genes between genes, Nucleic Acids Research, Volume 51, Issue 21, 27 November 2023, Pages 11504–11517. :doi:`10.1093/nar/gkad814`.
- Reynolds, R., Hyun, S., Tully, B., Bien, J., Levine, N. M. Identification of microbial metabolic functional guilds from large genomic datasets. Front. Microbiol. 14:1197329. :doi:`10.3389/fmicb.2023.1197329`.
- Becker, J. W., Pollak, S., Berta-Thompson, J. W., Becker, K. W., Braakman, R., Dooley, K. D., Hackl, T., Coe, A., Arellano, A., LeGault, K. N., Berube, P. M., Biller, S. J., Cubillos-Ruiz, A., Van Mooy, B. A. S., Chisholm, S. W. Novel isolates expand the physiological diversity of Prochlorococcus and illuminate its macroevolution. bioRxiv 2023.12.03.569780; :doi:`10.1101/2023.12.03.569780`.
Expand Down
41 changes: 22 additions & 19 deletions pyrodigal/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2913,8 +2913,11 @@ cdef class Gene:
cpdef str sequence(self):
"""Build the nucleotide sequence of this predicted gene.
This function takes care of reverse-complementing the sequence
if it is on the reverse strand.
This function takes care of reverse-complementing the gene
sequence if the gene is located on the reverse strand.
Returns:
`str`: The nucleotide sequence of the predicted gene.
Note:
Since Pyrodigal uses a generic symbol for unknown nucleotides,
Expand Down Expand Up @@ -3613,7 +3616,7 @@ cdef class Genes:
`int`: The number of bytes written to the file.
.. versionchanged:: 2.0.0
Replaced optional``prefix`` argument with ``sequence_id``.
Replaced optional ``prefix`` argument with ``sequence_id``.
.. versionadded:: 3.0.0
The ``include_translation_table`` argument.
Expand Down Expand Up @@ -3786,7 +3789,7 @@ cdef class Genes:
`int`: The number of bytes written to the file.
.. versionchanged:: 2.0.0
Replaced optional``prefix`` argument with ``sequence_id``.
Replaced optional ``prefix`` argument with ``sequence_id``.
.. versionadded:: 3.0.0
The ``include_stop`` argument.
Expand Down Expand Up @@ -4069,20 +4072,7 @@ cdef class TrainingInfo:
return sizeof(_training) + sizeof(self)

def __getstate__(self):
assert self.tinf != NULL
return {
"gc": self.gc,
"translation_table": self.translation_table,
"start_weight": self.start_weight,
"bias": self.bias.tolist(),
"type_weights": self.type_weights.tolist(),
"uses_sd": self.uses_sd,
"rbs_weights": self.rbs_weights.tolist(),
"upstream_compositions": self.upstream_compositions.tolist(),
"motif_weights": self.motif_weights.tolist(),
"missing_motif_weight": self.missing_motif_weight,
"coding_statistics": self.coding_statistics.tolist(),
}
return self.to_dict()

def __setstate__(self, dict state):
cdef int i
Expand Down Expand Up @@ -4907,7 +4897,20 @@ cdef class TrainingInfo:
[2.312, 0.463, 0.226]
"""
return self.__getstate__()
assert self.tinf != NULL
return {
"gc": self.gc,
"translation_table": self.translation_table,
"start_weight": self.start_weight,
"bias": self.bias.tolist(),
"type_weights": self.type_weights.tolist(),
"uses_sd": self.uses_sd,
"rbs_weights": self.rbs_weights.tolist(),
"upstream_compositions": self.upstream_compositions.tolist(),
"motif_weights": self.motif_weights.tolist(),
"missing_motif_weight": self.missing_motif_weight,
"coding_statistics": self.coding_statistics.tolist(),
}

cpdef object dump(self, fp):
"""Write a training info to a file-like handle.
Expand Down

0 comments on commit d828d73

Please sign in to comment.