Skip to content

Commit 0388ec8

Browse files
committed
update for addParams deprecation
1 parent 6559480 commit 0388ec8

File tree

5 files changed

+78
-79
lines changed

5 files changed

+78
-79
lines changed

RNAseq/Workflow_Documentation/NF_RCP/workflow_code/conf/runsheet_schema.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,30 @@
88
"properties": {
99
"Sample Name": {
1010
"type": "string",
11-
"description": "Sample Name, added as a prefix to sample-specific processed data output files. Should not include spaces or weird characters."
11+
"description": "Sample Name, added as a prefix to sample-specific processed data output files. Should not include spaces or weird characters.",
12+
"errorMessage": "'Sample Name' must be specified."
1213
},
1314
"has_ERCC": {
1415
"type": "boolean",
15-
"description": "Set to True if ERCC spike-ins are included in the samples. This ensures ERCC normalized DGE is performed in addition to standard DGE."
16+
"description": "Set to True if ERCC spike-ins are included in the samples. This ensures ERCC normalized DGE is performed in addition to standard DGE.",
17+
"errorMessage": "has_ERCC must be specified as true or false in the runsheet."
1618
},
1719
"paired_end": {
1820
"type": "boolean",
19-
"description": "Set to True if the samples were sequenced as paired-end. If set to False, samples are assumed to be single-end."
21+
"description": "Set to True if the samples were sequenced as paired-end. If set to False, samples are assumed to be single-end.",
22+
"errorMessage": "paired_end must be specified as true or false in the runsheet."
2023
},
2124
"organism": {
2225
"type": "string",
23-
"description": "The organism of the samples. This is used to select the appropriate annotation files."
26+
"description": "The organism of the samples. This is used to select the appropriate annotation files.",
27+
"errorMessage": "'organism' must be specified in the runsheet."
2428
},
2529
"read1_path": {
2630
"type": "string",
2731
"pattern": "^\\S+\\.f(ast)?q\\.gz$",
2832
"format": "file-path",
29-
"description": "Location of the raw reads file. For paired-end data, this specifies the forward reads fastq.gz file."
33+
"description": "Location of the raw reads file. For paired-end data, this specifies the forward reads fastq.gz file.",
34+
"errorMessage": "read1_path must be specified in the runsheet."
3035
},
3136
"read2_path": {
3237
"type": "string",

RNAseq/Workflow_Documentation/NF_RCP/workflow_code/modules/md5sum.nf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ process MD5SUM {
1212

1313
input:
1414
path files
15+
val(md5sum_label)
1516

1617
output:
17-
path("${ params.md5sumLabel }_md5sum_GLbulkRNAseq.tsv"), emit: md5sums
18+
path("${ md5sum_label }_md5sum_GLbulkRNAseq.tsv"), emit: md5sums
1819

1920
script:
2021
"""
2122
# Generate raw md5sums
2223
if [ -d "${ files }" ]; then
23-
find "${ files }" -type f -exec md5sum {} \\; > ${ params.md5sumLabel }_md5sum_GLbulkRNAseq.tsv
24+
find "${ files }" -type f -exec md5sum {} \\; > ${ md5sum_label }_md5sum_GLbulkRNAseq.tsv
2425
else
25-
md5sum ${ files } > ${ params.md5sumLabel }_md5sum_GLbulkRNAseq.tsv
26+
md5sum ${ files } > ${ md5sum_label }_md5sum_GLbulkRNAseq.tsv
2627
fi
2728
2829
"""

RNAseq/Workflow_Documentation/NF_RCP/workflow_code/modules/multiqc.nf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ process MULTIQC {
55
path(sample_names)
66
path("mqc_in/*") // any number of multiqc compatible files
77
path(multiqc_config)
8+
val(mqc_label)
89

910

1011
output:
11-
// path("${ params.MQCLabel }_multiqc_GLbulkRNAseq_report.zip"), emit: zipped_report, to do: reimplement zip output w/ cleaned paths
12-
path("${ params.MQCLabel }_multiqc_GLbulkRNAseq_report"), emit: unzipped_report
13-
path("${ params.MQCLabel }_multiqc_GLbulkRNAseq_report.zip"), emit: zipped_report
14-
path("${ params.MQCLabel }_multiqc_GLbulkRNAseq_report/${ params.MQCLabel }_multiqc_GLbulkRNAseq.html"), emit: html
15-
path("${ params.MQCLabel }_multiqc_GLbulkRNAseq_report/${ params.MQCLabel }_multiqc_GLbulkRNAseq_data"), emit: data
12+
// path("${ mqc_label }_multiqc_GLbulkRNAseq_report.zip"), emit: zipped_report, to do: reimplement zip output w/ cleaned paths
13+
path("${ mqc_label }_multiqc_GLbulkRNAseq_report"), emit: unzipped_report
14+
path("${ mqc_label }_multiqc_GLbulkRNAseq_report.zip"), emit: zipped_report
15+
path("${ mqc_label }_multiqc_GLbulkRNAseq_report/${ mqc_label }_multiqc_GLbulkRNAseq.html"), emit: html
16+
path("${ mqc_label }_multiqc_GLbulkRNAseq_report/${ mqc_label }_multiqc_GLbulkRNAseq_data"), emit: data
1617
path("versions.yml"), emit: versions
1718

1819
script:
@@ -21,11 +22,11 @@ process MULTIQC {
2122
multiqc \\
2223
--force \\
2324
--interactive \\
24-
-o ${ params.MQCLabel }_multiqc_GLbulkRNAseq_report \\
25-
-n ${ params.MQCLabel }_multiqc_GLbulkRNAseq \\
25+
-o ${ mqc_label }_multiqc_GLbulkRNAseq_report \\
26+
-n ${ mqc_label }_multiqc_GLbulkRNAseq \\
2627
${ config_arg } \\
2728
.
28-
zip -r '${ params.MQCLabel }_multiqc_GLbulkRNAseq_report.zip' '${ params.MQCLabel }_multiqc_GLbulkRNAseq_report'
29+
zip -r '${ mqc_label }_multiqc_GLbulkRNAseq_report.zip' '${ mqc_label }_multiqc_GLbulkRNAseq_report'
2930
3031
echo '"${task.process}":' > versions.yml
3132
echo " multiqc: \$(multiqc --version | sed "s/multiqc, version //")" >> versions.yml

RNAseq/Workflow_Documentation/NF_RCP/workflow_code/workflows/rnaseq.nf

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ include { REMOVE_RRNA } from '../modules/remove_rrna.nf'
3131
include { QUANTIFY_RSEM_GENES } from '../modules/quantify_rsem_genes.nf'
3232
include { PARSE_QC_METRICS } from '../modules/parse_qc_metrics.nf'
3333

34-
include { MULTIQC as RAW_READS_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"raw")
35-
include { MULTIQC as TRIMMED_READS_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"trimmed")
36-
include { MULTIQC as TRIMMING_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"trimming")
37-
include { MULTIQC as ALIGN_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"align")
38-
include { MULTIQC as GENEBODY_COVERAGE_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"geneBody_cov") //PublishTo: "RSeQC_Analyses/02_geneBody_coverage",
39-
include { MULTIQC as INFER_EXPERIMENT_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"infer_exp") //PublishTo: "RSeQC_Analyses/03_infer_experiment",
40-
include { MULTIQC as INNER_DISTANCE_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"inner_dist") //PublishTo: "RSeQC_Analyses/04_inner_distance",
41-
include { MULTIQC as READ_DISTRIBUTION_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"read_dist") //PublishTo: "RSeQC_Analyses/05_read_distribution",
42-
include { MULTIQC as COUNT_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"RSEM_count")
43-
include { MULTIQC as QUALIMAP_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"qualimap")
44-
include { MULTIQC as ALL_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"all")
34+
include { MULTIQC as RAW_READS_MULTIQC } from '../modules/multiqc.nf'
35+
include { MULTIQC as TRIMMED_READS_MULTIQC } from '../modules/multiqc.nf'
36+
include { MULTIQC as TRIMMING_MULTIQC } from '../modules/multiqc.nf'
37+
include { MULTIQC as ALIGN_MULTIQC } from '../modules/multiqc.nf'
38+
include { MULTIQC as GENEBODY_COVERAGE_MULTIQC } from '../modules/multiqc.nf'
39+
include { MULTIQC as INFER_EXPERIMENT_MULTIQC } from '../modules/multiqc.nf'
40+
include { MULTIQC as INNER_DISTANCE_MULTIQC } from '../modules/multiqc.nf'
41+
include { MULTIQC as READ_DISTRIBUTION_MULTIQC } from '../modules/multiqc.nf'
42+
include { MULTIQC as COUNT_MULTIQC } from '../modules/multiqc.nf'
43+
include { MULTIQC as QUALIMAP_MULTIQC } from '../modules/multiqc.nf'
44+
include { MULTIQC as ALL_MULTIQC } from '../modules/multiqc.nf'
4545
//include { QUALIMAP_BAM_QC } from '../modules/qualimap.nf' not implemented
4646
//include { QUALIMAP_RNASEQ_QC } from '../modules/qualimap.nf' not implemented
4747

@@ -264,16 +264,15 @@ workflow RNASEQ {
264264

265265
// MultiQC
266266
ch_multiqc_config = params.multiqc_config ? Channel.fromPath( params.multiqc_config ) : Channel.fromPath("NO_FILE")
267-
RAW_READS_MULTIQC( samples_txt, raw_fastqc_zip, ch_multiqc_config )
268-
TRIMMING_MULTIQC( samples_txt, trimgalore_reports, ch_multiqc_config )
269-
TRIMMED_READS_MULTIQC( samples_txt, trimmed_fastqc_zip, ch_multiqc_config )
270-
ALIGN_MULTIQC( samples_txt, star_alignment_logs, ch_multiqc_config )
271-
INFER_EXPERIMENT_MULTIQC( samples_txt, INFER_EXPERIMENT.out.log | map { it[1] } | collect, ch_multiqc_config )
272-
GENEBODY_COVERAGE_MULTIQC( samples_txt, GENEBODY_COVERAGE.out.log | map { it[1] } | collect, ch_multiqc_config )
273-
INNER_DISTANCE_MULTIQC( samples_txt, INNER_DISTANCE.out.log | map { it[1] } | collect, ch_multiqc_config )
274-
READ_DISTRIBUTION_MULTIQC( samples_txt, READ_DISTRIBUTION.out.log | map { it[1] } | collect, ch_multiqc_config )
275-
// QUALIMAP_MULTIQC ( samples_txt, qualimap_outputs, ch_multiqc_config )
276-
COUNT_MULTIQC( samples_txt, rsem_counts, ch_multiqc_config )
267+
RAW_READS_MULTIQC(samples_txt, raw_fastqc_zip, ch_multiqc_config, "raw")
268+
TRIMMING_MULTIQC(samples_txt, trimgalore_reports, ch_multiqc_config, "trimming")
269+
TRIMMED_READS_MULTIQC(samples_txt, trimmed_fastqc_zip, ch_multiqc_config, "trimmed")
270+
ALIGN_MULTIQC(samples_txt, star_alignment_logs, ch_multiqc_config, "align")
271+
INFER_EXPERIMENT_MULTIQC(samples_txt, INFER_EXPERIMENT.out.log | map { it[1] } | collect, ch_multiqc_config, "infer_exp")
272+
GENEBODY_COVERAGE_MULTIQC(samples_txt, GENEBODY_COVERAGE.out.log | map { it[1] } | collect, ch_multiqc_config, "geneBody_cov")
273+
INNER_DISTANCE_MULTIQC(samples_txt, INNER_DISTANCE.out.log | map { it[1] } | collect, ch_multiqc_config, "inner_dist")
274+
READ_DISTRIBUTION_MULTIQC(samples_txt, READ_DISTRIBUTION.out.log | map { it[1] } | collect, ch_multiqc_config, "read_dist")
275+
COUNT_MULTIQC(samples_txt, rsem_counts, ch_multiqc_config, "RSEM_count")
277276
all_multiqc_input = raw_fastqc_zip
278277
| concat( trimgalore_reports )
279278
| concat( trimmed_fastqc_zip )
@@ -285,7 +284,7 @@ workflow RNASEQ {
285284
// | concat(qualimap_outputs )
286285
| concat( rsem_counts )
287286
| collect
288-
ALL_MULTIQC( samples_txt, all_multiqc_input, ch_multiqc_config )
287+
ALL_MULTIQC(samples_txt, all_multiqc_input, ch_multiqc_config, "all")
289288

290289
// Parse QC metrics
291290
all_multiqc_output = RAW_READS_MULTIQC.out.data

RNAseq/Workflow_Documentation/NF_RCP/workflow_code/workflows/rnaseq_microbes.nf

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ include { READ_DISTRIBUTION } from '../modules/rseqc.nf'
3131
include { ASSESS_STRANDEDNESS } from '../modules/assess_strandedness.nf'
3232

3333

34-
include { MULTIQC as RAW_READS_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"raw")
35-
include { MULTIQC as TRIMMED_READS_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"trimmed")
36-
include { MULTIQC as TRIMMING_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"trimming")
37-
include { MULTIQC as ALIGN_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"align")
38-
include { MULTIQC as GENEBODY_COVERAGE_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"geneBody_cov") //PublishTo: "RSeQC_Analyses/02_geneBody_coverage",
39-
include { MULTIQC as INFER_EXPERIMENT_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"infer_exp") //PublishTo: "RSeQC_Analyses/03_infer_experiment",
40-
include { MULTIQC as INNER_DISTANCE_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"inner_dist") //PublishTo: "RSeQC_Analyses/04_inner_distance",
41-
include { MULTIQC as READ_DISTRIBUTION_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"read_dist") //PublishTo: "RSeQC_Analyses/05_read_distribution",
42-
include { MULTIQC as COUNT_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"featureCounts")
43-
include { MULTIQC as ALL_MULTIQC } from '../modules/multiqc.nf' addParams(MQCLabel:"all")
34+
include { MULTIQC as RAW_READS_MULTIQC } from '../modules/multiqc.nf'
35+
include { MULTIQC as TRIMMED_READS_MULTIQC } from '../modules/multiqc.nf'
36+
include { MULTIQC as TRIMMING_MULTIQC } from '../modules/multiqc.nf'
37+
include { MULTIQC as ALIGN_MULTIQC } from '../modules/multiqc.nf'
38+
include { MULTIQC as GENEBODY_COVERAGE_MULTIQC } from '../modules/multiqc.nf'
39+
include { MULTIQC as INFER_EXPERIMENT_MULTIQC } from '../modules/multiqc.nf'
40+
include { MULTIQC as INNER_DISTANCE_MULTIQC } from '../modules/multiqc.nf'
41+
include { MULTIQC as READ_DISTRIBUTION_MULTIQC } from '../modules/multiqc.nf'
42+
include { MULTIQC as COUNT_MULTIQC } from '../modules/multiqc.nf'
43+
include { MULTIQC as ALL_MULTIQC } from '../modules/multiqc.nf'
4444

4545
// include { QUALIMAP_BAM_QC } from '../modules/qualimap.nf'
4646
// include { QUALIMAP_RNASEQ_QC } from '../modules/qualimap.nf'
@@ -58,8 +58,8 @@ include { ADD_GENE_ANNOTATIONS } from '../modules/add_gene_annotations.nf'
5858

5959
include { SOFTWARE_VERSIONS } from '../modules/software_versions.nf'
6060

61-
include { MD5SUM as RAW_MD5SUM } from '../modules/md5sum.nf' addParams(md5sumLabel:"raw")
62-
include { MD5SUM as PROCESSED_MD5SUM } from '../modules/md5sum.nf' addParams(md5sumLabel:"processed")
61+
include { MD5SUM as RAW_MD5SUM } from '../modules/md5sum.nf'
62+
include { MD5SUM as PROCESSED_MD5SUM } from '../modules/md5sum.nf'
6363

6464
include { validateParameters; paramsSummaryLog; samplesheetToList } from 'plugin/nf-schema'
6565

@@ -118,7 +118,7 @@ workflow RNASEQ_MICROBES {
118118
ch_isa_versions = ISA_TO_RUNSHEET.out.versions // Capture version if ISA_TO_RUNSHEET runs
119119
}
120120

121-
// Validate input parameters
121+
// Validate input parameters
122122
validateParameters()
123123

124124
// Print summary of supplied parameters
@@ -127,7 +127,7 @@ workflow RNASEQ_MICROBES {
127127
// | concat(y)
128128
// | collect
129129
// )
130-
130+
131131
PARSE_RUNSHEET( runsheet_path )
132132

133133
samples = PARSE_RUNSHEET.out.samples
@@ -284,30 +284,15 @@ workflow RNASEQ_MICROBES {
284284

285285
// MultiQC
286286
ch_multiqc_config = params.multiqc_config ? Channel.fromPath( params.multiqc_config ) : Channel.fromPath("NO_FILE")
287-
RAW_READS_MULTIQC( samples_txt, raw_fastqc_zip, ch_multiqc_config )
288-
TRIMMING_MULTIQC( samples_txt, trimgalore_reports, ch_multiqc_config )
289-
TRIMMED_READS_MULTIQC( samples_txt, trimmed_fastqc_zip, ch_multiqc_config )
290-
ALIGN_MULTIQC( samples_txt, bowtie2_alignment_logs, ch_multiqc_config )
291-
292-
INFER_EXPERIMENT_MULTIQC( samples_txt, INFER_EXPERIMENT.out.log | map { it[1] } | collect, ch_multiqc_config )
293-
GENEBODY_COVERAGE_MULTIQC( samples_txt, GENEBODY_COVERAGE.out.log | map { it[1] } | collect, ch_multiqc_config )
294-
INNER_DISTANCE_MULTIQC( samples_txt, INNER_DISTANCE.out.log | map { it[1] } | collect, ch_multiqc_config )
295-
READ_DISTRIBUTION_MULTIQC( samples_txt, READ_DISTRIBUTION.out.log | map { it[1] } | collect, ch_multiqc_config )
296-
297-
COUNT_MULTIQC( samples_txt, FEATURECOUNTS.out.summary, ch_multiqc_config )
298-
299-
all_multiqc_input = raw_fastqc_zip
300-
| concat( trimgalore_reports )
301-
| concat( trimmed_fastqc_zip )
302-
| concat( bowtie2_alignment_logs )
303-
| concat( INFER_EXPERIMENT.out.log | map { it[1] } | collect )
304-
| concat( GENEBODY_COVERAGE.out.log | map { it[1] } | collect )
305-
| concat( INNER_DISTANCE.out.log | map { it[1] } | collect )
306-
| concat( READ_DISTRIBUTION.out.log | map { it[1] } | collect )
307-
// | concat(qualimap_outputs )
308-
| concat( FEATURECOUNTS.out.summary )
309-
| collect
310-
ALL_MULTIQC( samples_txt, all_multiqc_input, ch_multiqc_config )
287+
RAW_READS_MULTIQC(samples_txt, raw_fastqc_zip, ch_multiqc_config, "raw")
288+
TRIMMING_MULTIQC(samples_txt, trimgalore_reports, ch_multiqc_config, "trimming")
289+
TRIMMED_READS_MULTIQC(samples_txt, trimmed_fastqc_zip, ch_multiqc_config, "trimmed")
290+
ALIGN_MULTIQC(samples_txt, bowtie2_alignment_logs, ch_multiqc_config, "align")
291+
INFER_EXPERIMENT_MULTIQC(samples_txt, INFER_EXPERIMENT.out.log | map { it[1] } | collect, ch_multiqc_config, "infer_exp")
292+
GENEBODY_COVERAGE_MULTIQC(samples_txt, GENEBODY_COVERAGE.out.log | map { it[1] } | collect, ch_multiqc_config, "geneBody_cov")
293+
INNER_DISTANCE_MULTIQC(samples_txt, INNER_DISTANCE.out.log | map { it[1] } | collect, ch_multiqc_config, "inner_dist")
294+
READ_DISTRIBUTION_MULTIQC(samples_txt, READ_DISTRIBUTION.out.log | map { it[1] } | collect, ch_multiqc_config, "read_dist")
295+
COUNT_MULTIQC(samples_txt, FEATURECOUNTS.out.summary, ch_multiqc_config, "featureCounts")
311296

312297
// Software Version Capturing
313298
nf_version = '"NEXTFLOW":\n nextflow: '.concat("${nextflow.version}\n")
@@ -345,9 +330,17 @@ workflow RNASEQ_MICROBES {
345330

346331

347332
// Generate md5sums for raw and processed data
348-
RAW_MD5SUM( STAGE_RAW_READS.out.ch_all_raw_reads
349-
| concat (RAW_READS_MULTIQC.out.zipped_report) // to do: reimplement zip output w/ cleaned paths
350-
| collect)
333+
RAW_MD5SUM(
334+
STAGE_RAW_READS.out.ch_all_raw_reads
335+
| concat (RAW_READS_MULTIQC.out.zipped_report)
336+
| collect,
337+
"raw"
338+
)
339+
340+
// PROCESSED_MD5SUM(
341+
// y, // your processed files channel
342+
// "processed"
343+
// )
351344

352345

353346

0 commit comments

Comments
 (0)