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
Release history Release notifications | RSS feed
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.2.tar.gz
(4.5 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
File details
Details for the file fasta_reader-3.0.2.tar.gz.
File metadata
- Download URL: fasta_reader-3.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71493559a791f355def4918612a3bbd44992f7e1227a61a7d815018aefde4d79
|
|
| MD5 |
83b455a9f0dc589be73ccb17ed9332b8
|
|
| BLAKE2b-256 |
7a02cfc5e470938b59e4c842664ad49733d438cee5ac9f229e45a529c51524c3
|
File details
Details for the file fasta_reader-3.0.2-py3-none-any.whl.
File metadata
- Download URL: fasta_reader-3.0.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31514e8f263416bc28fd87a4d637974629bd2c9e796f27f9647a7d4248e916cc
|
|
| MD5 |
5d14c13cd4f57e03c007439ec3f069dc
|
|
| BLAKE2b-256 |
012420c5113dc8da4e666f1623143955e59e5e76b309e5b6a5a6c8a1b04969c5
|