fastasma
A collection of tools for working with FASTA files.
Installation
pip install fastasma
Usage
import fastasma
# Import a FASTA file
source = fastasma.ImportFasta("sequences.fasta")
# Annotate sequences
annotated = fastasma.AddAnnotationToHeader(
source,
annotation_key="organism",
separator="_",
position="suffix"
)
# Write output
fastasma.WriteFasta(annotated, output_path="output.fasta")
Pipeline example
import fastasma
# Multiple steps can be chained
source = fastasma.ImportFasta("input.fasta")
source = fastasma.DropAnnotationKeys(source, keys_to_remove=["length"])
source = fastasma.AddAnnotationToHeader(source, annotation_key="organism", position="suffix")
source = fastasma.Head(source, n=10)
fastasma.WriteFasta(source, output_path="output.fasta")
Available modules
Importers: ImportFasta, ImportFastas, ImportTSV
Annotators: DropAnnotations, DropAnnotationKeys, AddTaxonomyFromFilename, AddTaxidFromName, AddNameFromTaxid, AddTaxonomicRankFromTaxid, AddAnnotationToHeader
Mutators: Head, Tail, Sample
Writers: WriteFasta, WriteTSV, WriteDB
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastasma-0.1.3.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
fastasma-0.1.3-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file fastasma-0.1.3.tar.gz.
File metadata
- Download URL: fastasma-0.1.3.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7d1a78f9a8c1a27400223829bdade85097566d31915eb6ca10c31da1f4c0375
|
|
| MD5 |
5c6eec539fb12f59c52a6d340fda6fda
|
|
| BLAKE2b-256 |
f73b4e4906ecbc23f7d6e271b2d9da8e36bd4d3f71d31a8c18ce1b0c6e5ce573
|
File details
Details for the file fastasma-0.1.3-py3-none-any.whl.
File metadata
- Download URL: fastasma-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa3b9a6a8d9ef926a0b5d3042df073a9fb44cf51d5d18d975fde375f5904690a
|
|
| MD5 |
df81472c0642471a4b87417f73570d12
|
|
| BLAKE2b-256 |
32a12f10500f01a67613643b05b345cac053c3bfb3b276fac6e2cb2cfabbe2e9
|