Skip to content

Instantly share code, notes, and snippets.

@mdshw5
Created December 14, 2014 20:36
Show Gist options
  • Save mdshw5/a779d3ac2edc684130a9 to your computer and use it in GitHub Desktop.
Save mdshw5/a779d3ac2edc684130a9 to your computer and use it in GitHub Desktop.
biostars 123787
from pyfaidx import Fasta
ids = [1, 5, 10]
multifasta = Fasta('multifasta.fa')
records = [multifasta[i] for i in ids]
for record in records:
# do something with the fasta entries such as...
print(record.seq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment