Skip to main content

FASTA file reader/writer.

Project description

Welcome to fasta-reader 👋

Read and write FASTA file

🏠 Homepage

⚡️ Requirements

  • Python >= 3.9

Install

pip install fasta-reader

Examples

The following example show that it can read a compressed file remotely seamlessly:

from fasta_reader import read_fasta

ROOT = "https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/858/895"
REF = "GCF_009858895.2_ASM985889v3"
FILE = f"{ROOT}/{REF}/{REF}_genomic.fna.gz"

for item in read_fasta(FILE):
    print(item)

We can also write a FASTA file in a compressed format directly:

from fasta_reader import write_fasta

with write_fasta("protein.faa.gz") as file:
    file.write_item("P01013 GENE X PROTEIN", "QIKDLLVSSSTDLDT...")

👤 Author

Show your support

Give a ⭐️ if this project helped you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fasta_reader-3.0.3.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file fasta_reader-3.0.3.tar.gz.

File metadata

  • Download URL: fasta_reader-3.0.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.6 Darwin/23.4.0

File hashes

Hashes for fasta_reader-3.0.3.tar.gz
Algorithm Hash digest
SHA256 aedcf3b7151f8050e7d52069894503c67f63bbcd7f060218948ded1fc09936fb
MD5 0bec854cd2fd232d94eb489e5155c7dc
BLAKE2b-256 407e3bcc81e2402290af04b7533cdf04a8d4190d882f50e99798a3fdf216c059

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page