File tree 2 files changed +24
-21
lines changed
modules/local/pgs_calculation
2 files changed +24
-21
lines changed Original file line number Diff line number Diff line change 1
1
process CREATE_HTML_REPORT {
2
2
3
- publishDir params. output, mode: ' copy'
3
+ publishDir params. output, mode: ' copy'
4
4
5
- input:
5
+ input:
6
6
path(merged_score)
7
7
path(merged_info)
8
8
path(scores_meta)
9
+ path(estimated_ancestry)
9
10
10
-
11
- output:
11
+ output:
12
12
path " *.html" , emit: html_report
13
13
path " *.coverage.txt" , emit: coverage_report
14
14
15
- """
16
-
17
- pgs-calc report \
18
- --data ${ merged_score} \
19
- --info ${ merged_info} \
20
- --meta ${ scores_meta} \
21
- --out scores.html
22
-
23
- pgs-calc report \
24
- --data ${ merged_score} \
25
- --info ${ merged_info} \
26
- --meta ${ scores_meta} \
27
- --template txt \
28
- --out scores.coverage.txt
29
-
30
- """
15
+ script:
16
+ samples = params. ancestry. enabled ? " --samples ${ estimated_ancestry} " : " "
17
+
18
+ """
19
+ pgs-calc report \
20
+ --data ${ merged_score} \
21
+ --info ${ merged_info} \
22
+ --meta ${ scores_meta} \
23
+ $samples \
24
+ --out scores.html
25
+
26
+ pgs-calc report \
27
+ --data ${ merged_score} \
28
+ --info ${ merged_info} \
29
+ --meta ${ scores_meta} \
30
+ --template txt \
31
+ --out scores.coverage.txt
32
+ """
31
33
32
34
}
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ workflow PGS_CALCULATION {
29
29
CREATE_HTML_REPORT (
30
30
MERGE_CHUNKS_SCORES . out. collect(),
31
31
MERGE_CHUNKS_INFOS . out. collect(),
32
- file(params. pgscatalog. meta, checkIfExists :true )
32
+ file(params. pgscatalog. meta, checkIfExists :true ),
33
+ estimated_ancestry. collect(). ifEmpty([])
33
34
)
34
35
35
36
}
You can’t perform that action at this time.
0 commit comments