Created
January 14, 2016 03:07
-
-
Save mdshw5/c825d5b23aea777df9ba to your computer and use it in GitHub Desktop.
biostars 172641
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 | |
genes = Fasta('Genome.fasta') | |
with open('chr02_18s', 'w') as f: | |
seqFile = genes['chr02'][146062:148216] | |
f.write('>' + seqFile.name) | |
f.write(seqFile.seq) # or str(seqFile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment