I have a question for MuscleCommandline.
When I use a biopython to work multiple sequence alignment using MuslceCommandline, there is an error.
The error is Non-zero return code 1, message 'Invalid command line'.
My code is
from Bio.Align.Applications import MuscleCommandline
muscle_exe = r"C:\Users\user1\Desktop\Bioinformatics_with_biopython\muscle5.1.win64.exe"
in_file = r"C:\Users\user1\Desktop\Bioinformatics_with_biopython\Chapter_7\HBA.all.fasta"
out_file = r"C:\Users\user1\Desktop\Bioinformatics_with_biopython\Chapter_7\HBA.aln"
cmd_line = MuscleCommandline(muscle_exe, input=in_file, out=out_file, clw=" ")
print(cmd_line)
stdout, stderr = cmd_line()
I change the path of muscle5.1.win64.exe and HBA.all.fasta.
And I also changed the letter \
to /
or not using r before the path.
But there was same error.
At last, I have searched my error in google and biostar etc, but there were no questions of MuscleCommandline error which is same as mine.
How can I fix it?
what is
clw=" "
for? I'm looking at some other examples on Biostars and don't see the inclusion of theclw
parameter in the command line.clw is one of the properties of MuscleCommandline that write output in CLUSTALW format
If you want clustalw output format, wouldn't you also want to use
clwout
instead ofout
?I've not run
muscle
via Biopython before, but what happens when you try the following:I don't believe you're using the
clw
flag correctly. Why are you passing it an empty space as a variable? Based on a quick look at the documentation, its simply a boolean switch.I'm using the clw flag correctly. The reason why I'm using an empty space as a variable to clw flag is because the text book was using an empty space as a variable.
I already used a boolean switch, for example clw=True or clw=False, but it didn't work too.
But the real problem was the ClustalwCommandline. MuslceComamndline wasn't work well in my compyter, but ClustalwCommandline was work very well.
Someone can say to me that I don't have to use MuscleCommandline when it doesn't work and use other way which is ClustalwCommandline works if it works well.
But i just want to know what kind of problem induce that the MuscleCommandline didn't work well in my computer. If that wasn't occurred in different computer, than i would use it to do MSA.