Skip to content

retospect/bfasta

Repository files navigation

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())
# header and seq are now simple strings
print(header)
print(seq)

# If you want to read all the entries
for header, seq in reader.readFasta():
    print(header)
    # process further

Install

Before trying the code above, in your terminal, type

pip install bfasta

Origins

Originally by Dr. B.

About

Simple fastA reader with no dependencies.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages