Error in MuscleCommandline (biopython)
0
0
Entering edit mode
6 weeks ago
Plus • 0

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 change 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?

Bioinformatics Biopython MultipleSequenceAlignment Python • 532 views
ADD COMMENT
0
Entering edit mode

what is clw=" " for? I'm looking at some other examples on Biostars and don't see the inclusion of the clw parameter in the command line.

ADD REPLY
0
Entering edit mode

If you want clustalw output format, wouldn't you also want to use clwout instead of out?

I've not run muscle via Biopython before, but what happens when you try the following:

cmd_line = MuscleCommandline(muscle_exe, input=in_file, clwout=out_file, clw)
ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2046 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