Question: parallel program for running a command for several files
0
gravatar for prasoon.agarwal
2.8 years ago by
prasoon.agarwal10 wrote:

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 forum • 1.1k views
ADD COMMENTlink modified 2.8 years ago by Asaf5.5k • written 2.8 years ago by prasoon.agarwal10

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

ADD REPLYlink written 2.8 years ago by Asaf5.5k
3

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 REPLYlink modified 2.8 years ago • written 2.8 years ago by Giovanni M Dall'Olio26k

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 REPLYlink written 2.8 years ago by prasoon.agarwal10

Can you type the following:

parallel --version
ADD REPLYlink written 2.8 years ago by Giovanni M Dall'Olio26k

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 REPLYlink written 2.8 years ago by prasoon.agarwal10

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 REPLYlink written 2.8 years ago by prasoon.agarwal10

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 REPLYlink written 2.8 years ago by Damian Kao15k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1116 users visited in the last hour