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"
print("Severe acute respiratory syndrome coronavirus 2:")
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-2.0.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for fasta_reader-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1a43033dccb7d2a9bdd7eba35e741086d4b22444034fdbf642e7332656d7dcb |
|
MD5 | f67047d6c0d605a60bb17791acac1de3 |
|
BLAKE2b-256 | 8cea5f3b1b6614a58fd49f8a94aceec81ea9fb2d6c0cf5ebd2410ec5ec9118ff |