fasta-reader 1.0.3
pip install fasta-reader==1.0.3
Newer version available (3.1.1)
Released:
FASTA file reader/writer.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License
- Author: Danilo Horta
- Requires: Python >=3.8, <4
Classifiers
- License
Project description
fasta-reader-py
FASTA file reader/writer.
Examples
Open a file and loop over its contents.
from fasta_reader import read_fasta
for item in read_fasta("fasta_reader/test/correct1.faa"):
print(item)
# FASTAItem(defline='ID1', sequence='GAGUUA')
# FASTAItem(defline='ID2', sequence='CAUAACAAATT')
# FASTAItem(defline='ID3', sequence='AAGAA')
# FASTAItem(defline='ID4', sequence='AAGAA')
Open a compressed file and show the first item.
from fasta_reader import read_fasta
with read_fasta("fasta_reader/test/protein.faa.gz") as file:
item = file.read_item()
print(item.defline, item.sequence[:10] + "...")
# P01013 GENE X PROTEIN (OVALBUMIN-RELATED) QIKDLLVSSS...
Write to output.faa.gz
.
from fasta_reader import write_fasta
with write_fasta("output.faa.gz") as file:
file.write_item("id1 gene x protein", "AGUTAGA")
file.write_item("id2 gene x protein", "TUUA")
Install
pip install fasta-reader
Author
License
This project is licensed under the MIT License.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License
- Author: Danilo Horta
- Requires: Python >=3.8, <4
Classifiers
- License
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
Built Distribution
File details
Details for the file fasta_reader-1.0.3.tar.gz
.
File metadata
- Download URL: fasta_reader-1.0.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d92fddc10462e03f6228db311603bf8c12e891742f330d17549339b3dc748fe5 |
|
MD5 | 2b023ca424a894c0d1ae3204563843cd |
|
BLAKE2b-256 | 174ce7fefc54e3a64b2b105b33e288efbafa05df970c801be10e6dbb24c6e6aa |
File details
Details for the file fasta_reader-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: fasta_reader-1.0.3-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f85fbd4332ca1912d43d551afe782f14ae5f24bf965245f8661795f585377154 |
|
MD5 | 04ea38ad72457270eda59aa164362b8e |
|
BLAKE2b-256 | 3a9c0f9c3caca564bccf9c63ba5138f6ac902afe1a901c191b37da21dc085553 |