Skip to content

Commit

Permalink
BINF-494: add individual pon workflow (#19)
Browse files Browse the repository at this point in the history
* BINF-494: add individual pon workflow
* BINF-494: fix workflow
* BINF-494: update base image
* BINF-494: add option to skip download some reference for pon
* BINF-494: fix prefix
* BINF-494: fix download when skipping
* BINF-494: fix workflow input source
  • Loading branch information
Shenglai authored Apr 6, 2022
1 parent 270e9db commit 96348a5
Show file tree
Hide file tree
Showing 10 changed files with 562 additions and 49 deletions.
18 changes: 7 additions & 11 deletions example/gatk4.2.4.1_mutect2_tumor_only.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{
"has_normal": [],
"output_prefix": "0708_test_full",
"output_prefix": "pon_test_full",
"java_heap": "30G",
"chunk_java_heap": "8G",
"nthreads": 4,
"reference": {"class": "File", "path": "/mnt/SCRATCH/reference/GRCh38.d1.vd1.fa"},
"reference_image": {"class": "File", "path": "/mnt/SCRATCH/reference/GRCh38.d1.vd1.fa.img"},
"common_variant_reference": {"class": "File", "path": "/mnt/SCRATCH/reference/gnomad.genomes.r2.1.1.sites.liftover_grch38.pass.no_decoy.af_only.biallelicvcf.gz"},
"reference": {"class": "File", "path": "/mnt/SCRATCH/reference/hwf/GRCh38.d1.vd1.fa"},
"intervals": {"class": "File", "path": "/mnt/SCRATCH/reference/intervals.bed"},
"tumor_bam": {"class": "File", "path": "/mnt/SCRATCH/playground/C500.TCGA-HQ-A5ND-01A-11D-A26M-08.4_gdc_realn.bam"},
"f1r2_tar_gz": true,
"bam_output": true,
"genotype_pon_sites": true,
"germline_resource": {"class": "File", "path": "/mnt/SCRATCH/reference/gnomad.genomes.r2.1.1.sites.liftover_grch38.pass.no_decoy.af_only.vcf.gz"},
"panel_of_normals": {"class": "File", "path": "/mnt/SCRATCH/reference/gatk4.1.2.tcga.4136.pon.vcf.gz"},
"call_on_all": true
"input": [{"class": "File", "path": "/mnt/SCRATCH/playground/bam_files/C500.TCGA-HQ-A5ND-01A-11D-A26M-08.4_gdc_realn.bam"}],
"f1r2_tar_gz": false,
"bam_output": false,
"call_on_all": false,
"max_mnp_distance": 0
}
2 changes: 1 addition & 1 deletion gatk4-mutect2-calling-cwl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/ncigdc/bio-alpine:py36
FROM quay.io/ncigdc/bio-alpine:py36-8dee591

ARG WORKFLOW

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ requirements:
inputs:
###CONDITIONAL_INPUTS###
has_normal: int[]
pon_calling: int[]
###BIOCLIENT_INPUTS###
bioclient_config: File
tumor_gdc_id: string
Expand Down Expand Up @@ -207,6 +208,7 @@ steps:
preparation:
run: ../utils-cwl/subworkflow/preparation_workflow.cwl
in:
pon_calling: pon_calling
bioclient_config: bioclient_config
has_normal: has_normal
tumor_gdc_id: tumor_gdc_id
Expand Down
2 changes: 1 addition & 1 deletion gatk4-mutect2-tumor-only-cwl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/ncigdc/bio-alpine:py36
FROM quay.io/ncigdc/bio-alpine:py36-8dee591

ARG WORKFLOW

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ requirements:
inputs:
###CONDITIONAL_INPUTS###
has_normal: int[]
pon_calling: int[]
###BIOCLIENT_INPUTS###
bioclient_config: File
tumor_gdc_id: string
Expand Down Expand Up @@ -207,6 +208,7 @@ steps:
preparation:
run: ../utils-cwl/subworkflow/preparation_workflow.cwl
in:
pon_calling: pon_calling
bioclient_config: bioclient_config
has_normal: has_normal
tumor_gdc_id: tumor_gdc_id
Expand Down
17 changes: 17 additions & 0 deletions gatk4-pon-cwl/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM quay.io/ncigdc/bio-alpine:py36-8dee591

ARG WORKFLOW

COPY ./${WORKFLOW} /opt
# TODO: Copy additional directories as needed
COPY ./tools /tools
COPY ./utils-cwl /utils-cwl
COPY ./subworkflows /subworkflows

RUN make -C /opt init-pip

WORKDIR /opt

ENTRYPOINT ["make"]

CMD ["pack"]
72 changes: 72 additions & 0 deletions gatk4-pon-cwl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# quay repo not git repo
REPO = gatk4-pon-cwl
# TODO: Replace me
ENTRY_CWL = "gpas_gatk4.2.4.1_mutect2_pon_workflow.cwl"

VERSION := $(shell date -u +"%Y%m%dT%H%MZ")
COMMIT_HASH:=$(shell git rev-parse HEAD)

DOCKER_REPO := quay.io/ncigdc
DOCKER_IMAGE_COMMIT := ${DOCKER_REPO}/${REPO}:${COMMIT_HASH}
DOCKER_IMAGE := ${DOCKER_REPO}/${REPO}:${VERSION}

.PHONY: version version-* name
name:
@echo ${WORKFLOW_NAME}

version:
@echo --- VERSION: ${VERSION} ---

version-docker:
@echo ${DOCKER_IMAGE_COMMIT}
@echo ${DOCKER_IMAGE}

.PHONY: docker-*
docker-login:
@echo
docker login -u="${QUAY_USERNAME}" -p="${QUAY_PASSWORD}" quay.io


.PHONY: build build-* clean init init-* lint requirements run version
init: init-pip

init-pip:
@echo
@echo -- Installing pip packages --
pip3 install --no-cache-dir cwltool==1.0.20180306163216

.PHONY: pack pack-%
pack:
@python -m cwltool --pack "${ENTRY_CWL}"

run:
@docker run --rm ${DOCKER_IMAGE_COMMIT} pack ENTRY_CWL=/opt/${ENTRY_CWL}

.PHONY: validate validate-*
validate:
@python -m cwltool --validate "${ENTRY_CWL}"

validate-docker:
@docker run --rm ${DOCKER_IMAGE_COMMIT} validate ENTRY_CWL=/opt/${ENTRY_CWL}

.PHONY: build build-*
build: build-docker

build-docker:
@echo
@echo -- Building docker --
docker build .. \
--file ./Dockerfile \
--build-arg WORKFLOW=${WORKFLOW_NAME} \
-t "${DOCKER_IMAGE_COMMIT}"


.PHONY: publish publish-release
publish:
docker push ${DOCKER_IMAGE_COMMIT}

publish-staging: publish

publish-release: publish
docker tag ${DOCKER_IMAGE_COMMIT} ${DOCKER_IMAGE}
docker push ${DOCKER_IMAGE}
Loading

0 comments on commit 96348a5

Please sign in to comment.