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.4.tar.gz
(9.0 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.4-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file fastasma-0.1.4.tar.gz.
File metadata
- Download URL: fastasma-0.1.4.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0cabedf97ce69cd607cde33d7840cad22cf211761dca6380ba309e73de3609f
|
|
| MD5 |
b1a1deb2dd490688e156ee8d921d8368
|
|
| BLAKE2b-256 |
7aca253ab16c034463ce1b0f96b4110b95fba4ae219634b36991a6562aa93a30
|
File details
Details for the file fastasma-0.1.4-py3-none-any.whl.
File metadata
- Download URL: fastasma-0.1.4-py3-none-any.whl
- Upload date:
- Size: 10.3 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 |
20f0ec26972153002d4aecb579d69c8d279ba4646a985579fb25f7db03542b11
|
|
| MD5 |
4661de21a375b67d934e17172159e5dd
|
|
| BLAKE2b-256 |
5dd7baeb538b6b7932ccd3221f1559318cc91db8a7074b2ae001d44f33081c9d
|