Skip to content
Snippets Groups Projects
Commit bd3f9cb1 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Make metadata values inputs in downstream processes

parent 7c677cf1
Branches
Tags
2 merge requests!37v0.0.1,!15Resolve "process_align"
Pipeline #5762 failed with stages
in 36 minutes and 58 seconds
...@@ -165,6 +165,13 @@ metadata.splitCsv(sep: ',', header: false).separate( ...@@ -165,6 +165,13 @@ metadata.splitCsv(sep: ',', header: false).separate(
spike, spike,
species species
) )
endsManual.into {
endsManual_trimData
endsManual_alignReads
}
stranded.into {
stranded_alignReads
}
// Exit with no species // Exit with no species
if (species == "") { if (species == "") {
...@@ -187,10 +194,6 @@ if (spike) { ...@@ -187,10 +194,6 @@ if (spike) {
} }
} }
/* /*
* trimData: trims any adapter or non-host sequences from the data * trimData: trims any adapter or non-host sequences from the data
*/ */
...@@ -199,6 +202,7 @@ process trimData { ...@@ -199,6 +202,7 @@ process trimData {
publishDir "${logsDir}", mode: 'copy', pattern: "\${repRID}.trimData.*" publishDir "${logsDir}", mode: 'copy', pattern: "\${repRID}.trimData.*"
input: input:
val endsManual_trimData
file(fastq) from fastqs file(fastq) from fastqs
output: output:
...@@ -212,7 +216,7 @@ process trimData { ...@@ -212,7 +216,7 @@ process trimData {
ulimit -a >>${repRID}.trimData.err ulimit -a >>${repRID}.trimData.err
# trim fastqs # trim fastqs
if [ '${endsManual}' == 'se' ] if [ '${endsManual_trimData}' == 'se' ]
then then
trim_galore --gzip -q 25 --illumina --length 35 --basename ${repRID} -j `nproc` ${fastq[0]} 1>>${repRID}.trimData.log 2>>${repRID}.trimData.err; trim_galore --gzip -q 25 --illumina --length 35 --basename ${repRID} -j `nproc` ${fastq[0]} 1>>${repRID}.trimData.log 2>>${repRID}.trimData.err;
else else
...@@ -229,6 +233,8 @@ process alignReads { ...@@ -229,6 +233,8 @@ process alignReads {
publishDir "${outDir}/aligned", mode: "copy" publishDir "${outDir}/aligned", mode: "copy"
input: input:
val endsManual_alignReads
val stranded_alignReads
path fqs from fastqs_trimmed path fqs from fastqs_trimmed
output: output:
...@@ -236,7 +242,7 @@ process alignReads { ...@@ -236,7 +242,7 @@ process alignReads {
script: script:
""" """
if [ "${endsManual}" == 'pe' ]; then if [ "${endsManual_alignReads}" == 'pe' ]; then
hisat2 -p `nproc` --add-chrname --un-gz ${repRID}.unal.gz -S ${repRID}.sam -x ${reference}/genome -1 ${fqs[0]} -2 ${fqs[1]} 1>${repRID}.align.out 2> ${repRID}.align.err; hisat2 -p `nproc` --add-chrname --un-gz ${repRID}.unal.gz -S ${repRID}.sam -x ${reference}/genome -1 ${fqs[0]} -2 ${fqs[1]} 1>${repRID}.align.out 2> ${repRID}.align.err;
else hisat2 -p `nproc` --add-chrname --un-gz ${repRID}.unal.gz -S ${repRID}.sam -x ${reference}/genome -U ${fqs[0]} 1>${repRID}.align.out 2> ${repRID}.align.err; else hisat2 -p `nproc` --add-chrname --un-gz ${repRID}.unal.gz -S ${repRID}.sam -x ${reference}/genome -U ${fqs[0]} 1>${repRID}.align.out 2> ${repRID}.align.err;
fi; fi;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment