diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf index e0448bf73fd2fa28615a2988328df95d7a012803..5c186107386c9fc8c9172b89e9537869caab635b 100644 --- a/workflow/rna-seq.nf +++ b/workflow/rna-seq.nf @@ -431,7 +431,7 @@ process inferMetadata { set path (inBam), path (inBai), path (inBamChr) from dedupBam_inferMeta output: - path "infer.csv" into inferedMetadata + path "infer.tsv" into inferedMetadata path "${inBam.baseName}.tin.xls" into tin path "${repRID}.insertSize.inner_distance_freq.txt" optional true into innerDistance @@ -456,7 +456,7 @@ process inferMetadata { percentF=`bash inferMeta.sh sef ${repRID}.rseqc.log` percentR=`bash inferMeta.sh ser ${repRID}.rseqc.log` fi - if [ \$percentF -gt 0.25 ] && [ \$percentR -lt 0.25 ] + if [ 1 -eq \$(echo \$(expr \$percentF ">" 0.25)) ] && [ 1 -eq \$(echo \$(expr \$percentR "<" 0.25)) ] then stranded="forward" if [ \$endness == "PairEnd" ] @@ -465,7 +465,7 @@ process inferMetadata { else strategy="++,--" fi - elif [ \$percentR -gt 0.25 ] && [ \$percentF -lt 0.25 ] + elif [ 1 -eq \$(echo \$(expr \$percentR ">" 0.25)) ] && [ 1 -eq \$(echo \$(expr \$percentF "<" 0.25)) ] then stranded="reverse" if [ \$endness == "PairEnd" ] @@ -487,6 +487,6 @@ process inferMetadata { # write infered metadata to file - echo \${endness},\${stranded},\${strategy},\${percentF},\${percentR},\${fail} > infer.csv + echo -e \${endness}'\\t'\${stranded}'\\t'\${strategy}'\\t'\${percentF}'\\t'\${percentR}'\\t'\${fail} > infer.tsv """ }