Created
July 4, 2014 11:36
-
-
Save mdshw5/83ff25e4ad8814f9b3a1 to your computer and use it in GitHub Desktop.
biostars 105388
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyfaidx import Fasta, wrap_sequence | |
fa = Fasta('multi.fasta') | |
for seq in fa: | |
with open('{}.fa'.format(seq.name), 'w') as out: | |
out.write('>{}\n'.format(seq.name)) | |
for line in wrap_sequence(70, str(seq)): | |
out.write(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment