From 41dbc5d0e8aa864af645f9f5221fca8592cb7949 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 17 May 2017 16:17:43 -0400 Subject: [PATCH] Fixed bug issue #1063, Updated cromwell version in travis.yml to v26, added gCNV wdl files, set up travis testing of the gCNV WDL workflows, created gCNV template input files and gCNV resources directory --- .travis.yml | 10 +- ..._germline_cohort_calling_workflow_wes.json | 19 ++ ..._germline_cohort_calling_workflow_wgs.json | 18 ++ ..._germline_panel_creation_workflow_wes.json | 18 ++ ..._germline_panel_creation_workflow_wgs.json | 17 ++ ...ne_single_sample_calling_workflow_wes.json | 20 ++ ...ne_single_sample_calling_workflow_wgs.json | 19 ++ .../germline/normal_bam_list.tsv | 3 + .../germline/run_cnv_germline_workflows.sh | 27 +++ .../somatic/run_cnv_somatic_workflows.sh | 16 +- ...somatic_tasks.wdl => cnv_common_tasks.wdl} | 16 +- scripts/cnv_wdl/germline/README.md | 88 +++++++++ .../cnv_germline_cohort_calling_workflow.wdl | 87 +++++++++ ...line_cohort_calling_workflow_template.json | 15 ++ .../cnv_germline_panel_creation_workflow.wdl | 180 ++++++++++++++++++ ...line_panel_creation_workflow_template.json | 14 ++ ...ermline_single_sample_calling_workflow.wdl | 147 ++++++++++++++ ...ngle_sample_calling_workflow_template.json | 16 ++ .../germline/resources/contig_annots.tsv | 25 +++ .../homo_sapiens_germline_CN_priors.tsv | 25 +++ ...ens_germline_CN_transition_matrix_XX_X.tsv | 7 + ...ens_germline_CN_transition_matrix_XX_Y.tsv | 3 + ...ens_germline_CN_transition_matrix_XY_X.tsv | 6 + ...ens_germline_CN_transition_matrix_XY_Y.tsv | 7 + ...ermline_CN_transition_matrix_autosomal.tsv | 13 ++ ..._somatic_allele_fraction_pair_workflow.wdl | 2 +- .../cnv_somatic_copy_ratio_bam_workflow.wdl | 8 +- .../somatic/cnv_somatic_pair_workflow.wdl | 4 +- .../somatic/cnv_somatic_panel_workflow.wdl | 10 +- scripts/m2_cromwell_tests/run_m2_wdl.sh | 4 +- .../CoverageModelEMComputeBlock.java | 2 +- .../CoverageModelEMWorkspace.java | 5 +- .../inputs/bams/SM-74NEG_20xy-downsampled.bam | 3 + .../bams/SM-74NEG_20xy-downsampled.bam.bai | 3 + .../inputs/bams/SM-74P2T_20xy-downsampled.bam | 3 + .../bams/SM-74P2T_20xy-downsampled.bam.bai | 3 + .../inputs/bams/SM-74P35_20xy-downsampled.bam | 3 + .../bams/SM-74P35_20xy-downsampled.bam.bai | 3 + .../inputs/ice_targets_chr20xy.tsv | 3 + .../inputs/sex_genotypes.tsv | 3 + .../bias_covariates_ARD_coefficients.tsv | 3 + .../mean_bias_covariates_matrix.tsv | 3 + .../mean_bias_covariates_norm2.tsv | 3 + .../target_specific_mean_log_bias.tsv | 3 + .../target_specific_unexplained_variance.tsv | 3 + .../inputs/wes_pon/model_final/targets.tsv | 3 + ...as_covariates_ARD_coefficients_history.tsv | 3 + .../copy_ratio_Viterbi_matrix.tsv | 3 + ...y_ratio_max_likelihood_estimate_matrix.tsv | 3 + .../copy_ratio_precision_matrix.tsv | 3 + .../log_likelihood_history.tsv | 3 + .../sample_bias_latent_posteriors.tsv | 3 + .../sample_log_likelihoods.tsv | 3 + .../sample_read_depth_posteriors.tsv | 3 + .../sample_specific_unexplained_variance.tsv | 3 + .../posteriors_final/segments/SM-74NEG.seg | 3 + .../posteriors_final/segments/SM-74P2T.seg | 3 + .../posteriors_final/segments/SM-74P35.seg | 3 + .../wes_pon/posteriors_final/targets.tsv | 3 + .../total_covariate_bias_matrix.tsv | 3 + .../total_unexplained_variance_matrix.tsv | 3 + .../bias_covariates_ARD_coefficients.tsv | 3 + .../mean_bias_covariates_matrix.tsv | 3 + .../mean_bias_covariates_norm2.tsv | 3 + .../target_specific_mean_log_bias.tsv | 3 + .../target_specific_unexplained_variance.tsv | 3 + .../inputs/wgs_pon/model_final/targets.tsv | 3 + ...as_covariates_ARD_coefficients_history.tsv | 3 + .../copy_ratio_Viterbi_matrix.tsv | 3 + ...y_ratio_max_likelihood_estimate_matrix.tsv | 3 + .../copy_ratio_precision_matrix.tsv | 3 + .../log_likelihood_history.tsv | 3 + .../sample_bias_latent_posteriors.tsv | 3 + .../sample_log_likelihoods.tsv | 3 + .../sample_read_depth_posteriors.tsv | 3 + .../sample_specific_unexplained_variance.tsv | 3 + .../posteriors_final/segments/SM-74NEG.seg | 3 + .../posteriors_final/segments/SM-74P2T.seg | 3 + .../posteriors_final/segments/SM-74P35.seg | 3 + .../wgs_pon/posteriors_final/targets.tsv | 3 + .../total_covariate_bias_matrix.tsv | 3 + .../total_unexplained_variance_matrix.tsv | 3 + .../Homo_sapiens_assembly19.truncated.dict | 3 + .../Homo_sapiens_assembly19.truncated.fasta | 3 + ...omo_sapiens_assembly19.truncated.fasta.fai | 3 + .../resources/contig_annots.tsv | 3 + .../homo_sapiens_germline_CN_priors.tsv | 3 + ...ens_germline_CN_transition_matrix_XX_X.tsv | 3 + ...ens_germline_CN_transition_matrix_XX_Y.tsv | 3 + ...ens_germline_CN_transition_matrix_XY_X.tsv | 3 + ...ens_germline_CN_transition_matrix_XY_Y.tsv | 3 + ...ermline_CN_transition_matrix_autosomal.tsv | 3 + 92 files changed, 998 insertions(+), 33 deletions(-) create mode 100755 scripts/cnv_cromwell_tests/germline/cnv_germline_cohort_calling_workflow_wes.json create mode 100755 scripts/cnv_cromwell_tests/germline/cnv_germline_cohort_calling_workflow_wgs.json create mode 100755 scripts/cnv_cromwell_tests/germline/cnv_germline_panel_creation_workflow_wes.json create mode 100755 scripts/cnv_cromwell_tests/germline/cnv_germline_panel_creation_workflow_wgs.json create mode 100755 scripts/cnv_cromwell_tests/germline/cnv_germline_single_sample_calling_workflow_wes.json create mode 100755 scripts/cnv_cromwell_tests/germline/cnv_germline_single_sample_calling_workflow_wgs.json create mode 100755 scripts/cnv_cromwell_tests/germline/normal_bam_list.tsv create mode 100644 scripts/cnv_cromwell_tests/germline/run_cnv_germline_workflows.sh rename scripts/cnv_wdl/{somatic/cnv_somatic_tasks.wdl => cnv_common_tasks.wdl} (89%) mode change 100644 => 100755 create mode 100644 scripts/cnv_wdl/germline/README.md create mode 100755 scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow.wdl create mode 100755 scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow_template.json create mode 100755 scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow.wdl create mode 100755 scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow_template.json create mode 100755 scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow.wdl create mode 100755 scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow_template.json create mode 100755 scripts/cnv_wdl/germline/resources/contig_annots.tsv create mode 100755 scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_priors.tsv create mode 100755 scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv create mode 100755 scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv create mode 100755 scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv create mode 100755 scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv create mode 100755 scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74NEG_20xy-downsampled.bam create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74NEG_20xy-downsampled.bam.bai create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74P2T_20xy-downsampled.bam create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74P2T_20xy-downsampled.bam.bai create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74P35_20xy-downsampled.bam create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74P35_20xy-downsampled.bam.bai create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/ice_targets_chr20xy.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/sex_genotypes.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/model_final/bias_covariates_ARD_coefficients.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/model_final/mean_bias_covariates_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/model_final/mean_bias_covariates_norm2.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/model_final/target_specific_mean_log_bias.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/model_final/target_specific_unexplained_variance.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/model_final/targets.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/bias_covariates_ARD_coefficients_history.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/copy_ratio_Viterbi_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/copy_ratio_max_likelihood_estimate_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/copy_ratio_precision_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/log_likelihood_history.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/sample_bias_latent_posteriors.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/sample_log_likelihoods.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/sample_read_depth_posteriors.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/sample_specific_unexplained_variance.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/segments/SM-74NEG.seg create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/segments/SM-74P2T.seg create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/segments/SM-74P35.seg create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/targets.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/total_covariate_bias_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/posteriors_final/total_unexplained_variance_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/model_final/bias_covariates_ARD_coefficients.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/model_final/mean_bias_covariates_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/model_final/mean_bias_covariates_norm2.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/model_final/target_specific_mean_log_bias.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/model_final/target_specific_unexplained_variance.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/model_final/targets.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/bias_covariates_ARD_coefficients_history.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/copy_ratio_Viterbi_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/copy_ratio_max_likelihood_estimate_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/copy_ratio_precision_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/log_likelihood_history.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/sample_bias_latent_posteriors.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/sample_log_likelihoods.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/sample_read_depth_posteriors.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/sample_specific_unexplained_variance.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/segments/SM-74NEG.seg create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/segments/SM-74P2T.seg create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/segments/SM-74P35.seg create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/targets.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/total_covariate_bias_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/posteriors_final/total_unexplained_variance_matrix.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.dict create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta.fai create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/contig_annots.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_priors.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv create mode 100755 src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv diff --git a/.travis.yml b/.travis.yml index 22352dc196e..c4526735811 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ env: - TEST_TYPE=unit TEST_DOCKER=true TEST_VERBOSITY=minimal - RUN_CNV_SOMATIC_WDL=true - RUN_M2_WDL=true + - RUN_CNV_GERMLINE_WDL=true global: #for genomics db - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/dependencies/libcsv/.libs @@ -73,8 +74,8 @@ before_install: sudo Rscript scripts/docker/gatkbase/install_R_packages.R; fi # Download Cromwell jar -- if [[ $RUN_CNV_SOMATIC_WDL == true || $RUN_M2_WDL == true ]]; then - wget -O ~/cromwell-0.25.jar https://github.com/broadinstitute/cromwell/releases/download/25/cromwell-25.jar; +- if [[ $RUN_CNV_SOMATIC_WDL == true || $RUN_M2_WDL == true || $RUN_CNV_GERMLINE_WDL == true ]]; then + wget -O ~/cromwell-0.26.jar https://github.com/broadinstitute/cromwell/releases/download/26/cromwell-26.jar; fi # Download Picard jar - if [[ $RUN_M2_WDL == true ]]; then @@ -90,7 +91,7 @@ install: else ./gradlew assemble; ./gradlew installDist; - if [[ $RUN_CNV_SOMATIC_WDL == true || $RUN_M2_WDL == true ]]; then + if [[ $RUN_CNV_SOMATIC_WDL == true || $RUN_M2_WDL == true || $RUN_CNV_GERMLINE_WDL == true ]]; then echo "building a shadow jar for the wdl"; ./gradlew shadowJar; fi @@ -103,6 +104,9 @@ script: elif [[ $RUN_CNV_SOMATIC_WDL == true ]]; then echo "Running CNV somatic workflows"; bash scripts/cnv_cromwell_tests/somatic/run_cnv_somatic_workflows.sh; + elif [[ $RUN_CNV_GERMLINE_WDL == true ]]; then + echo "Running CNV germline workflows"; + bash scripts/cnv_cromwell_tests/germline/run_cnv_germline_workflows.sh; elif [[ $RUN_M2_WDL == true ]]; then echo "Running M2 WDL"; sudo bash scripts/m2_cromwell_tests/run_m2_wdl.sh; diff --git a/scripts/cnv_cromwell_tests/germline/cnv_germline_cohort_calling_workflow_wes.json b/scripts/cnv_cromwell_tests/germline/cnv_germline_cohort_calling_workflow_wes.json new file mode 100755 index 00000000000..1fefa614586 --- /dev/null +++ b/scripts/cnv_cromwell_tests/germline/cnv_germline_cohort_calling_workflow_wes.json @@ -0,0 +1,19 @@ +{ + "gCNVCohortCallingWorkflow.normal_bams_list": "/home/travis/build/broadinstitute/gatk/scripts/cnv_cromwell_tests/germline/normal_bam_list.tsv", + "gCNVCohortCallingWorkflow.ref_fasta_fai": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta.fai", + "gCNVCohortCallingWorkflow.num_latents": "2", + "gCNVCohortCallingWorkflow.sex_genotypes": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/sex_genotypes.tsv", + "gCNVCohortCallingWorkflow.ref_fasta": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta", + "gCNVCohortCallingWorkflow.ref_fasta_dict": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.dict", + "gCNVCohortCallingWorkflow.gatk_jar": "/home/travis/build/broadinstitute/gatk/build/libs/gatk.jar", + "gCNVCohortCallingWorkflow.targets": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/ice_targets_chr20xy.tsv", + "gCNVCohortCallingWorkflow.contig_ploidy_annotations": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/contig_annots.tsv", + "gCNVCohortCallingWorkflow.transition_prior_table": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_priors.tsv", + "gCNVCohortCallingWorkflow.copy_number_transition_prior_files": [ "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv" ], + "gCNVCohortCallingWorkflow.model_path": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/model_final/", + "gCNVCohortCallingWorkflow.output_path": "output" +} diff --git a/scripts/cnv_cromwell_tests/germline/cnv_germline_cohort_calling_workflow_wgs.json b/scripts/cnv_cromwell_tests/germline/cnv_germline_cohort_calling_workflow_wgs.json new file mode 100755 index 00000000000..ddf83961fd6 --- /dev/null +++ b/scripts/cnv_cromwell_tests/germline/cnv_germline_cohort_calling_workflow_wgs.json @@ -0,0 +1,18 @@ +{ + "gCNVCohortCallingWorkflow.normal_bams_list": "/home/travis/build/broadinstitute/gatk/scripts/cnv_cromwell_tests/germline/normal_bam_list.tsv", + "gCNVCohortCallingWorkflow.ref_fasta_fai": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta.fai", + "gCNVCohortCallingWorkflow.num_latents": "1", + "gCNVCohortCallingWorkflow.sex_genotypes": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/sex_genotypes.tsv", + "gCNVCohortCallingWorkflow.ref_fasta": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta", + "gCNVCohortCallingWorkflow.ref_fasta_dict": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.dict", + "gCNVCohortCallingWorkflow.gatk_jar": "/home/travis/build/broadinstitute/gatk/build/libs/gatk.jar", + "gCNVCohortCallingWorkflow.contig_ploidy_annotations": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/contig_annots.tsv", + "gCNVCohortCallingWorkflow.transition_prior_table": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_priors.tsv", + "gCNVCohortCallingWorkflow.copy_number_transition_prior_files": [ "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv" ], + "gCNVCohortCallingWorkflow.model_path": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/model_final/", + "gCNVCohortCallingWorkflow.output_path": "output" +} diff --git a/scripts/cnv_cromwell_tests/germline/cnv_germline_panel_creation_workflow_wes.json b/scripts/cnv_cromwell_tests/germline/cnv_germline_panel_creation_workflow_wes.json new file mode 100755 index 00000000000..4d7fd3c655e --- /dev/null +++ b/scripts/cnv_cromwell_tests/germline/cnv_germline_panel_creation_workflow_wes.json @@ -0,0 +1,18 @@ +{ + "CNVGermlinePanelWorkflow.gatk_jar": "/home/travis/build/broadinstitute/gatk/build/libs/gatk.jar", + "CNVGermlinePanelWorkflow.sex_genotypes": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/sex_genotypes.tsv", + "CNVGermlinePanelWorkflow.contig_ploidy_annotations": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/contig_annots.tsv", + "CNVGermlinePanelWorkflow.transition_prior_table": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_priors.tsv", + "CNVGermlinePanelWorkflow.copy_number_transition_prior_files": [ "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv" ], + "CNVGermlinePanelWorkflow.num_latents": "2", + "CNVGermlinePanelWorkflow.targets": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/ice_targets_chr20xy.tsv", + "CNVGermlinePanelWorkflow.normal_bams_list": "/home/travis/build/broadinstitute/gatk/scripts/cnv_cromwell_tests/germline/normal_bam_list.tsv", + "CNVGermlinePanelWorkflow.ref_fasta_fai": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta.fai", + "CNVGermlinePanelWorkflow.ref_fasta_dict": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.dict", + "CNVGermlinePanelWorkflow.pon_output_path": "test_pon", + "CNVGermlinePanelWorkflow.ref_fasta": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta" +} diff --git a/scripts/cnv_cromwell_tests/germline/cnv_germline_panel_creation_workflow_wgs.json b/scripts/cnv_cromwell_tests/germline/cnv_germline_panel_creation_workflow_wgs.json new file mode 100755 index 00000000000..b994473de17 --- /dev/null +++ b/scripts/cnv_cromwell_tests/germline/cnv_germline_panel_creation_workflow_wgs.json @@ -0,0 +1,17 @@ +{ + "CNVGermlinePanelWorkflow.gatk_jar": "/home/travis/build/broadinstitute/gatk/build/libs/gatk.jar", + "CNVGermlinePanelWorkflow.sex_genotypes": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/sex_genotypes.tsv", + "CNVGermlinePanelWorkflow.contig_ploidy_annotations": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/contig_annots.tsv", + "CNVGermlinePanelWorkflow.transition_prior_table": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_priors.tsv", + "CNVGermlinePanelWorkflow.copy_number_transition_prior_files": [ "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv" ], + "CNVGermlinePanelWorkflow.num_latents": "1", + "CNVGermlinePanelWorkflow.normal_bams_list": "/home/travis/build/broadinstitute/gatk/scripts/cnv_cromwell_tests/germline/normal_bam_list.tsv", + "CNVGermlinePanelWorkflow.ref_fasta_fai": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta.fai", + "CNVGermlinePanelWorkflow.ref_fasta_dict": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.dict", + "CNVGermlinePanelWorkflow.pon_output_path": "test_pon", + "CNVGermlinePanelWorkflow.ref_fasta": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta" +} diff --git a/scripts/cnv_cromwell_tests/germline/cnv_germline_single_sample_calling_workflow_wes.json b/scripts/cnv_cromwell_tests/germline/cnv_germline_single_sample_calling_workflow_wes.json new file mode 100755 index 00000000000..655f107fe66 --- /dev/null +++ b/scripts/cnv_cromwell_tests/germline/cnv_germline_single_sample_calling_workflow_wes.json @@ -0,0 +1,20 @@ +{ + "gCNVSingleSampleWorkflow.normal_bam": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74NEG_20xy-downsampled.bam", + "gCNVSingleSampleWorkflow.ref_fasta_fai": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta.fai", + "gCNVSingleSampleWorkflow.normal_bam_idx": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74NEG_20xy-downsampled.bam.bai", + "gCNVSingleSampleWorkflow.num_latents": "2", + "gCNVSingleSampleWorkflow.sex_genotypes": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/sex_genotypes.tsv", + "gCNVSingleSampleWorkflow.ref_fasta": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta", + "gCNVSingleSampleWorkflow.ref_fasta_dict": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.dict", + "gCNVSingleSampleWorkflow.gatk_jar": "/home/travis/build/broadinstitute/gatk/build/libs/gatk.jar", + "gCNVSingleSampleWorkflow.targets": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/ice_targets_chr20xy.tsv", + "gCNVSingleSampleWorkflow.contig_ploidy_annotations": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/contig_annots.tsv", + "gCNVSingleSampleWorkflow.transition_prior_table": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_priors.tsv", + "gCNVSingleSampleWorkflow.copy_number_transition_prior_files": [ "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv" ], + "gCNVSingleSampleWorkflow.model_path": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/wes_pon/model_final/", + "gCNVSingleSampleWorkflow.output_path": "output" +} diff --git a/scripts/cnv_cromwell_tests/germline/cnv_germline_single_sample_calling_workflow_wgs.json b/scripts/cnv_cromwell_tests/germline/cnv_germline_single_sample_calling_workflow_wgs.json new file mode 100755 index 00000000000..6a78864f7b3 --- /dev/null +++ b/scripts/cnv_cromwell_tests/germline/cnv_germline_single_sample_calling_workflow_wgs.json @@ -0,0 +1,19 @@ +{ + "gCNVSingleSampleWorkflow.normal_bam": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74NEG_20xy-downsampled.bam", + "gCNVSingleSampleWorkflow.ref_fasta_fai": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta.fai", + "gCNVSingleSampleWorkflow.normal_bam_idx": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74NEG_20xy-downsampled.bam.bai", + "gCNVSingleSampleWorkflow.num_latents": "1", + "gCNVSingleSampleWorkflow.sex_genotypes": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/sex_genotypes.tsv", + "gCNVSingleSampleWorkflow.ref_fasta": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.fasta", + "gCNVSingleSampleWorkflow.ref_fasta_dict": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/Homo_sapiens_assembly19.truncated.dict", + "gCNVSingleSampleWorkflow.gatk_jar": "/home/travis/build/broadinstitute/gatk/build/libs/gatk.jar", + "gCNVSingleSampleWorkflow.contig_ploidy_annotations": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/contig_annots.tsv", + "gCNVSingleSampleWorkflow.transition_prior_table": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_priors.tsv", + "gCNVSingleSampleWorkflow.copy_number_transition_prior_files": [ "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv", + "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv" ], + "gCNVSingleSampleWorkflow.model_path": "/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/wgs_pon/model_final/", + "gCNVSingleSampleWorkflow.output_path": "output" +} diff --git a/scripts/cnv_cromwell_tests/germline/normal_bam_list.tsv b/scripts/cnv_cromwell_tests/germline/normal_bam_list.tsv new file mode 100755 index 00000000000..eae8ed2f969 --- /dev/null +++ b/scripts/cnv_cromwell_tests/germline/normal_bam_list.tsv @@ -0,0 +1,3 @@ +/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74NEG_20xy-downsampled.bam /home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74NEG_20xy-downsampled.bam.bai +/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74P2T_20xy-downsampled.bam /home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74P2T_20xy-downsampled.bam.bai +/home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74P35_20xy-downsampled.bam /home/travis/build/broadinstitute/gatk/src/test/resources/large/cnv_germline_workflows_test_files/inputs/bams/SM-74P35_20xy-downsampled.bam.bai \ No newline at end of file diff --git a/scripts/cnv_cromwell_tests/germline/run_cnv_germline_workflows.sh b/scripts/cnv_cromwell_tests/germline/run_cnv_germline_workflows.sh new file mode 100644 index 00000000000..94d2797cbae --- /dev/null +++ b/scripts/cnv_cromwell_tests/germline/run_cnv_germline_workflows.sh @@ -0,0 +1,27 @@ +#!/bin/bash -l +set -e +#cd in the directory of the script in order to use relative paths +script_path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) +cd "$script_path" + +ln -fs /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/cnv_common_tasks.wdl +ln -fs /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow.wdl +ln -fs /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow.wdl +ln -fs /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow.wdl + +CROMWELL_JAR="cromwell-0.26.jar" + +# Panel WES +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow.wdl cnv_germline_panel_creation_workflow_wes.json +# Panel WGS +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow.wdl cnv_germline_panel_creation_workflow_wgs.json + +# Single sample WES calling +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow.wdl cnv_germline_single_sample_calling_workflow_wes.json +# Single sample WGS calling +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow.wdl cnv_germline_single_sample_calling_workflow_wgs.json + +# Cohort WES calling +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow.wdl cnv_germline_cohort_calling_workflow_wes.json +# Cohort WGS calling +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow.wdl cnv_germline_cohort_calling_workflow_wgs.json \ No newline at end of file diff --git a/scripts/cnv_cromwell_tests/somatic/run_cnv_somatic_workflows.sh b/scripts/cnv_cromwell_tests/somatic/run_cnv_somatic_workflows.sh index 02ac2e27375..a0857a75255 100644 --- a/scripts/cnv_cromwell_tests/somatic/run_cnv_somatic_workflows.sh +++ b/scripts/cnv_cromwell_tests/somatic/run_cnv_somatic_workflows.sh @@ -4,20 +4,22 @@ set -e script_path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) cd "$script_path" -ln -fs /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_tasks.wdl +ln -fs /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/cnv_common_tasks.wdl ln -fs /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_copy_ratio_bam_workflow.wdl ln -fs /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_allele_fraction_pair_workflow.wdl +CROMWELL_JAR="cromwell-0.26.jar" + # Panel WES -java -jar ~/cromwell-0.25.jar run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl cnv_somatic_panel_wes_workflow.json +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl cnv_somatic_panel_wes_workflow.json # Panel WGS -java -jar ~/cromwell-0.25.jar run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl cnv_somatic_panel_wgs_workflow.json +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl cnv_somatic_panel_wgs_workflow.json # Pair WES -java -jar ~/cromwell-0.25.jar run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl cnv_somatic_pair_wes_workflow.json +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl cnv_somatic_pair_wes_workflow.json # Pair WGS -java -jar ~/cromwell-0.25.jar run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl cnv_somatic_pair_wgs_workflow.json +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl cnv_somatic_pair_wgs_workflow.json # Pair WES tumor-only -java -jar ~/cromwell-0.25.jar run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl cnv_somatic_pair_wes_tumor-only_workflow.json +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl cnv_somatic_pair_wes_tumor-only_workflow.json # Pair WGS tumor-only -java -jar ~/cromwell-0.25.jar run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl cnv_somatic_pair_wgs_tumor-only_workflow.json \ No newline at end of file +java -jar ~/${CROMWELL_JAR} run /home/travis/build/broadinstitute/gatk/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl cnv_somatic_pair_wgs_tumor-only_workflow.json \ No newline at end of file diff --git a/scripts/cnv_wdl/somatic/cnv_somatic_tasks.wdl b/scripts/cnv_wdl/cnv_common_tasks.wdl old mode 100644 new mode 100755 similarity index 89% rename from scripts/cnv_wdl/somatic/cnv_somatic_tasks.wdl rename to scripts/cnv_wdl/cnv_common_tasks.wdl index d55d69df35f..0199c75c675 --- a/scripts/cnv_wdl/somatic/cnv_somatic_tasks.wdl +++ b/scripts/cnv_wdl/cnv_common_tasks.wdl @@ -31,6 +31,8 @@ task CollectCoverage { File? padded_targets File bam File bam_idx + String? transform + Boolean? keep_non_autosomes Boolean? disable_all_read_filters Boolean? disable_sequence_dictionary_validation Boolean? keep_duplicate_reads @@ -42,11 +44,14 @@ task CollectCoverage { Int? mem # If no padded target file is input, then do WGS workflow - Boolean is_wgs = select_first([padded_targets, ""]) == "" + Boolean is_wgs = !defined(padded_targets) # Sample name is derived from the bam filename String base_filename = sub(sub(sub(bam, "gs://", ""), "[/]*.*/", ""), "\\.bam$", "") - + + # Output file name depending on type of coverage + String cov_output_name = if (is_wgs && (select_first([transform, ""]) == "RAW")) then "${base_filename}.coverage.tsv.raw_cov" else "${base_filename}.coverage.tsv" + command <<< if [ ${is_wgs} = true ] then @@ -54,6 +59,7 @@ task CollectCoverage { --input ${bam} \ --reference ${ref_fasta} \ --binsize ${default=10000 wgs_bin_size} \ + --keepXYMT ${default="false" keep_non_autosomes} \ --disableToolDefaultReadFilters ${default="false" disable_all_read_filters} \ --disableSequenceDictionaryValidation ${default="true" disable_sequence_dictionary_validation} \ $(if [ ${default="true" keep_duplicate_reads} = true ]; then echo " --disableReadFilter NotDuplicateReadFilter "; else echo ""; fi) \ @@ -64,7 +70,7 @@ task CollectCoverage { --reference ${ref_fasta} \ --targets ${padded_targets} \ --groupBy SAMPLE \ - --transform PCOV \ + --transform ${default="PCOV" transform} \ --targetInformationColumns FULL \ --interval_set_rule UNION \ --interval_padding 0 \ @@ -78,7 +84,7 @@ task CollectCoverage { output { String entity_id = base_filename - File coverage = "${base_filename}.coverage.tsv" + File coverage = cov_output_name } } @@ -122,4 +128,4 @@ task CorrectGCBias { output { File corrected_coverage = "${entity_id}.gc_corrected.tsv" } -} \ No newline at end of file +} diff --git a/scripts/cnv_wdl/germline/README.md b/scripts/cnv_wdl/germline/README.md new file mode 100644 index 00000000000..d24be861ec6 --- /dev/null +++ b/scripts/cnv_wdl/germline/README.md @@ -0,0 +1,88 @@ +## Running the Germline CNV WDL + +### Which WDL should you use? +- Building a panel of normals (PoN): ``cnv_germline_panel_creation_workflow.wdl`` +- Calling events on a single normal sample: ``cnv_germline_single_sample_calling_workflow.wdl`` +- Calling events on a cohort of normal samples: ``cnv_germline_cohort_calling_workflow.wdl`` + +#### Setting up parameter json file for a run + +To get started, copy the relevant ``*_template.json`` for the workflow you wish to run and adjust parameters accordingly. +You can find all required resource inputs needed to run the workflows in the ``/resources`` directory. These inputs could be run out-of-the-box. + +*Please note that there are task-level parameters that do not appear in the template files. These are set to reasonable values by default, but can also be adjusted if desired. + +#### Fields of germline CNV panel of normals creation workflow + + ``CNVGermlinePanelWorkflow.sex_genotypes`` -- path to table of per-sample sex genotypes + ``CNVGermlinePanelWorkflow.contig_ploidy_annotations`` -- path to the germline contig ploidy annotations table; located in ``/resources`` directory + ``CNVGermlinePanelWorkflow.transition_prior_table`` -- path to copy number transition priors table; located in ``/resources`` directory + ``CNVGermlinePanelWorkflow.transition_matrix_XY_Y`` -- path to copy number transition prior for Y contig for XY-genotyped samples; located in ``/resources`` directory + ``CNVGermlinePanelWorkflow.transition_matrix_XX_X`` -- path to copy number transition prior for X contig for XX-genotyped samples; located in ``/resources`` directory + ``CNVGermlinePanelWorkflow.transition_matrix_XY_X`` -- path to copy number transition prior for X contig for XY-genotyped samples; located in ``/resources`` directory + ``CNVGermlinePanelWorkflow.transition_matrix_XX_Y`` -- path to copy number transition prior for Y contig for XX-genotyped samples; located in ``/resources`` directory + ``CNVGermlinePanelWorkflow.transition_matrix_autosomal`` -- path to transition prior on autosomal loci; located in ``/resources`` directory, + ``CNVGermlinePanelWorkflow.normal_bams_list`` -- TSV file consisting of corresponding bam and corresponding index files as described in cnv_germline_panel_creation_workflow.wdl + ``CNVGermlinePanelWorkflow.pon_output_path`` -- name of the final output directory + ``CNVGermlinePanelWorkflow.num_latents`` -- (advanced) maximum number of principal components. Must be strictly less than the number of samples. The recommended value is 20 ~ 30 for large cohorts. For smaller cohorts, use 0.5 * number of samples. Unnecessary principal components are automatically pruned during PoN creation + ``CNVGermlinePanelWorkflow.ref_fasta`` -- path to reference fasta file + ``CNVGermlinePanelWorkflow.ref_fasta_dict`` -- path to reference dict file + ``CNVGermlinePanelWorkflow.ref_fasta_fai`` -- path to reference fasta fai file + ``CNVGermlinePanelWorkflow.gatk_jar`` -- absolute path to gatk-protected.jar + ``CNVGermlinePanelWorkflow.targets`` -- (optional) Target file (NOT in BED format) corresponding to the genomic loci of enriched targets in WES sample (e.g. Agilent, Illumina, etc). Please run ConvertBedToTargetFile to convert a BED file to a target file. If provided, then WES workflow will be run; otherwise, WGS workflow will be run + + +#### Fields of germline CNV single sample calling workflow + +The reference used must be the same between PoN and case samples. + + ``gCNVSingleSampleWorkflow.sex_genotypes`` -- path to table of per-sample sex genotypes + ``gCNVSingleSampleWorkflow.contig_ploidy_annotations`` -- path to the germline contig ploidy annotations table; located in ``/resources`` directory + ``gCNVSingleSampleWorkflow.transition_prior_table`` -- path to copy number transition priors table; located in ``/resources`` directory + ``gCNVSingleSampleWorkflow.transition_matrix_XY_Y`` -- path to copy number transition prior for Y contig for XY-genotyped samples; located in ``/resources`` directory + ``gCNVSingleSampleWorkflow.transition_matrix_XX_X`` -- path to copy number transition prior for X contig for XX-genotyped samples; located in ``/resources`` directory + ``gCNVSingleSampleWorkflow.transition_matrix_XY_X`` -- path to copy number transition prior for X contig for XY-genotyped samples; located in ``/resources`` directory + ``gCNVSingleSampleWorkflow.transition_matrix_XX_Y`` -- path to copy number transition prior for Y contig for XX-genotyped samples; located in ``/resources`` directory + ``gCNVSingleSampleWorkflow.transition_matrix_autosomal`` -- path to transition prior on autosomal loci; located in ``/resources`` directory, + ``gCNVSingleSampleWorkflow.output_path`` -- name of the final output directory + ``gCNVSingleSampleWorkflow.num_latents`` -- (advanced) maximum number of principal components. Must be strictly less than the number of samples. The recommended value is 20 ~ 30 for large cohorts. For smaller cohorts, use 0.5 * number of samples. Unnecessary principal components are automatically pruned during PoN creation + ``gCNVSingleSampleWorkflow.model_path`` -- absolute path of the PoN model (posterior_finals directory of the panel creation output) + ``gCNVSingleSampleWorkflow.normal_bam`` -- path to the normal bam file + ``gCNVSingleSampleWorkflow.normal_bam_idx`` -- path to the corresponding bam index file + ``gCNVSingleSampleWorkflow.ref_fasta`` -- path to reference fasta file + ``gCNVSingleSampleWorkflow.ref_fasta_dict`` -- path to reference dict file + ``gCNVSingleSampleWorkflow.ref_fasta_fai`` -- path to reference fasta fai file + ``gCNVSingleSampleWorkflow.gatk_jar`` -- absolute path to gatk-protected.jar + ``gCNVSingleSampleWorkflow.targets`` -- (optional) Target file (NOT in BED format) corresponding to the genomic loci of enriched targets in WES sample (e.g. Agilent, Illumina, etc). Please run ConvertBedToTargetFile to convert a BED file to a target file. If provided, then WES workflow will be run; otherwise, WGS workflow will be run + + +#### Fields of germline CNV cohort calling workflow + +The reference used must be the same between PoN and case samples. + + ``gCNVCohortCallingWorkflow.sex_genotypes`` -- path to table of per-sample sex genotypes + ``gCNVCohortCallingWorkflow.contig_ploidy_annotations`` -- path to the germline contig ploidy annotations table; located in ``/resources`` directory + ``gCNVCohortCallingWorkflow.transition_prior_table`` -- path to copy number transition priors table; located in ``/resources`` directory + ``gCNVCohortCallingWorkflow.transition_matrix_XY_Y`` -- path to copy number transition prior for Y contig for XY-genotyped samples; located in ``/resources`` directory + ``gCNVCohortCallingWorkflow.transition_matrix_XX_X`` -- path to copy number transition prior for X contig for XX-genotyped samples; located in ``/resources`` directory + ``gCNVCohortCallingWorkflow.transition_matrix_XY_X`` -- path to copy number transition prior for X contig for XY-genotyped samples; located in ``/resources`` directory + ``gCNVCohortCallingWorkflow.transition_matrix_XX_Y`` -- path to copy number transition prior for Y contig for XX-genotyped samples; located in ``/resources`` directory + ``gCNVCohortCallingWorkflow.transition_matrix_autosomal`` -- path to transition prior on autosomal loci; located in ``/resources`` directory + ``gCNVCohortCallingWorkflow.output_path`` -- name of the final output directory + ``gCNVCohortCallingWorkflow.num_latents`` -- (advanced) maximum number of principal components. Must be strictly less than the number of samples. The recommended value is 20 ~ 30 for large cohorts. For smaller cohorts, use 0.5 * number of samples. Unnecessary principal components are automatically pruned during PoN creation + ``gCNVCohortCallingWorkflow.model_path`` -- absolute path of the PoN model (posterior_finals directory of the panel creation output) + ``gCNVCohortCallingWorkflow.normal_bams_list`` -- TSV file consisting of corresponding bam and corresponding index files as described in cnv_germline_cohort_calling_workflow.wdl + ``gCNVCohortCallingWorkflow.ref_fasta`` -- path to reference fasta file + ``gCNVCohortCallingWorkflow.ref_fasta_dict`` -- path to reference dict file + ``gCNVCohortCallingWorkflow.ref_fasta_fai`` -- path to reference fasta fai file + ``gCNVCohortCallingWorkflow.gatk_jar`` -- absolute path to gatk-protected.jar + ``gCNVCohortCallingWorkflow.targets`` -- (optional) Target file (NOT in BED format) corresponding to the genomic loci of enriched targets in WES sample (e.g. Agilent, Illumina, etc). Please run ConvertBedToTargetFile to convert a BED file to a target file. If provided, then WES workflow will be run; otherwise, WGS workflow will be run + +In addition, there are several task-level parameters that may be set by advanced users; for example: + +- ``gCNVCohortCallingWorkflow.CollectCoverage.wgs_bin_size`` -- Size of bins (in bp) for WGS coverage collection. *This must be the same value used for all samples.* Ignored if not running WGS. +- ``gCNVCohortCallingWorkflow.PadTargets.padding`` -- Amount of padding (in bp) to add to both sides of targets for WES coverage collection. *This must be the same value used for all samples.* Ignored if not running WES. + + + +Further explanation of these task-level parameters may be found by invoking the ``--help`` documentation available in the gatk-protected.jar for each tool. \ No newline at end of file diff --git a/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow.wdl b/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow.wdl new file mode 100755 index 00000000000..0e1a2d5a478 --- /dev/null +++ b/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow.wdl @@ -0,0 +1,87 @@ +# This workflow is used for running germline CNV on a cohort of germline samples +# Notes: +# +# -Basic sex genotype tab-separated table for homo sapiens must be formatted as follows (Refer to the Javadoc of SexGenotypeTableReader for full description): +# SAMPLE_NAME SEX_GENOTYPE +# sample_name_1 SEX_XX +# sample_name_2 SEX_XY +# sample_name_3 SEX_XY +# sample_name_4 SEX_XX +# Sex genotype identifiers (SEX_XX and SEX_XY in the above example) must match those in the tab-separated germline contig ploidy annotation table. +# The latter is formatted as follows: +# CONTIG CLASS SEX_XX SEX_XY +# 1 AUTOSOMAL 2 2 +# 2 AUTOSOMAL 2 2 +# ... ... ... ... +# X ALLOSOMAL 2 0 +# Y ALLOSOMAL 1 1 +# +# - Input file (normal_bams_list) must contain file paths to bam and bam index files separated by tabs in the following format: +# normal_bam_1 bam_idx_1 +# normal_bam_2 bam_idx_2 +# +# - The target file (targets) is required for the WES workflow and should be a tab-separated file with the column headers: +# contig start stop name +# These targets will be padded on both sides by the amount specified by PadTargets.padding (default 250). +# +# - If a target file is not provided, then the WGS workflow will be run instead and the specified value of +# wgs_bin_size (default 10000) will be used. +# +# - Example invocation: +# java -jar cromwell.jar run cnv_germline_cohort_calling_workflow.wdl myParameters.json +# We recommend taking cnv_germline_cohort_calling_workflow.json as a template json file and modifying it accordingly (please save +# your modified version with a different filename and do not commit to the gatk-protected repository). +################ + + +import "cnv_germline_single_sample_calling_workflow.wdl" as gCNVCalling + +workflow gCNVCohortCallingWorkflow { + # Workflow input files + File? targets + File normal_bams_list + Array[Array[String]]+ normal_bams = read_tsv(normal_bams_list) + File ref_fasta + File ref_fasta_dict + File ref_fasta_fai + File sex_genotypes + File contig_ploidy_annotations + String gatk_jar + + # Transition prior table files + File transition_prior_table + Array[File] copy_number_transition_prior_files + + # Model directory and parameters + String model_path + Int num_latents + + # Output path + String output_path + + scatter (normal_bam in normal_bams) { + call gCNVCalling.gCNVSingleSampleWorkflow as CohortCalling { + input: + targets = targets, + normal_bam = normal_bam[0], + normal_bam_idx = normal_bam[1], + ref_fasta = ref_fasta, + ref_fasta_dict = ref_fasta_dict, + ref_fasta_fai = ref_fasta_fai, + sex_genotypes = sex_genotypes, + contig_ploidy_annotations = contig_ploidy_annotations, + gatk_jar = gatk_jar, + transition_prior_table = transition_prior_table, + copy_number_transition_prior_files = copy_number_transition_prior_files, + model_path = model_path, + output_path = output_path, + num_latents = num_latents + } + } + + output { + Array[Array[File]] posterior_files = CohortCalling.posteriors + Array[Array[File]] segment_files = CohortCalling.segments + } + +} diff --git a/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow_template.json b/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow_template.json new file mode 100755 index 00000000000..c5c9106c11d --- /dev/null +++ b/scripts/cnv_wdl/germline/cnv_germline_cohort_calling_workflow_template.json @@ -0,0 +1,15 @@ +{ + "gCNVCohortCallingWorkflow.sex_genotypes": "File", + "gCNVCohortCallingWorkflow.contig_ploidy_annotations": "File", + "gCNVCohortCallingWorkflow.transition_prior_table": "File", + "gCNVCohortCallingWorkflow.copy_number_transition_prior_files": "Array[File]", + "gCNVCohortCallingWorkflow.output_path": "String", + "gCNVCohortCallingWorkflow.num_latents": "Int", + "gCNVCohortCallingWorkflow.model_path": "String", + "gCNVCohortCallingWorkflow.normal_bams_list": "File", + "gCNVCohortCallingWorkflow.ref_fasta": "File", + "gCNVCohortCallingWorkflow.ref_fasta_dict": "File", + "gCNVCohortCallingWorkflow.ref_fasta_fai": "File", + "gCNVCohortCallingWorkflow.gatk_jar": "String", + "gCNVCohortCallingWorkflow.targets": "(optional) File?" +} diff --git a/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow.wdl b/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow.wdl new file mode 100755 index 00000000000..66e340ce397 --- /dev/null +++ b/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow.wdl @@ -0,0 +1,180 @@ +# Workflow for creating a panel of normals for germline CNV pipeline +# Notes: +# +# -Basic sex genotype tab-separated table for homo sapiens must be formatted as follows (Refer to the Javadoc of SexGenotypeTableReader for full description): +# SAMPLE_NAME SEX_GENOTYPE +# sample_name_1 SEX_XX +# sample_name_2 SEX_XY +# sample_name_3 SEX_XY +# sample_name_4 SEX_XX +# Sex genotype identifiers (SEX_XX and SEX_XY in the above example) must match those in the tab-separated germline contig ploidy annotation table. +# The latter is formatted as follows: +# CONTIG CLASS SEX_XX SEX_XY +# 1 AUTOSOMAL 2 2 +# 2 AUTOSOMAL 2 2 +# ... ... ... ... +# X ALLOSOMAL 2 0 +# Y ALLOSOMAL 1 1 +# +# - Input file (normal_bams_list) must contain file paths to bam and bam index files separated by tabs in the following format: +# normal_bam_1 bam_idx_1 +# normal_bam_2 bam_idx_2 +# +# - The target file (targets) is required for the WES workflow and should be a tab-separated file with the column headers: +# contig start stop name +# These targets will be padded on both sides by the amount specified by PadTargets.padding (default 250). +# +# - If a target file is not provided, then the WGS workflow will be run instead and the specified value of +# wgs_bin_size (default 10000) will be used. +# +# - Example invocation: +# java -jar cromwell.jar run cnv_germline_panel_creation_workflow.wdl myParameters.json +# We recommend taking cnv_germline_cohort_calling_workflow.json as a template json file and modifying it accordingly (please save +# your modified version with a different filename and do not commit to the gatk-protected repository). +################## + +import "cnv_common_tasks.wdl" as CNVTasks + +workflow CNVGermlinePanelWorkflow { + # Workflow input files + File? targets + File normal_bams_list + Array[Array[String]]+ normal_bams = read_tsv(normal_bams_list) + File sex_genotypes + File contig_ploidy_annotations + File transition_prior_table + Array[File] copy_number_transition_prior_files + File ref_fasta + File ref_fasta_dict + File ref_fasta_fai + File gatk_jar + + # Model parameters + Int num_latents + # CombineReadCounts name + String combined_entity_id = "combined_coverage" + # Sex genotypes file name + String sex_genotypes_entity_id = "sex_genotypes" + # PoN output path + String pon_output_path + # If no target file is input, then do WGS workflow + Boolean is_wgs = !defined(targets) + + if (!is_wgs) { + call CNVTasks.PadTargets { + input: + targets = targets, + gatk_jar = gatk_jar + } + } + + scatter (normal_bam in normal_bams) { + call CNVTasks.CollectCoverage { + input: + padded_targets = PadTargets.padded_targets, + keep_non_autosomes = true, + bam = normal_bam[0], + bam_idx = normal_bam[1], + ref_fasta = ref_fasta, + ref_fasta_fai = ref_fasta_fai, + ref_fasta_dict = ref_fasta_dict, + gatk_jar = gatk_jar, + transform = "RAW" + } + } + + call CombineReadCounts { + input: + combined_entity_id = combined_entity_id, + coverage_file_list = CollectCoverage.coverage, + gatk_jar = gatk_jar + } + + call CNVTasks.AnnotateTargets { + input: + entity_id = combined_entity_id, + targets = CollectCoverage.coverage[0], + ref_fasta = ref_fasta, + ref_fasta_fai = ref_fasta_fai, + ref_fasta_dict = ref_fasta_dict, + gatk_jar = gatk_jar + } + + call CNVTasks.CorrectGCBias { + input: + entity_id = combined_entity_id, + coverage = CombineReadCounts.combined_coverage, + annotated_targets = AnnotateTargets.annotated_targets, + gatk_jar = gatk_jar + } + + call GermlineCNVCaller { + input: + coverage = CorrectGCBias.corrected_coverage, + contig_ploidy_annotations = contig_ploidy_annotations, + sex_genotypes = sex_genotypes, + transition_prior_table = transition_prior_table, + copy_number_transition_prior_files = copy_number_transition_prior_files, + pon_output_path = pon_output_path, + num_latents = num_latents, + gatk_jar = gatk_jar + } + + output { + Array[File] posteriors = GermlineCNVCaller.posteriors + Array[File] model = GermlineCNVCaller.model + Array[File] segments = GermlineCNVCaller.segments + } +} + +# Combine sample-level coverage files into a single file +task CombineReadCounts { + String combined_entity_id + Array[File]+ coverage_file_list + Int? max_open_files + File gatk_jar + Int? mem + + command { + java -Xmx${default=4 mem}g -jar ${gatk_jar} CombineReadCounts \ + --input ${sep=" --input " coverage_file_list} \ + --maxOpenFiles ${default=100 max_open_files} \ + --output ${combined_entity_id}.tsv + } + + output { + File combined_coverage = "${combined_entity_id}.tsv" + } +} + +# Learn the coverage model +task GermlineCNVCaller { + File coverage + File contig_ploidy_annotations + File sex_genotypes + File transition_prior_table + Array[File] copy_number_transition_prior_files + String pon_output_path + Int num_latents + File gatk_jar + Int? mem + + command { + java -Xmx${default=4 mem}g -Ddtype=double -jar ${gatk_jar} GermlineCNVCaller \ + --input ${coverage} \ + --contigAnnotationsTable ${contig_ploidy_annotations} \ + --sexGenotypeTable ${sex_genotypes} \ + --copyNumberTransitionPriorTable ${transition_prior_table} \ + --outputPath ${pon_output_path} \ + --jobType LEARN_AND_CALL \ + --numLatents ${default=5 num_latents} \ + --rddCheckpointing false \ + --disableSpark true + } + + output { + Array[File] posteriors = glob("./${pon_output_path}/posteriors_final/*") + Array[File] model = glob("./${pon_output_path}/model_final/*") + Array[File] segments = glob("./${pon_output_path}/posteriors_final/segments/*") + } +} diff --git a/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow_template.json b/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow_template.json new file mode 100755 index 00000000000..53ac97a4c5c --- /dev/null +++ b/scripts/cnv_wdl/germline/cnv_germline_panel_creation_workflow_template.json @@ -0,0 +1,14 @@ +{ + "CNVGermlinePanelWorkflow.sex_genotypes": "File", + "CNVGermlinePanelWorkflow.gatk_jar": "File", + "CNVGermlinePanelWorkflow.contig_ploidy_annotations": "File", + "CNVGermlinePanelWorkflow.targets": "(optional) File?", + "CNVGermlinePanelWorkflow.normal_bams_list": "File", + "CNVGermlinePanelWorkflow.num_latents": "Int", + "CNVGermlinePanelWorkflow.pon_output_path": "String", + "CNVGermlinePanelWorkflow.ref_fasta": "File", + "CNVGermlinePanelWorkflow.ref_fasta_dict": "File", + "CNVGermlinePanelWorkflow.ref_fasta_fai": "File", + "CNVGermlinePanelWorkflow.transition_prior_table": "File", + "CNVGermlinePanelWorkflow.copy_number_transition_prior_files": "Array[File]" +} diff --git a/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow.wdl b/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow.wdl new file mode 100755 index 00000000000..41ac564fd26 --- /dev/null +++ b/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow.wdl @@ -0,0 +1,147 @@ +# Subworkflow for running GATK germline CNV on a single BAM. Supports both WGS and WES samples. +# Notes: +# +# -Basic sex genotype tab-separated table for homo sapiens must be formatted as follows (Refer to the Javadoc of SexGenotypeTableReader for full description): +# SAMPLE_NAME SEX_GENOTYPE +# sample_name_1 SEX_XX +# sample_name_2 SEX_XY +# sample_name_3 SEX_XY +# sample_name_4 SEX_XX +# Sex genotype identifiers (SEX_XX and SEX_XY in the above example) must match those in the tab-separated germline contig ploidy annotation table. +# The latter is formatted as follows: +# CONTIG CLASS SEX_XX SEX_XY +# 1 AUTOSOMAL 2 2 +# 2 AUTOSOMAL 2 2 +# ... ... ... ... +# X ALLOSOMAL 2 0 +# Y ALLOSOMAL 1 1 +# +# - The target file (targets) is required for the WES workflow and should be a tab-separated file with the column headers: +# contig start stop name +# These targets will be padded on both sides by the amount specified by PadTargets.padding (default 250). +# +# - If a target file is not provided, then the WGS workflow will be run instead and the specified value of +# wgs_bin_size (default 10000) will be used. +# +# - Example invocation: +# java -jar cromwell.jar run cnv_germline_single_sample_calling_workflow.wdl myParameters.json +# We recommend taking cnv_germline_cohort_calling_workflow.json as a template json file and modifying it accordingly (please save +# your modified version with a different filename and do not commit to the gatk-protected repository). +################ + +import "cnv_common_tasks.wdl" as CNVTasks + +workflow gCNVSingleSampleWorkflow { + # Workflow input files + File? targets + File normal_bam + File normal_bam_idx + File ref_fasta + File ref_fasta_dict + File ref_fasta_fai + File sex_genotypes + File contig_ploidy_annotations + String gatk_jar + + # Transtion prior table files + File transition_prior_table + Array[File] copy_number_transition_prior_files + + # Model directory and parameters + String model_path + Int num_latents + + # Output path + String output_path + + # If no target file is input, then do WGS workflow + Boolean is_wgs = !defined(targets) + + if (!is_wgs) { + call CNVTasks.PadTargets { + input: + targets = targets, + gatk_jar = gatk_jar + } + } + + call CNVTasks.CollectCoverage { + input: + padded_targets = PadTargets.padded_targets, + bam = normal_bam, + bam_idx = normal_bam_idx, + ref_fasta = ref_fasta, + ref_fasta_fai = ref_fasta_fai, + ref_fasta_dict = ref_fasta_dict, + gatk_jar = gatk_jar, + transform = "RAW" + } + + call CNVTasks.AnnotateTargets { + input: + entity_id = CollectCoverage.entity_id, + targets = CollectCoverage.coverage, + ref_fasta = ref_fasta, + ref_fasta_fai = ref_fasta_fai, + ref_fasta_dict = ref_fasta_dict, + gatk_jar = gatk_jar + } + + call CNVTasks.CorrectGCBias { + input: + entity_id = CollectCoverage.entity_id, + coverage = CollectCoverage.coverage, + annotated_targets = AnnotateTargets.annotated_targets, + gatk_jar = gatk_jar + } + + call GermlineCNVCaller { + input: + coverage = CorrectGCBias.corrected_coverage, + contig_ploidy_annotations = contig_ploidy_annotations, + sex_genotypes = sex_genotypes, + transition_prior_table = transition_prior_table, + copy_number_transition_prior_files = copy_number_transition_prior_files, + model_path = model_path, + num_latents = num_latents, + output_path = output_path, + gatk_jar = gatk_jar + } + + output { + Array[File] posteriors = GermlineCNVCaller.posteriors + Array[File] segments = GermlineCNVCaller.segments + } +} + +task GermlineCNVCaller { + File coverage + File contig_ploidy_annotations + File sex_genotypes + File transition_prior_table + Array[File] copy_number_transition_prior_files + String output_path + String model_path + Int num_latents + File gatk_jar + Int? mem + + command { + java -Xmx${default=4 mem}g -Ddtype=double -jar ${gatk_jar} GermlineCNVCaller \ + --input ${coverage} \ + --inputModelPath ${model_path} \ + --contigAnnotationsTable ${contig_ploidy_annotations} \ + --sexGenotypeTable ${sex_genotypes} \ + --copyNumberTransitionPriorTable ${transition_prior_table} \ + --outputPath ${output_path} \ + --numLatents ${default=5 num_latents} \ + --jobType CALL_ONLY \ + --rddCheckpointing false \ + --disableSpark true + } + + output { + Array[File] posteriors = glob("./${output_path}/posteriors_final/*") + Array[File] segments = glob("./${output_path}/posteriors_final/segments/*") + } +} diff --git a/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow_template.json b/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow_template.json new file mode 100755 index 00000000000..92c7cbe36d4 --- /dev/null +++ b/scripts/cnv_wdl/germline/cnv_germline_single_sample_calling_workflow_template.json @@ -0,0 +1,16 @@ +{ + "gCNVSingleSampleWorkflow.normal_bam": "File", + "gCNVSingleSampleWorkflow.normal_bam_idx": "File", + "gCNVSingleSampleWorkflow.num_latents": "Int", + "gCNVSingleSampleWorkflow.sex_genotypes": "File", + "gCNVSingleSampleWorkflow.ref_fasta": "File", + "gCNVSingleSampleWorkflow.ref_fasta_dict": "File", + "gCNVSingleSampleWorkflow.ref_fasta_fai": "File", + "gCNVSingleSampleWorkflow.model_path": "String", + "gCNVSingleSampleWorkflow.gatk_jar": "String", + "gCNVSingleSampleWorkflow.targets": "(optional) File?", + "gCNVSingleSampleWorkflow.contig_ploidy_annotations": "File", + "gCNVSingleSampleWorkflow.transition_prior_table": "File", + "gCNVSingleSampleWorkflow.copy_number_transition_prior_files": "Array[File]", + "gCNVSingleSampleWorkflow.output_path": "String", +} diff --git a/scripts/cnv_wdl/germline/resources/contig_annots.tsv b/scripts/cnv_wdl/germline/resources/contig_annots.tsv new file mode 100755 index 00000000000..406629d7c90 --- /dev/null +++ b/scripts/cnv_wdl/germline/resources/contig_annots.tsv @@ -0,0 +1,25 @@ +CONTIG CLASS SEX_XX SEX_XY +1 AUTOSOMAL 2 2 +2 AUTOSOMAL 2 2 +3 AUTOSOMAL 2 2 +4 AUTOSOMAL 2 2 +5 AUTOSOMAL 2 2 +6 AUTOSOMAL 2 2 +7 AUTOSOMAL 2 2 +8 AUTOSOMAL 2 2 +9 AUTOSOMAL 2 2 +10 AUTOSOMAL 2 2 +11 AUTOSOMAL 2 2 +12 AUTOSOMAL 2 2 +13 AUTOSOMAL 2 2 +14 AUTOSOMAL 2 2 +15 AUTOSOMAL 2 2 +16 AUTOSOMAL 2 2 +17 AUTOSOMAL 2 2 +18 AUTOSOMAL 2 2 +19 AUTOSOMAL 2 2 +20 AUTOSOMAL 2 2 +21 AUTOSOMAL 2 2 +22 AUTOSOMAL 2 2 +X ALLOSOMAL 2 1 +Y ALLOSOMAL 0 1 diff --git a/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_priors.tsv b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_priors.tsv new file mode 100755 index 00000000000..8f56c282bf2 --- /dev/null +++ b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_priors.tsv @@ -0,0 +1,25 @@ +CONTIG SEX_XX SEX_XY +1 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +2 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +3 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +4 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +5 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +6 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +7 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +8 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +9 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +10 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +11 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +12 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +13 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +14 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +15 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +16 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +17 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +18 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +19 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +20 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +21 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +22 homo_sapiens_germline_CN_transition_matrix_autosomal.tsv homo_sapiens_germline_CN_transition_matrix_autosomal.tsv +X homo_sapiens_germline_CN_transition_matrix_XX_X.tsv homo_sapiens_germline_CN_transition_matrix_XY_X.tsv +Y homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv diff --git a/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv new file mode 100755 index 00000000000..ea18c070fb0 --- /dev/null +++ b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XX_X.tsv @@ -0,0 +1,7 @@ +#The following germline copy number transition matrix is obtained from analyzing Genome STRiP calls on a cohort of 170 blood normal TCGA samples +T_MATRIX_XX_X FROM_0 FROM_1 FROM_2 FROM_3 FROM_4 +TO_0 0.99966751443861601 0.0 4.6641935242897276e-08 0.0 0.0 +TO_1 0.0 0.9997899779920747 9.3423238818193651e-08 0.0 0.0 +TO_2 0.00033248556138398773 0.00021002200792527603 0.99999985473174158 4.541929579905158e-05 7.8833267638943636e-05 +TO_3 0.0 0.0 5.0172599663674365e-09 0.99995458070420096 0.0 +TO_4 0.0 0.0 1.8582444319879394e-10 0.0 0.99992116673236109 diff --git a/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv new file mode 100755 index 00000000000..f8d0228761f --- /dev/null +++ b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XX_Y.tsv @@ -0,0 +1,3 @@ +#A trivial transition matrix for enforcing zero ploidy on Y contig in XX samples +T_MATRIX_XX_Y TO_0 +FROM_0 1.0 diff --git a/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv new file mode 100755 index 00000000000..992f224460f --- /dev/null +++ b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XY_X.tsv @@ -0,0 +1,6 @@ +#The following germline copy number transition matrix is obtained from analyzing Genome STRiP calls on a cohort of 170 blood normal TCGA samples +T_MATRIX_XY_X FROM_0 FROM_1 FROM_2 FROM_3 +TO_0 0.99971173098797461 1.0067714836234777e-07 0.0 0.0 +TO_1 0.00028826901202540391 0.99999989259309574 7.456796468461193e-05 4.0420371867421184e-05 +TO_2 0.0 6.5615120089096975e-09 0.99992504963549644 8.0840743734842364e-06 +TO_3 0.0 1.6824389766435122e-10 3.8239981889544576e-07 0.99995149555375906 diff --git a/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv new file mode 100755 index 00000000000..8c80b9eaa16 --- /dev/null +++ b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_XY_Y.tsv @@ -0,0 +1,7 @@ +#The following germline copy number transition matrix is obtained from analyzing Genome STRiP calls on a cohort of 170 blood normal TCGA samples +T_MATRIX_XY_Y FROM_0 FROM_1 FROM_2 FROM_3 FROM_4 +TO_0 0.99966851990709416 5.9399783434370542e-08 0.0 0.0 0.0 +TO_1 0.00033148009290586881 0.99999937404917871 0.00016831138093714932 0.00035529148884256304 0.00027047913446676971 +TO_2 0.0 5.2251326738303193e-07 0.99983149068329535 6.4209305212511401e-06 0.0 +TO_3 0.0 3.4001255345191416e-08 1.9793576746822735e-07 0.99963614727046246 5.519982336056525e-06 +TO_4 0.0 1.0036515132014333e-08 0.0 2.1403101737503797e-06 0.99972400088319713 diff --git a/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv new file mode 100755 index 00000000000..5b0ef7c5cd6 --- /dev/null +++ b/scripts/cnv_wdl/germline/resources/homo_sapiens_germline_CN_transition_matrix_autosomal.tsv @@ -0,0 +1,13 @@ +#The following germline copy number transition matrix is obtained from analyzing Genome STRiP calls on a cohort of 170 blood normal TCGA samples +T_MATRIX_AUTOSOMAL FROM_0 FROM_1 FROM_2 FROM_3 FROM_4 FROM_5 FROM_6 FROM_7 FROM_8 FROM_9 FROM_10 +TO_0 0.9997389770672177 2.1467075095351557e-07 5.9100196666398515e-08 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +TO_1 7.032645704368021e-07 0.99981467801052126 1.376696014985822e-07 1.1958483005083788e-08 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +TO_2 0.00026031966821188487 0.00018510163208542175 0.99999972823891037 9.7745650462803608e-05 0.00010292959512329779 8.0138884782014782e-05 9.0232386606850211e-05 7.9777767777145916e-05 7.5782475345150855e-05 8.8396952830754563e-05 8.9130531663621367e-05 +TO_3 0.0 5.6866424093646516e-09 3.4570453537193609e-08 0.99990217064015618 6.1564638523662337e-08 1.1699107267447413e-07 4.469162288600803e-08 0.0 0.0 0.0 0.0 +TO_4 0.0 0.0 3.3588164155451664e-08 5.6802794274147987e-08 0.99989682090607845 1.1699107267447413e-07 2.4133476358444333e-06 0.0 0.0 0.0 0.0 +TO_5 0.0 0.0 2.8971721269891569e-09 1.1958483005083788e-08 1.2960976531297335e-08 0.99991953938976808 1.3407486865802407e-07 0.0 0.0 0.0 0.0 +TO_6 0.0 0.0 2.1348140599967544e-09 2.989620751270947e-09 1.7497318317251403e-07 8.7743304505855591e-08 0.99990713080764293 1.0766230469250462e-07 0.0 0.0 0.0 +TO_7 0.0 0.0 7.8350530879524278e-10 0.0 0.0 0.0 4.469162288600803e-08 0.99992011456991814 0.0 0.0 0.0 +TO_8 0.0 0.0 9.4105226022640503e-10 0.0 0.0 0.0 0.0 0.0 0.99992421752465488 0.0 0.0 +TO_9 0.0 0.0 5.9212277047953571e-11 0.0 0.0 0.0 0.0 0.0 0.0 0.9999116030471692 0.0 +TO_10 0.0 0.0 4.2294483605681122e-12 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.99991086946833641 diff --git a/scripts/cnv_wdl/somatic/cnv_somatic_allele_fraction_pair_workflow.wdl b/scripts/cnv_wdl/somatic/cnv_somatic_allele_fraction_pair_workflow.wdl index a28c6a35ca2..cd2eb1e28b4 100644 --- a/scripts/cnv_wdl/somatic/cnv_somatic_allele_fraction_pair_workflow.wdl +++ b/scripts/cnv_wdl/somatic/cnv_somatic_allele_fraction_pair_workflow.wdl @@ -12,7 +12,7 @@ # ############# -import "cnv_somatic_tasks.wdl" as CNVSomatic +import "cnv_common_tasks.wdl" as CNVTasks workflow CNVSomaticAlleleFractionPairWorkflow { # Workflow input files diff --git a/scripts/cnv_wdl/somatic/cnv_somatic_copy_ratio_bam_workflow.wdl b/scripts/cnv_wdl/somatic/cnv_somatic_copy_ratio_bam_workflow.wdl index fde500a3e24..50152fcecba 100644 --- a/scripts/cnv_wdl/somatic/cnv_somatic_copy_ratio_bam_workflow.wdl +++ b/scripts/cnv_wdl/somatic/cnv_somatic_copy_ratio_bam_workflow.wdl @@ -10,7 +10,7 @@ # ############# -import "cnv_somatic_tasks.wdl" as CNVSomatic +import "cnv_common_tasks.wdl" as CNVTasks workflow CNVSomaticCopyRatioBAMWorkflow { # Workflow input files @@ -26,7 +26,7 @@ workflow CNVSomaticCopyRatioBAMWorkflow { # If no padded target file is input, then do WGS workflow Boolean is_wgs = select_first([padded_targets, ""]) == "" - call CNVSomatic.CollectCoverage { + call CNVTasks.CollectCoverage { input: padded_targets = padded_targets, bam = bam, @@ -37,7 +37,7 @@ workflow CNVSomaticCopyRatioBAMWorkflow { gatk_jar = gatk_jar } - call CNVSomatic.AnnotateTargets { + call CNVTasks.AnnotateTargets { input: entity_id = CollectCoverage.entity_id, targets = CollectCoverage.coverage, @@ -47,7 +47,7 @@ workflow CNVSomaticCopyRatioBAMWorkflow { gatk_jar = gatk_jar } - call CNVSomatic.CorrectGCBias { + call CNVTasks.CorrectGCBias { input: entity_id = CollectCoverage.entity_id, coverage = CollectCoverage.coverage, diff --git a/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl b/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl index 0f6bfbb642b..7664fffd595 100644 --- a/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl +++ b/scripts/cnv_wdl/somatic/cnv_somatic_pair_workflow.wdl @@ -22,7 +22,7 @@ # ############# -import "cnv_somatic_tasks.wdl" as CNVSomatic +import "cnv_common_tasks.wdl" as CNVTasks import "cnv_somatic_copy_ratio_bam_workflow.wdl" as CopyRatio import "cnv_somatic_allele_fraction_pair_workflow.wdl" as AlleleFraction @@ -48,7 +48,7 @@ workflow CNVSomaticPairWorkflow { Boolean is_tumor_only = select_first([normal_bam, ""]) == "" if (!is_wgs) { - call CNVSomatic.PadTargets { + call CNVTasks.PadTargets { input: targets = targets, gatk_jar = gatk_jar diff --git a/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl b/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl index 6b63781ed31..30ea0ef53f2 100644 --- a/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl +++ b/scripts/cnv_wdl/somatic/cnv_somatic_panel_workflow.wdl @@ -21,7 +21,7 @@ # ############# -import "cnv_somatic_tasks.wdl" as CNVSomatic +import "cnv_common_tasks.wdl" as CNVTasks workflow CNVSomaticPanelWorkflow { # Workflow input files @@ -42,7 +42,7 @@ workflow CNVSomaticPanelWorkflow { Boolean is_wgs = select_first([targets, ""]) == "" if (!is_wgs) { - call CNVSomatic.PadTargets { + call CNVTasks.PadTargets { input: targets = targets, gatk_jar = gatk_jar @@ -50,7 +50,7 @@ workflow CNVSomaticPanelWorkflow { } scatter (normal_bam in normal_bams) { - call CNVSomatic.CollectCoverage { + call CNVTasks.CollectCoverage { input: padded_targets = PadTargets.padded_targets, bam = normal_bam[0], @@ -69,7 +69,7 @@ workflow CNVSomaticPanelWorkflow { gatk_jar = gatk_jar } - call CNVSomatic.AnnotateTargets { + call CNVTasks.AnnotateTargets { input: entity_id = combined_entity_id, targets = CollectCoverage.coverage[0], @@ -79,7 +79,7 @@ workflow CNVSomaticPanelWorkflow { gatk_jar = gatk_jar } - call CNVSomatic.CorrectGCBias { + call CNVTasks.CorrectGCBias { input: entity_id = combined_entity_id, coverage = CombineReadCounts.combined_coverage, diff --git a/scripts/m2_cromwell_tests/run_m2_wdl.sh b/scripts/m2_cromwell_tests/run_m2_wdl.sh index 9cf074565b9..8dbb8bb87db 100644 --- a/scripts/m2_cromwell_tests/run_m2_wdl.sh +++ b/scripts/m2_cromwell_tests/run_m2_wdl.sh @@ -28,7 +28,7 @@ cd $WORKING_DIR/ echo "Running M2 WDL through cromwell (T/N)" ln -fs $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2.wdl -sudo java -jar ~/cromwell-0.25.jar run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2_multi_sample.wdl $WORKING_DIR/test_m2_wdl_multi_mod.json - $WORKING_DIR/test_m2_wdl.metadata +sudo java -jar ~/cromwell-0.26.jar run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2_multi_sample.wdl $WORKING_DIR/test_m2_wdl_multi_mod.json - $WORKING_DIR/test_m2_wdl.metadata echo "Running M2 WDL through cromwell (Tumor-only)" -sudo java -jar ~/cromwell-0.25.jar run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2_multi_sample.wdl $WORKING_DIR/test_m2_wdl_multi_mod_to.json - $WORKING_DIR/test_m2_wdl_to.metadata +sudo java -jar ~/cromwell-0.26.jar run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2_multi_sample.wdl $WORKING_DIR/test_m2_wdl_multi_mod_to.json - $WORKING_DIR/test_m2_wdl_to.metadata diff --git a/src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/CoverageModelEMComputeBlock.java b/src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/CoverageModelEMComputeBlock.java index 78dbdd0bba3..6fc97b323ea 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/CoverageModelEMComputeBlock.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/CoverageModelEMComputeBlock.java @@ -1311,7 +1311,7 @@ public Duplicable apply(final Map parents) { final INDArray zz_ll = zz_sll.get(NDArrayIndex.point(si), NDArrayIndex.all(), NDArrayIndex.all()); /* mean_W_contrib_t = \sum_{m,n} E[W_{tm}] E[W_{tn}] E[z_{sm} z_{sn}] */ final INDArray mean_W_contrib_t = W_tl.mmul(zz_ll).muli(W_tl).sum(1).transpose(); - WzzWT_st.get(NDArrayIndex.point(si), NDArrayIndex.all()).assign(mean_W_contrib_t); + WzzWT_st.getRow(si).assign(mean_W_contrib_t); } return new DuplicableNDArray(WzzWT_st); } diff --git a/src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/CoverageModelEMWorkspace.java b/src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/CoverageModelEMWorkspace.java index c3123b2dbbe..f1a137d17e6 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/CoverageModelEMWorkspace.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/CoverageModelEMWorkspace.java @@ -1007,8 +1007,7 @@ public SubroutineSignal updateBiasLatentPosteriorExpectations(final double admix final INDArray G_ll = CoverageModelEMWorkspaceMathUtils.minv(shared_ll .add(G_partial_sll.get(NDArrayIndex.point(si), NDArrayIndex.all(), NDArrayIndex.all()))); /* E[z_s] = G_s W^T M_{st} \Psi_{st}^{-1} (m_{st} - m_t) */ - new_z_sl.get(NDArrayIndex.point(si), NDArrayIndex.all()) - .assign(G_ll.mmul(z_rhs_ls.get(NDArrayIndex.all(), NDArrayIndex.point(si))).transpose()); + new_z_sl.getRow(si).assign(G_ll.mmul(z_rhs_ls.getColumn(si)).transpose()); /* E[z_s z_s^T] = G_s + E[z_s] E[z_s^T] */ final INDArray z = new_z_sl.get(NDArrayIndex.point(si), NDArrayIndex.all()); new_zz_sll.get(NDArrayIndex.point(si), NDArrayIndex.all(), NDArrayIndex.all()) @@ -2458,7 +2457,7 @@ protected INDArray getViterbiAsNDArray(final List