parallel program for running a command for several files
0
0
Entering edit mode
8.4 years ago

Hi I have a command to run a module in software Homer the command is the following

findMotifsGenome.pl ERCreInput mm10 motifs/instance/  -find motifs/motif1.motif > motifs/instance/motif1.motif.txt

I want to run the above command using parallel program for several files that are contained in folder motifs/. The files are starting with names motif1.motif and so on. I want to output the files in motifs/instance/motif1.motif.txt. I tried out the following

parallel 'findMotifsGenome.pl ERCreInput mm10 motifs/instance/ -find motifs/{} > motifs/instance/{.}.txt' ::: *.motif

Somehow it is not working can anyone please give me suggestion how correct the code so that it works

parallel • 2.9k views
ADD COMMENT
0
Entering edit mode

Does it throw an error message or just fails? make sure you use parallel correctly, there are several versions with different usage

ADD REPLY
3
Entering edit mode

Type parallel --version and check that you are using GNU parallel by Ole Tange. You should get something like this:

$ parallel --version
GNU parallel 20160422
Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016
Ole Tange and Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
GNU parallel comes with no warranty.

Web site: http://www.gnu.org/software/parallel

When using programs that use GNU Parallel to process data for publication
please cite as described in 'parallel --citation'.

Otherwise you are using the bash parallel command from moreutils, which has a different syntax.

ADD REPLY
0
Entering edit mode

So in my case i getting the following error Reading input files... 11466 total sequences read !!! Couldn't open motif file: motifs/*.motif !!! Finding instances of 0 motif(s) so somehow the motifs file are not detected using the above command

ADD REPLY
0
Entering edit mode

Can you type the following:

parallel --version
ADD REPLY
0
Entering edit mode

GNU parallel 20160422 Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Ole Tange and Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. GNU parallel comes with no warranty.

Web site: http://www.gnu.org/software/parallel

When using programs that use GNU Parallel to process data for publication please cite as described in 'parallel --citation'.

ADD REPLY
0
Entering edit mode

So in my case i am getting the following error Reading input files... 11466 total sequences read !!! Couldn't open motif file: motifs/*.motif !!! Finding instances of 0 motif(s) so somehow the motifs file are not detected using the above command

ADD REPLY
0
Entering edit mode

It looks like you are not in the correct folder? Parallel is replacing {} with *.motif because there aren't any files in your current folder that matches *.motif.

ADD REPLY

Login before adding your answer.

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