Entering edit mode
10.4 years ago
Bioinformatics_NewComer
▴
330
import re, sys, argparse, os, subprocess
from subprocess import call
from Bio import SeqIO
from Bio import AlignIO
from Bio.Seq import Seq
from Bio.Align.Applications import ClustalwCommandline
for key in store_seq:
fileN=str(key)+".txt" #"1.txt"
call(["touch",fileN])
outFile=str(key)+".fasta" #"1.fasta"
with open(fileN,'w') as f:
f.write(">"+str(store_seq[key])+"\n") # print seq id
f.write(str(chemo_seq[store_seq[key]] )+"\n")#print sequence
f.write( ">"+str(brig_orth[store_seq[key]])+ "\n")
f.write ( str(chemo_seq[brig_orth[store_seq[key]]]) +"\n")
f.write( ">"+str(reman_orth[store_seq[key]]) +"\n" )
f.write( str(chemo_seq[reman_orth[store_seq[key]]]) + "\n")
#run clustalw2 for the file..---> cline=ClustalwCommandline("clustalw2",infile=fileN,type="PROTEIN",output="FASTA",outfile=outFile,quiet)
cline()
#one key ends..
Error:cline=ClustalwCommandline("clustalw2",infile=fileN,type="PROTEIN",output="FASTA",outfile=outFile,quiet)
SyntaxError: non-keyword arg after keyword arg
However, when I run on python shell it runs smoothly. I have clustaw2 in my path. Instead of fileN and outFile, I give file name in double quotes.
Editor using: emacs
This is a duplicate of http://seqanswers.com/forums/showthread.php?p=145887#post145887 - in future please don't ask the same question in multiple places without at least cross referencing.
I apologize for it. I will refrain this in future.