Skip to content

Instantly share code, notes, and snippets.

@mdshw5
Created August 8, 2014 16:32
Show Gist options
  • Save mdshw5/5a6bfb56321175fc6c48 to your computer and use it in GitHub Desktop.
Save mdshw5/5a6bfb56321175fc6c48 to your computer and use it in GitHub Desktop.
biostars 108872
from pyfaidx import Fasta
fa = Fasta('multi.fasta', strict_bounds=True)
for seq in fa:
with open('multi.500bp.fasta, 'w') as out:
out.write(seq[:500])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment