@@ -12,6 +12,7 @@ process HS_METRICS {
12
12
memory params. metrics_memory
13
13
tag " ${ name} "
14
14
publishDir " ${ params.output} /${ name} /metrics/hs_metrics" , mode: " copy"
15
+ publishDir " ${ params.output} /${ name} /" , mode: " copy" , pattern: " software_versions.*"
15
16
16
17
conda (params. enable_conda ? " bioconda::gatk4=4.2.5.0" : null )
17
18
@@ -22,6 +23,7 @@ process HS_METRICS {
22
23
file(" *_metrics" ) optional true
23
24
file(" *.pdf" ) optional true
24
25
file(" ${ name} .hs_metrics.txt" )
26
+ file(" software_versions.${ task.process} .txt" )
25
27
26
28
script:
27
29
minimum_base_quality = params. collect_hs_metrics_min_base_quality ?
@@ -43,6 +45,9 @@ process HS_METRICS {
43
45
--TARGET_INTERVALS my.intervals \
44
46
--BAIT_INTERVALS my.intervals \
45
47
${ minimum_base_quality} ${ minimum_mapping_quality}
48
+
49
+ echo ${ params.manifest} >> software_versions.${ task.process} .txt
50
+ gatk --version >> software_versions.${ task.process} .txt
46
51
"""
47
52
}
48
53
@@ -51,6 +56,7 @@ process METRICS {
51
56
memory params. metrics_memory
52
57
tag " ${ name} "
53
58
publishDir " ${ params.output} /${ name} /metrics/gatk_multiple_metrics" , mode: " copy"
59
+ publishDir " ${ params.output} /${ name} /" , mode: " copy" , pattern: " software_versions.*"
54
60
55
61
// NOTE: the method CollectMultipleMetrics has a hidden dependency to R for making plots
56
62
conda (params. enable_conda ? " bioconda::gatk4=4.2.5.0 r::r=3.6.0" : null )
@@ -61,6 +67,7 @@ process METRICS {
61
67
output:
62
68
file(" *_metrics" ) optional true
63
69
file(" *.pdf" ) optional true
70
+ file(" software_versions.${ task.process} .txt" )
64
71
65
72
"""
66
73
mkdir tmp
@@ -78,6 +85,9 @@ process METRICS {
78
85
--PROGRAM CollectInsertSizeMetrics \
79
86
--PROGRAM CollectSequencingArtifactMetrics \
80
87
--PROGRAM CollectSequencingArtifactMetrics
88
+
89
+ echo ${ params.manifest} >> software_versions.${ task.process} .txt
90
+ gatk --version >> software_versions.${ task.process} .txt
81
91
"""
82
92
}
83
93
@@ -86,6 +96,7 @@ process COVERAGE_ANALYSIS {
86
96
memory params. metrics_memory
87
97
tag " ${ name} "
88
98
publishDir " ${ params.output} /${ name} /metrics/coverage" , mode: " copy"
99
+ publishDir " ${ params.output} /${ name} /" , mode: " copy" , pattern: " software_versions.*"
89
100
90
101
conda (params. enable_conda ? " bioconda::samtools=1.12" : null )
91
102
@@ -95,6 +106,7 @@ process COVERAGE_ANALYSIS {
95
106
output:
96
107
file(" ${ name} .coverage.tsv" )
97
108
file(" ${ name} .depth.tsv" )
109
+ file(" software_versions.${ task.process} .txt" )
98
110
99
111
script:
100
112
minimum_base_quality = params. collect_hs_metrics_min_base_quality ?
@@ -105,5 +117,8 @@ process COVERAGE_ANALYSIS {
105
117
"""
106
118
samtools coverage ${ minimum_base_quality} ${ minimum_mapping_quality} ${ bam} > ${ name} .coverage.tsv
107
119
samtools depth -s -d 0 -H ${ intervals} ${ bam} > ${ name} .depth.tsv
120
+
121
+ echo ${ params.manifest} >> software_versions.${ task.process} .txt
122
+ samtools --version >> software_versions.${ task.process} .txt
108
123
"""
109
124
}
0 commit comments