Skip to main content

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!

Metadata

Release files for fasta-reader 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fasta-reader 3.1.1
File Size Uploaded
fasta_reader-3.1.1.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fasta-reader 3.1.1
File Interpreter ABI Platform
fasta_reader-3.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / fasta_reader-3.1.1.tar.gz

Download URL fasta_reader-3.1.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a5f089818fb66e44ba410a0832f2026c82c51a9bb719371df3cd78fe26c296d6
BLAKE2b-256 checksum
How to use checksums
8576e14bcee2a9503190695f9b5c9406b8eeb43137f84386de3600d23569d445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.7 Darwin/24.2.0

Release files / fasta_reader-3.1.1-py3-none-any.whl

Download URL fasta_reader-3.1.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2517b3ee7fd93984bd0e7af1875f7362a41f310ab6298082304605a7f5cadbc9
BLAKE2b-256 checksum
How to use checksums
fa6a377acf779355b682162bed15b8ba3a2c11fd024f3e7f66421d26ab38b935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.7 Darwin/24.2.0

Release history Release notifications | RSS feed

This release

3.1.1 This release

2 release files

3.1.0

2 release files

3.0.3

1 release file

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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