Skip to content

Instantly share code, notes, and snippets.

@H2CO3
Created October 12, 2015 17:46
Show Gist options
  • Save H2CO3/ecb50186556ee3b0e900 to your computer and use it in GitHub Desktop.
Save H2CO3/ecb50186556ee3b0e900 to your computer and use it in GitHub Desktop.
def read_FASTA_file(fname):
with open(fname, "r") as f:
sequs = filter(len, f.read().split(">"))
return ["".join(seq.split("\n")[1:]) for seq in sequs]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment