Skip to content

Commit 1066cd6

Browse files
authored
Merge pull request #119 from icgc-argo/payload-gen-variant-calling@0.4.0
[release]
2 parents a83163b + 77bcc3a commit 1066cd6

49 files changed

Lines changed: 1460 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.gitignore
2+
.nextflow*
3+
tests
4+
work
5+
outdir
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.7.9
2+
3+
LABEL org.opencontainers.image.source https://github.com/icgc-argo/data-processing-utility-tools
4+
5+
RUN groupadd -g 1000 ubuntu && \
6+
useradd -l -u 1000 -g ubuntu ubuntu && \
7+
install -d -m 0755 -o ubuntu -g ubuntu /home/ubuntu
8+
9+
ENV PATH="/tools:${PATH}"
10+
11+
COPY *.py /tools/
12+
13+
WORKDIR /tools
14+
15+
USER ubuntu
16+
17+
ENTRYPOINT ["/usr/bin/env"]
18+
CMD ["/bin/bash"]
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/usr/bin/env nextflow
2+
3+
/*
4+
* Copyright (c) 2019-2021, Ontario Institute for Cancer Research (OICR).
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Affero General Public License as published
8+
* by the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Affero General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Affero General Public License
17+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
18+
*/
19+
20+
/*
21+
* Author Junjun Zhang <junjun.zhang@oicr.on.ca>
22+
*/
23+
24+
/********************************************************************/
25+
/* this block is auto-generated based on info from pkg.json where */
26+
/* changes can be made if needed, do NOT modify this block manually */
27+
nextflow.enable.dsl = 2
28+
version = '0.4.0' // package version
29+
30+
container = [
31+
'ghcr.io': 'ghcr.io/icgc-argo/data-processing-utility-tools.payload-gen-variant-calling'
32+
]
33+
default_container_registry = 'ghcr.io'
34+
/********************************************************************/
35+
36+
37+
// universal params go here
38+
params.container_registry = ""
39+
params.container_version = ""
40+
params.container = ""
41+
42+
params.cpus = 1
43+
params.mem = 1 // GB
44+
params.publish_dir = "" // set to empty string will disable publishDir
45+
46+
// tool specific parmas go here, add / change as needed
47+
params.normal_analysis = ""
48+
params.tumour_analysis = ""
49+
params.files_to_upload = []
50+
params.wf_name = ""
51+
params.wf_short_name = ""
52+
params.wf_version = ""
53+
54+
55+
process payloadGenVariantCalling {
56+
container "${params.container ?: container[params.container_registry ?: default_container_registry]}:${params.container_version ?: version}"
57+
cpus params.cpus
58+
memory "${params.mem} GB"
59+
publishDir "${params.publish_dir}/${task.process.replaceAll(':', '_')}", mode: "copy", enabled: "${params.publish_dir ? true : ''}"
60+
61+
input:
62+
path normal_analysis
63+
path tumour_analysis
64+
path files_to_upload
65+
val wf_name
66+
val wf_short_name
67+
val wf_version
68+
69+
output:
70+
path "*.payload.json", emit: payload
71+
path "out/*{.tgz,.vcf.gz,.vcf.gz.tbi}", emit: files_to_upload
72+
73+
script:
74+
args_tumour_analysis = !tumour_analysis.empty() ? "-t ${tumour_analysis}" : ""
75+
"""
76+
main.py \
77+
-f ${files_to_upload} \
78+
-n ${normal_analysis} \
79+
-r ${workflow.runName} \
80+
-j ${workflow.sessionId} \
81+
-w ${wf_name} \
82+
-s ${wf_short_name} \
83+
-v ${wf_version} ${args_tumour_analysis}
84+
"""
85+
}
86+
87+
// this provides an entry point for this main script, so it can be run directly without clone the repo
88+
// using this command: nextflow run <git_acc>/<repo>/<pkg_name>/<main_script>.nf -r <pkg_name>.v<pkg_version> --params-file xxx
89+
workflow {
90+
payloadGenVariantCalling(
91+
file(params.normal_analysis),
92+
file(params.tumour_analysis),
93+
Channel.fromPath(params.files_to_upload).collect(),
94+
params.wf_name,
95+
params.wf_short_name,
96+
params.wf_version
97+
)
98+
}

0 commit comments

Comments
 (0)