Last active
July 14, 2017 17:48
-
-
Save mdshw5/b2073cf96f7ef2e54ef3f09495d37f82 to your computer and use it in GitHub Desktop.
biostars 262660
This file contains 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 | |
with Fasta("file_2.fasta") as records: | |
with open("file_1") as content: | |
for line in content: | |
_, ec, filename = line.rstrip().split() | |
with open(filename, "w") as out_file: | |
for record in records: | |
if ec in record.name: | |
out_file.write(repr(record)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment