Type hints are specified for the main() method’s first argument and its return type.
NoteUsing the custom app
This is identical to what we did above.
first4 = n_positions(n=4)# we use the alignment defined aboveresult = first4(aln)result
0
a
GCAA
b
..TT
2 x 4 dna alignment
App naming conventions
Use words in lower case separated by underscores (e.g. lower_case) to name your apps. Apps are callable, just like functions, and the PEP8 guidelines specify this naming style.
If you will make your app available on the Python package index, we recommend prefixing each app with your package name. For example, the piqtree2 library distributes apps with names such as piqtree_phylo.
See scinexus documentation for how to add a citation to your app.
How to get the citations for the apps you use
Correctly attributing the authors of algorithms and software is a requirement of good scientific practice. The .citations property on an app instance returns its citations as a tuple.
The .bib property gives the combined BibTeX for the whole pipeline.
print(pipeline.bib)
@software{Doe.2025,
author = {Doe, J and Smith, A},
title = {My Sequence Filter},
year = {2025},
version = {0.1.0},
url = {https://example.com/my-filter},
}
@software{cogent3,
author = {Huttley, Gavin and Caley, Katherine and Fotovat, Nabi and Ma, Stephen Ka-Wah and Koh, Moses and Morris, Richard and McArthur, Robert and McDonald, Daniel and Jaya, Fred and Maxwell, Peter and Martini, James and La, Thomas and Lang, Yapeng},
title = {{cogent3}: making sense of sequence},
year = {2025},
doi = {10.5281/zenodo.16519079},
url = {https://cogent3.org},
}
Note
When a composed pipeline is run via apply_to(), citations are automatically saved in the output data store. See data store citations for how to inspect and export them.