Hi guys I would like to run wordcount from Emboss in a bunch of fasta files. I tried this:
#!/usr/bin/env python
import sys
import subprocess
filenames = ['Downloads/Data/GCF_000016725.1_chr.fna']
for filename in filenames:
name = filename.split('/')[2]
print(filename)
subprocess.call (['wordcount', 'Input sequence(s): ' + filename, 'Word size [4]: ' + sys.argv[1]])
But I got error messages:
Count and extract unique words in molecular sequence(s)
Error: Failed to open filename 'Input sequence(s): Downloads/Data/GCF_000016725.1_chr.fna'
Error: Unable to read sequence 'Input sequence(s): Downloads/Data/GCF_000016725.1_chr.fna'
Died: wordcount terminated: Bad value for '-sequence' and no prompt
But if a use shell with Downloads/Data/GCF_000016725.1_chr.fna it works fine!
Any tip would be helpful! I am using python, but I would have a method to compare my results!
Thank you by your time!
Paulo