Off topic:concatenate all my fasta files in a directory into one file with Python
0
0
Entering edit mode
5.9 years ago
benjamin ▴ 10

Hi all, I actually have to cat all my fasta files into directory but with python. In bash command it would be:

cat ./* > newfile

I guess it should be something like that:

with open(new_directory_0035+"/merged.txt", 'w') as f:
    for line in fileinput.input(glob.glob(new_directory_0035+"/*")):
        f.write(line)
    fileinput.close()

but it is still running after 20 minutes, do you know if I wrote something wrong? And it seems to take to much memory as well... Thanks

concatenate python • 619 views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 1492 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6