-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: implementing second case: run CASE MODE using precomputed model...
- Loading branch information
1 parent
b9857fa
commit 22729c8
Showing
12 changed files
with
666 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
335 changes: 311 additions & 24 deletions
335
snappy_pipeline/workflows/targeted_seq_cnv_calling/__init__.py
Large diffs are not rendered by default.
Oops, something went wrong.
121 changes: 0 additions & 121 deletions
121
snappy_pipeline/workflows/targeted_seq_cnv_calling/gcnv.rules
This file was deleted.
Oops, something went wrong.
86 changes: 86 additions & 0 deletions
86
snappy_pipeline/workflows/targeted_seq_cnv_calling/gcnv_case_mode_with_model.rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# gCNV with CASE MODE using procomputed model. | ||
|
||
|
||
rule targeted_seq_cnv_calling_gcnv_preprocess_intervals: | ||
input: | ||
unpack(wf.get_input_files("gcnv", "preprocess_intervals")), | ||
output: | ||
**wf. get_output_files("gcnv","preprocess_intervals"), | ||
log: | ||
wf.get_log_file("gcnv", "preprocess_intervals"), | ||
wrapper: | ||
wf.wrapper_path("gcnv/preprocess_intervals") | ||
|
||
|
||
rule targeted_seq_cnv_calling_gcnv_coverage: | ||
input: | ||
unpack(wf.get_input_files("gcnv", "coverage")), | ||
output: | ||
**wf. get_output_files("gcnv","coverage"), | ||
params: | ||
args=wf.get_params("gcnv", "coverage"), | ||
log: | ||
wf.get_log_file("gcnv", "coverage"), | ||
wrapper: | ||
wf.wrapper_path("gcnv/coverage") | ||
|
||
|
||
rule targeted_seq_cnv_calling_gcnv_contig_ploidy: | ||
input: | ||
unpack(wf.get_input_files("gcnv", "contig_ploidy_case_mode")), | ||
output: | ||
**wf. get_output_files("gcnv","contig_ploidy_case_mode"), | ||
log: | ||
wf.get_log_file("gcnv", "contig_ploidy_case_mode"), | ||
params: | ||
args=wf.get_params("gcnv", "model"), | ||
wrapper: | ||
wf.wrapper_path("gcnv/contig_ploidy_case_mode") | ||
|
||
|
||
rule targeted_seq_cnv_calling_gcnv_call_cnvs: | ||
input: | ||
unpack(wf.get_input_files("gcnv", "call_cnvs_case_mode")), | ||
output: | ||
**wf. get_output_files("gcnv","call_cnvs_case_mode"), | ||
log: | ||
wf.get_log_file("gcnv", "call_cnvs_case_mode"), | ||
params: | ||
args=wf.get_params("gcnv", "model"), | ||
wrapper: | ||
wf.wrapper_path("gcnv/call_cnvs_case_mode") | ||
|
||
|
||
rule targeted_seq_cnv_calling_gcnv_post_germline_calls: | ||
input: | ||
unpack(wf.get_input_files("gcnv", "post_germline_calls_case_mode")), | ||
output: | ||
**wf. get_output_files("gcnv","post_germline_calls"), | ||
log: | ||
wf.get_log_file("gcnv", "post_germline_calls"), | ||
wrapper: | ||
wf.wrapper_path("gcnv/post_germline_calls") | ||
|
||
|
||
rule targeted_seq_cnv_calling_gcnv_merge_cohort_vcfs: | ||
input: | ||
wf.get_input_files("gcnv", "merge_cohort_vcfs"), | ||
output: | ||
**wf. get_output_files("gcnv","merge_cohort_vcfs"), | ||
log: | ||
wf.get_log_file("gcnv", "merge_cohort_vcfs"), | ||
wrapper: | ||
wf.wrapper_path("gcnv/merge_cohort_vcfs") | ||
|
||
|
||
rule targeted_seq_cnv_calling_gcnv_extract_ped: | ||
input: | ||
unpack(wf.get_input_files("gcnv", "extract_ped")), | ||
output: | ||
**( wf. get_output_files("gcnv","extract_ped")), | ||
log: | ||
wf.get_log_file("gcnv", "extract_ped"), | ||
params: | ||
ped_members=wf.substep_getattr("gcnv", "get_ped_members"), | ||
wrapper: | ||
wf.wrapper_path("gcnv/extract_ped") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
snappy_wrappers/wrappers/gcnv/call_cnvs_case_mode/wrapper.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
from snakemake.shell import shell | ||
|
||
paths_tsv = " ".join(snakemake.input.tsv) | ||
shell( | ||
r""" | ||
set -x | ||
set -euo pipefail | ||
export TMPDIR=$(mktemp -d) | ||
trap "rm -rf $TMPDIR" ERR EXIT | ||
export MKL_NUM_THREADS=16 | ||
export OMP_NUM_THREADS=16 | ||
export THEANO_FLAGS="base_compiledir=$TMPDIR/theano_compile_dir" | ||
gatk GermlineCNVCaller \ | ||
--run-mode CASE \ | ||
$(for tsv in {paths_tsv}; do echo -I $tsv; done) \ | ||
--contig-ploidy-calls $(dirname {snakemake.input.ploidy})/ploidy-calls \ | ||
--model {snakemake.params.args[model]} \ | ||
--output $(dirname {snakemake.output.done}) \ | ||
--output-prefix cnv_calls | ||
""" | ||
) |
8 changes: 8 additions & 0 deletions
8
snappy_wrappers/wrappers/gcnv/contig_ploidy_case_mode/environment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- gatk4 ==4.1.7.0 | ||
- gcnvkernel ==0.7 | ||
- bcftools | ||
- htslib |
19 changes: 19 additions & 0 deletions
19
snappy_wrappers/wrappers/gcnv/contig_ploidy_case_mode/wrapper.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from snakemake.shell import shell | ||
|
||
paths_tsv = " ".join(snakemake.input.tsv) | ||
|
||
shell( | ||
r""" | ||
export THEANO_FLAGS="base_compiledir=$TMPDIR/theano_compile_dir" | ||
set -x | ||
gatk DetermineGermlineContigPloidy \ | ||
--model {snakemake.params.args[model]} \ | ||
$(for tsv in {paths_tsv}; do echo -I $tsv; done) \ | ||
--output $(dirname {snakemake.output}) \ | ||
--output-prefix ploidy | ||
""" | ||
) |
1 change: 1 addition & 0 deletions
1
snappy_wrappers/wrappers/gcnv/post_germline_calls/environment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../environment.yaml |
File renamed without changes.
Oops, something went wrong.