bfasta

Simple fasta reader with no dependencies


Keywords
fasta, genomics, bioinformatics, bio
License
GPL-3.0
Install
pip install bfasta==0.1.1

Documentation

check PyPI version

FastA reader

Very simple fastA reader.

from bfasta import FastAreader

reader = FastAreader("myFile.fa")

# If you want to just read the first entry:
header, seq = next(reader.readFasta())

# Read all the entries
# If you want to read all the entries
for header, seq in reader.readFasta():
    # header and seq are now strings here
    print(header)

Originally by Dr. B.