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.2.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.2-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file fastasma-0.1.2.tar.gz.
File metadata
- Download URL: fastasma-0.1.2.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 |
e23f625a41ed3cb0919bed040e7b14ce58cbf7d1e5a7782896774648c9a0effc
|
|
| MD5 |
eac4beab7714280b17c460343d4834cc
|
|
| BLAKE2b-256 |
a71ecd4ef141394176752e8e27e3b463f63d556ff01e0df82f0e2010b875d23b
|
File details
Details for the file fastasma-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fastasma-0.1.2-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 |
2758654735641a18c8f4e72ab196d0422a313b7274da07c8cbf074004e98eae1
|
|
| MD5 |
e4e0a90ee6769f8f984436b4b2b71fb9
|
|
| BLAKE2b-256 |
ec32cd0fe190ce2faea0e05bdd29fdeb7732871c490c37ec7abf5658c7030c96
|