From f606ed669a998df32894fbcc2576249a3c2cade3 Mon Sep 17 00:00:00 2001 From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu> Date: Fri, 23 Jul 2021 11:40:24 -0500 Subject: [PATCH] Add seqtype override --- CHANGELOG.md | 1 + README.md | 2 ++ rna-seq.nf | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a27c94..c24a82f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # v.2.0.1 (indev) **User Facing** * Corrected spelling of inferred (#125) +* Add seqtype force parameter (#131) **Background** * Corrected file search parameters due to name inconsistency (#129) diff --git a/README.md b/README.md index 1c505f9..80c4c65 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ To Run: * eg: `--inputBagForce test_data/bag/Q-Y5F6_inputBag_xxxxxxxx.zip` (must be the expected bag structure, this example will not work because it is a test bag) * `--fastqsForce` utilizes local fastq's instead of downloading from the data-hub (still requires accurate repRID input) * eg: `--fastqsForce 'test_data/fastq/small/Q-Y5F6_1M.R{1,2}.fastq.gz'` (note the quotes around fastq's which must me named in the correct standard [*\*.R1.fastq.gz and/or \*.R2.fastq.gz*] and in the correct order, also consider using `endsForce` if the endness doesn't match submitted value) + * `--seqtypeForce` forces the sequencing type to be mRNAseq, it bypasses a inferred mismatch or an ambiguous error + * eg: `--seqtypeForce 'mRNAseq'` * `--speciesForce` forces the species to be "Mus musculus" or "Homo sapiens", it bypasses a metadata mismatch or an ambiguous species error * eg: `--speciesForce 'Mus musculus'` * `--endsForce` forces the endness to be "se", or "pe", it bypasses a metadata mismatch error diff --git a/rna-seq.nf b/rna-seq.nf index 604fdaf..bbe62c7 100644 --- a/rna-seq.nf +++ b/rna-seq.nf @@ -36,6 +36,7 @@ params.endsForce = "" params.speciesForce = "" params.strandedForce = "" params.spikeForce = "" +params.seqtypeForce = "" // Define tracking input variables params.ci = false @@ -76,6 +77,7 @@ endsForce = params.endsForce speciesForce = params.speciesForce strandedForce = params.strandedForce spikeForce = params.spikeForce +seqtypeForce = params.seqtypeForce email = params.email // Define fixed files and variables @@ -926,6 +928,14 @@ process seqwho { fi fi + # override seqtype if forced + if [ "${params.seqtypeForce}" == "mRNAseq" ] + then + seqtypeError=false + seqtypeError_details="" + echo -e "LOG: seqtype Inferred R1=\${seqtypeR1}; Inferred R2=\${seqtypeR2}; Forced=mRNAseq" >> ${repRID}.seqwho.log + fi + # check for species match error if [ "${speciesMeta}" != "\${speciesInfer}" ] then @@ -2117,7 +2127,7 @@ process aggrQC { ulimit -a >> ${repRID}.aggrQC.log # make run table - if [ "${params.inputBagForce}" == "" ] && [ "${params.fastqsForce}" == "" ] && [ "${params.speciesForce}" == "" ] && [ "${params.strandedForce}" == "" ] && [ "${params.spikeForce}" == "" ] + if [ "${params.inputBagForce}" == "" ] && [ "${params.fastqsForce}" == "" ] && [ "${params.seqtypeForce}" == "" ] && [ "${params.speciesForce}" == "" ] && [ "${params.strandedForce}" == "" ] && [ "${params.spikeForce}" == "" ] then input="default" else @@ -2130,6 +2140,10 @@ process aggrQC { then input=\$(echo \${input} fastq) fi + if [ "${params.seqtypeForce}" == "mRNAseq" ] + then + input=\$(echo \${input} seqtype) + fi if [ "${params.speciesForce}" != "" ] then input=\$(echo \${input} species) -- GitLab