Skip to main content

fastasma

A collection of tools for working with FASTA files.

Installation

pip install fastasma

Usage

import fastasma

# Import a FASTA file
source = fstools.ImportFasta("sequences.fasta")

# Annotate sequences
annotated = fstools.AddAnnotationToHeader(
    source,
    annotation_key="organism",
    separator="_",
    position="suffix"
)

# Write output
fstools.WriteFasta(annotated, output_path="output.fasta")

Pipeline example

import fastasma

# Multiple steps can be chained
source = fstools.ImportFasta("input.fasta")
source = fstools.DropAnnotationKeys(source, keys_to_remove=["length"])
source = fstools.AddAnnotationToHeader(source, annotation_key="organism", position="suffix")
source = fstools.Head(source, n=10)
fstools.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.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastasma-0.1.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file fastasma-0.1.1.tar.gz.

File metadata

  • Download URL: fastasma-0.1.1.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

Hashes for fastasma-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8c74a822720995264ad3bad03e5657e38fcfd75f797aeb6da3b58d843b6beea0
MD5 627f68448814169480dcb7f61b5fdedc
BLAKE2b-256 2f5aaf0f817b331fb8681b7cf435df46672adc2f9bf0d3b48e229d2684e28389

See more details on using hashes here.

File details

Details for the file fastasma-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastasma-0.1.1-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

Hashes for fastasma-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe46cd4e7d2e739d5b6aef9a431fb95d94ff97836310bd328124be3142c75790
MD5 1687efd4e2cf3067e02ef4df4d088017
BLAKE2b-256 bcf72f4922a86a0652aa49e1244fe5ba7d16bc6ac1fb44e1e79ecc72919e150b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page