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.