How To Run Muscle In Batch?
1
2
Entering edit mode
10.2 years ago
biolab ★ 1.4k

Hi everyone,

I am using muscle for multi-sequence alignment. My problem is I have several thousand input files, and need to run them in batch.

    muscle3.8.31_i86linux64 -in a1.fa -out a1.afa
    muscle3.8.31_i86linux64 -in a2.fa -out a2.afa
    ...........
    muscle3.8.31_i86linux64 -in a3000.fa -out a3000.afa

Could anyone help me with a command to run them in batch? Thank you very much!

• 5.2k views
ADD COMMENT
6
Entering edit mode
10.2 years ago

using GNU parallel:

ls *.fa | parallel  muscle3.8.31_i86linux64 -in {} -out {.}.afa

Using make with option -j (not tested):

%.afa:%.fa
    muscle3.8.31_i86linux64 -in $< -out $@

INPUT=$(shell ls *.fa)
.PHONY:all
all: $(patsubst %.fa,%.afa,${INPUT} )
ADD COMMENT
1
Entering edit mode

I have sorted out the problem. Need to install GNU parallele. Thanks!

ADD REPLY
0
Entering edit mode

Thank you! It is really helpful.

ADD REPLY
0
Entering edit mode

Further help needed: bash: parallel: command not found... Thanks a lot!

ADD REPLY
0
Entering edit mode

Hi, I would like to run this but with mafft alingment. I searched in the parallel manual and several variations, I guess this is not an issue with the dot in the replacement string, I removed and it didn't work. The simple strategy is mafft seq.fa > align.fa so I tried ls *.fa | parallel linsi {} > ../{} to throw the results in a folder above. How could I fix this? Thanks

ADD REPLY
0
Entering edit mode

Hi, I would like to run this but with mafft alingment. I searched in the parallel manual and several variations, I guess this is not an issue with the dot in the replacement string, I removed and it didn't work. The simple strategy is mafft seq.fa > align.fa so I tried ls *.fa | parallel linsi {} > ../{} to throw the results in a folder above. How could I fix this? Thanks

ADD REPLY
0
Entering edit mode

Hi,I have a similar question about "ls *.fa | parallel linsi {} > ../{}". Have you solved it ?

ADD REPLY

Login before adding your answer.

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