|
1 |
| -/* VV check processes |
2 |
| -* These processes intentional deviate from Nextflow isolation to ensure QC reports |
3 |
| -* are based on files in publish directory and not work directories. |
4 |
| -*/ |
5 |
| - |
6 |
| -// NOTE: first VV step also creates initial VV file that is shared across all vv steps |
7 |
| -// process VV_RAW_READS { |
8 |
| -// label 'VV' |
9 |
| -// // Log publishing |
10 |
| -// publishDir "${ publishdir }", |
11 |
| -// pattern: "test.txt", |
12 |
| -// mode: params.publish_dir_mode |
13 |
| - |
14 |
| -// input: |
15 |
| -// val(publishdir) |
16 |
| -// val(meta) |
17 |
| -// path("Metadata/*_runsheet.csv") // Runsheet |
18 |
| -// path("00-RawData/Fastq/*") // Raw reads |
19 |
| -// path("00-RawData/FastQC_Reports/*") // Raw FastQC reports |
20 |
| -// path("00-RawData/FastQC_Reports/*") // Raw MultiQC report |
21 |
| -// path(dp_tools__NF_RCP) |
22 |
| - |
23 |
| -// output: |
24 |
| -// path("test.txt"), emit: test |
25 |
| - |
26 |
| -// script: |
27 |
| -// """ |
28 |
| -// echo "Meta: ${meta}" > test.txt |
29 |
| -// """ |
30 |
| -// } |
31 | 1 | process VV_RAW_READS {
|
32 |
| - // Log publishing |
| 2 | + // Publish VV log |
33 | 3 | publishDir "${ publishdir }",
|
34 | 4 | pattern: "VV_log.tsv" ,
|
35 | 5 | mode: params.publish_dir_mode,
|
36 | 6 | saveAs: { "VV_Logs/VV_log_${ task.process.replace(":","-") }${ params.assay_suffix }.tsv" }
|
37 |
| - // V&V'ed data publishing |
| 7 | + // Publish VVed data |
38 | 8 | publishDir "${ publishdir }",
|
39 | 9 | pattern: '00-RawData/**',
|
40 | 10 | mode: params.publish_dir_mode
|
41 | 11 |
|
42 | 12 | label 'VV'
|
43 | 13 |
|
44 | 14 | input:
|
| 15 | + path(dp_tools__NF_RCP) |
45 | 16 | val(publishdir)
|
46 | 17 | val(meta)
|
47 |
| - path("VV_INPUT/Metadata/*") // Runsheet |
48 |
| - path("VV_INPUT/00-RawData/Fastq/*") // Raw reads |
49 |
| - path("VV_INPUT/00-RawData/FastQC_Reports/*") // Raw FastQC reports |
50 |
| - path("VV_INPUT/00-RawData/FastQC_Reports/*") // Unzipped Raw MultiQC report |
51 |
| - path("VV_INPUT/00-RawData/FastQC_Reports/*") // Zipped Raw MultiQC report |
52 |
| - path(dp_tools__NF_RCP) |
| 18 | + path(runsheet) // Runsheet |
| 19 | + path("INPUT/raw_fastq/*") // Raw reads |
| 20 | + path("INPUT/raw_fastqc/*") // Raw FastQC reports |
| 21 | + path("INPUT/raw_multiqc/*") // Unzipped Raw MultiQC report |
53 | 22 |
|
54 | 23 | output:
|
55 |
| - path("Metadata/*_runsheet.csv"), emit: VVed_runsheet |
56 | 24 | path("00-RawData/Fastq"), emit: VVed_raw_reads
|
57 | 25 | path("00-RawData/FastQC_Reports/*{_fastqc.html,_fastqc.zip}"), emit: VVed_raw_fastqc
|
58 |
| - path("00-RawData/FastQC_Reports/raw_multiqc${params.assay_suffix}_report"), emit: VVed_raw_unzipped_multiqc_report |
59 |
| - path("00-RawData/FastQC_Reports/raw_multiqc${params.assay_suffix}_report.zip"), emit: VVed_raw_zipped_multiqc_report |
| 26 | + path("00-RawData/FastQC_Reports/raw_multiqc${params.assay_suffix}_report"), emit: VVed_raw_unzipped_multiqc_report |
| 27 | + //path("00-RawData/FastQC_Reports/raw_multiqc${params.assay_suffix}_report.zip"), emit: VVed_raw_zipped_multiqc_report |
60 | 28 | path("VV_log.tsv"), optional: params.skipVV, emit: log
|
61 | 29 |
|
62 | 30 | script:
|
63 | 31 | """
|
64 |
| - # move from VV_INPUT to task directory |
65 |
| - # This allows detection as output files for publishing |
66 |
| - mv VV_INPUT/* . || true |
67 |
| -
|
68 |
| - # Run V&V unless user requests to skip V&V |
69 |
| - if ${ !params.skipVV } ; then |
70 |
| - dpt validation run ${dp_tools__NF_RCP} . Metadata/*_runsheet.csv \\ |
71 |
| - --data-asset-key-sets \\ |
72 |
| - ${ meta.paired_end ? "'demuliplexed paired end raw data,qc reports for paired end raw data'" : "'demuliplexed single end raw data,qc reports for single end raw data'"} \\ |
73 |
| - --run-components \\ |
74 |
| - 'Metadata,Raw Reads,Raw Reads By Sample' \\ |
75 |
| - --max-flag-code ${ params.max_flag_code } \\ |
76 |
| - --output VV_log.tsv |
77 |
| - fi |
| 32 | + mv INPUT/* . || true |
| 33 | + vv.py --assay-type rnaseq \ |
| 34 | + --assay-suffix ${params.assay_suffix} \ |
| 35 | + --runsheet-path ${runsheet} \ |
| 36 | + --outdir ${publishdir} \ |
| 37 | + --paired-end ${meta.paired_end} \ |
| 38 | + --mode microbes \ |
| 39 | + --raw-fastq raw_fastq/ \ |
| 40 | + --raw-fastqc raw_fastqc/ \ |
| 41 | + --raw-multiqc raw_multiqc/ \ |
| 42 | + --run-components raw_reads |
78 | 43 | """
|
79 | 44 | }
|
80 | 45 |
|
|
0 commit comments