Skip to content

Commit

Permalink
Add Mutect3 dataset generation to Mutect2 WDL (#7992)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbenjamin committed Aug 18, 2022
1 parent 05a7634 commit c28e244
Show file tree
Hide file tree
Showing 11 changed files with 238 additions and 969 deletions.
4 changes: 0 additions & 4 deletions scripts/m2_cromwell_tests/mutect2.inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"Mutect2.intervals": "gs://gatk-best-practices/somatic-b37/whole_exome_agilent_1.1_refseq_plus_3_boosters.Homo_sapiens_assembly19.baits.interval_list",
"Mutect2.scatter_count": 50,
"Mutect2.m2_extra_args": "--downsampling-stride 20 --max-reads-per-alignment-start 6 --max-suspicious-reads-per-alignment-start 6",
"Mutect2.filter_funcotations": "True",
"Mutect2.funco_reference_version": "hg19",
"Mutect2.funco_data_sources_tar_gz": "gs://broad-public-datasets/funcotator/funcotator_dataSources.v1.6.20190124s.tar.gz",
"Mutect2.funco_transcript_selection_list": "gs://broad-public-datasets/funcotator/transcriptList.exact_uniprot_matches.AKT1_CRLF2_FGFR1.txt",

"Mutect2.ref_fasta": "gs://gatk-best-practices/somatic-b37/Homo_sapiens_assembly19.fasta",
"Mutect2.ref_dict": "gs://gatk-best-practices/somatic-b37/Homo_sapiens_assembly19.dict",
Expand Down
2 changes: 0 additions & 2 deletions scripts/m2_cromwell_tests/pair_list

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/m2_cromwell_tests/pair_list_tumor_only

This file was deleted.

14 changes: 7 additions & 7 deletions scripts/m2_cromwell_tests/run_m2_wdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ echo "Creating tar.gz for Funcotator datasources =========="
pushd .
FUNCOTATOR_TEST_DS_DIR=${WORKING_DIR}/gatk/src/test/resources/large/funcotator/
cd ${FUNCOTATOR_TEST_DS_DIR}
# First parameter must match Mutect2_Multi.funco_data_sources_tar_gz test_m2_wdl_multi.json
# First parameter must match Mutect2_Multi.funco_data_sources_tar_gz test_m2_wdl.json
tar zcvf ${WORKING_DIR}/gatk/small_ds_pik3ca.tar.gz small_ds_pik3ca/*
popd

Expand All @@ -35,24 +35,24 @@ fi
echo "Docker build done =========="
echo "Putting the newly built docker image into the json parameters"
cd $WORKING_DIR/gatk/scripts/
sed -r "s/__GATK_DOCKER__/broadinstitute\/gatk\:$HASH_TO_USE/g" m2_cromwell_tests/test_m2_wdl_multi.json >$WORKING_DIR/test_m2_wdl_multi_mod.json
sed -r "s/__GATK_DOCKER__/broadinstitute\/gatk\:$HASH_TO_USE/g" m2_cromwell_tests/test_m2_wdl.json >$WORKING_DIR/test_m2_wdl_mod.json
echo "JSON FILE (modified) ======="
cat $WORKING_DIR/test_m2_wdl_multi_mod.json
cat $WORKING_DIR/test_m2_wdl_mod.json
sed -r "s/__GATK_DOCKER__/broadinstitute\/gatk\:$HASH_TO_USE/g" m2_cromwell_tests/test_mitochondria_m2_wdl.json >$WORKING_DIR/test_mitochondria_m2_wdl_mod.json
echo "JSON FILE (modified) ======="
cat $WORKING_DIR/test_mitochondria_m2_wdl_mod.json
echo "=================="

# Create the tumor-only json by using the pair_list_tumor_only file
sed -r "s/\"pair_list/\"pair_list_tumor_only/g" $WORKING_DIR/test_m2_wdl_multi_mod.json >$WORKING_DIR/test_m2_wdl_multi_mod_to.json
# Create the tumor-only json by removing normal_reads and normal_reads_index from the input json
grep -v 'Mutect2.normal_reads' $WORKING_DIR/test_m2_wdl_mod.json >$WORKING_DIR/test_m2_wdl_mod_to.json
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_JAR run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2_multi_sample.wdl -i $WORKING_DIR/test_m2_wdl_multi_mod.json -m $WORKING_DIR/test_m2_wdl.metadata
sudo java -jar $CROMWELL_JAR run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2.wdl -i $WORKING_DIR/test_m2_wdl_mod.json -m $WORKING_DIR/test_m2_wdl.metadata

echo "Running M2 WDL through cromwell (Tumor-only)"
sudo java -jar $CROMWELL_JAR run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2_multi_sample.wdl -i $WORKING_DIR/test_m2_wdl_multi_mod_to.json -m $WORKING_DIR/test_m2_wdl_to.metadata
sudo java -jar $CROMWELL_JAR run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2.wdl -i $WORKING_DIR/test_m2_wdl_mod_to.json -m $WORKING_DIR/test_m2_wdl_to.metadata

echo "Running Mitochondria M2 WDL through cromwell"
ln -fs $WORKING_DIR/gatk/scripts/mitochondria_m2_wdl/AlignAndCall.wdl
Expand Down
16 changes: 16 additions & 0 deletions scripts/m2_cromwell_tests/test_m2_wdl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"Mutect2.gatk_docker": "__GATK_DOCKER__",
"Mutect2.intervals": "/home/runner/work/gatk/gatk/scripts/m2_cromwell_tests/interval_list.interval_list",
"Mutect2.ref_fasta": "/home/runner/work/gatk/gatk/src/test/resources/large/human_g1k_v37.20.21.fasta",
"Mutect2.ref_fai": "/home/runner/work/gatk/gatk/src/test/resources/large/human_g1k_v37.20.21.fasta.fai",
"Mutect2.ref_dict": "/home/runner/work/gatk/gatk/src/test/resources/large/human_g1k_v37.20.21.dict",
"Mutect2.tumor_reads": "/home/runner/work/gatk/gatk/src/test/resources/large/mutect/dream_synthetic_bams/tumor_1.bam",
"Mutect2.tumor_reads_index": "/home/runner/work/gatk/gatk/src/test/resources/large/mutect/dream_synthetic_bams/tumor_1.bam.bai",
"Mutect2.normal_reads": "/home/runner/work/gatk/gatk/src/test/resources/large/mutect/dream_synthetic_bams/normal_1.bam",
"Mutect2.normal_reads_index": "/home/runner/work/gatk/gatk/src/test/resources/large/mutect/dream_synthetic_bams/normal_1.bam.bai",
"Mutect2.scatter_count": 2,
"Mutect2.run_orientation_bias_mixture_model_filter": true,
"Mutect2.preemptible": 2,
"Mutect2.compress_vcfs": false,
"Mutect2.make_bamout": true
}
16 changes: 0 additions & 16 deletions scripts/m2_cromwell_tests/test_m2_wdl_multi.json

This file was deleted.

Loading

0 comments on commit c28e244

Please sign in to comment.