Dynamic string replacement issue in parallel for repair.sh bbmap
0
0
Entering edit mode
3.4 years ago

Hi,

I have many fastq files that I need to repair using repair.sh from bbmap. The filenames are in the format:

AA-60E-76D8.clean.R1.fastq.gz
AA-60E-76D8.clean.R2.fastq.gz

I tried using parallel in the following way as suggested in a previous post.

parallel echo {} {=s/R1/R2/=} ::: *R1.fastq.gz | parallel 'repair.sh in1={} in2={} out1={}.repd.R1.fastq.gz out2={}.repd.R2.fastq.gz outs={}.singletons.fastq.gz repair'

The error I get is the following:

java -ea -Xmx158008m -cp /home/nagaraap/.conda/envs/bbmap/opt/bbmap-38.87-0/current/ jgi.SplitPairsAndSingles rp in1=AA-60E-76D8.clean.R1.fastq.gz AA-60E-76D8.clean.R2.fastq.gz in2=AA-60E-76D8.clean.R1.fastq.gz AA-60E-76D8.clean.R2.fastq.gz out1=AA-60E-76D8.clean.R1.fastq.gz AA-60E-76D8.clean.R2.fastq.gz.repd.R1.fastq.gz out2=AA-60E-76D8.clean.R1.fastq.gz AA-60E-76D8.clean.R2.fastq.gz.repd.R2.fastq.gz outs=AA-60E-76D8.clean.R1.fastq.gz AA-60E-76D8.clean.R2.fastq.gz.singletons.fastq.gz repair

As shown here, the in1 and in2 gets both the values R1, R2 as space separated value. In all the parameters, the sample name is not captured but the entire output of first echo{}.

parallel --version

GNU parallel 20160222

What is the error here?

Thanks in advance.

bbmap gnu-parallel • 923 views
ADD COMMENT
2
Entering edit mode

For future reference:

$ ls *.gz
AA-60E-76D8.clean.R1.fastq.gz  AA-60E-76D8.clean.R2.fastq.gz

$ parallel --plus --dry-run 'repair.sh in1={} in2={=s/R1/R2/=} out1={=s/R1/fixed.R1/=} out2={=s/R1/fixed.R2/=} outs={%.R1.fastq.gz}.singletons.fastq.gz repair' ::: *R1.fastq.gz

repair.sh in1=AA-60E-76D8.clean.R1.fastq.gz in2=AA-60E-76D8.clean.R2.fastq.gz out1=AA-60E-76D8.clean.fixed.R1.fastq.gz out2=AA-60E-76D8.clean.fixed.R2.fastq.gz outs=AA-60E-76D8.clean.singletons.fastq.gz repair
ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

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