From 6dc760ae4153fe51b79d01d8ef1ed06085ea67cc Mon Sep 17 00:00:00 2001 From: lichtens Date: Thu, 27 Sep 2018 15:06:13 -0400 Subject: [PATCH 1/3] Adding excluded funcotator fields to the mutect2 wdl and to the docs in funcotator (unsupported) WDL --- scripts/mutect2_wdl/mutect2.wdl | 10 ++++++++-- scripts/mutect2_wdl/unsupported/funcotator.wdl | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/mutect2_wdl/mutect2.wdl b/scripts/mutect2_wdl/mutect2.wdl index 96636e384af..936b76b89d8 100755 --- a/scripts/mutect2_wdl/mutect2.wdl +++ b/scripts/mutect2_wdl/mutect2.wdl @@ -52,6 +52,7 @@ ## funco_data_sources_tar_gz: Funcotator datasources tar gz file. Bucket location is recommended when running on the cloud. ## funco_annotation_defaults: Default values for annotations, when values are unspecified. Specified as :. For example: "Center:Broad" ## funco_annotation_overrides: Values for annotations, even when values are unspecified. Specified as :. For example: "Center:Broad" +## funcotator_excluded_fields: Annotations that should not appear in the output (VCF or MAF). Specified as . For example: "ClinVar_ALLELEID" ## ## Outputs : ## - One VCF file and its index with primary filtering applied; secondary filtering and functional annotation if requested; a bamout.bam @@ -111,6 +112,7 @@ workflow Mutect2 { String? sequencing_center String? sequence_source File? default_config_file + String? oncotator_extra_args # funcotator inputs Boolean? run_funcotator @@ -121,6 +123,8 @@ workflow Mutect2 { File? funco_transcript_selection_list Array[String]? funco_annotation_defaults Array[String]? funco_annotation_overrides + Array[String]? funcotator_excluded_fields + String? funcotator_extra_args File? gatk_override @@ -133,8 +137,6 @@ workflow Mutect2 { Boolean filter_oncotator_maf_or_default = select_first([filter_oncotator_maf, true]) Boolean? filter_funcotations Boolean filter_funcotations_or_default = select_first([filter_funcotations, true]) - String? oncotator_extra_args - String? funcotator_extra_args Int? preemptible_attempts Int? max_retries @@ -424,6 +426,7 @@ workflow Mutect2 { gatk_docker = gatk_docker, gatk_override = gatk_override, filter_funcotations = filter_funcotations_or_default, + funcotator_excluded_fields = funcotator_excluded_fields, sequencing_center = sequencing_center, sequence_source = sequence_source, disk_space_gb = ceil(size(funcotate_vcf_input, "GB") * large_input_to_output_multiplier) + onco_tar_size + disk_pad, @@ -1191,6 +1194,7 @@ task FuncotateMaf { File? transcript_selection_list Array[String]? annotation_defaults Array[String]? annotation_overrides + Array[String]? funcotator_excluded_fields Boolean filter_funcotations File? interval_list @@ -1201,6 +1205,7 @@ task FuncotateMaf { String annotation_def_arg = if defined(annotation_defaults) then " --annotation-default " else "" String annotation_over_arg = if defined(annotation_overrides) then " --annotation-override " else "" String filter_funcotations_args = if (filter_funcotations) then " --remove-filtered-variants " else "" + String excluded_fields_args = if defined(funcotator_excluded_fields) then " --exclusion-list " else "" String final_output_filename = basename(input_vcf, ".vcf") + ".maf.annotated" # ============== @@ -1263,6 +1268,7 @@ task FuncotateMaf { --annotation-default source:${default="Unknown" sequence_source} \ ${annotation_def_arg}${default="" sep=" --annotation-default " annotation_defaults} \ ${annotation_over_arg}${default="" sep=" --annotation-override " annotation_overrides} \ + ${excluded_fields_args}${default="" sep=" --exclusion-list " funcotator_excluded_fields} \ ${filter_funcotations_args} \ ${extra_args} >>> diff --git a/scripts/mutect2_wdl/unsupported/funcotator.wdl b/scripts/mutect2_wdl/unsupported/funcotator.wdl index ed2e852a5ee..fc9b67f2e7f 100644 --- a/scripts/mutect2_wdl/unsupported/funcotator.wdl +++ b/scripts/mutect2_wdl/unsupported/funcotator.wdl @@ -20,7 +20,7 @@ # annotation_defaults - Annotations to include in all annotated variants if the annotation is not specified in the data sources (in the format :). This will add the specified annotation to every annotated variant if it is not already present. # annotation_overrides - Override values for annotations (in the format :). Replaces existing annotations of the given name with given values. # gatk4_jar_override - Override Jar file containing GATK 4.0. Use this when overriding the docker JAR or when using a backend without docker. -# funcotator_extra_args - Extra command-line arguments to pass through to Funcotator. +# funcotator_extra_args - Extra command-line arguments to pass through to Funcotator. (e.g. " --exclusion-list foo_field --exclusion-list bar_field ") # # This WDL needs to decide whether to use the ``gatk_jar`` or ``gatk_jar_override`` for the jar location. As of cromwell-0.24, # this logic *must* go into each task. Therefore, there is a lot of duplicated code. This allows users to specify a jar file From c357162ba71ab0816e972f6a002a71741d7cb403 Mon Sep 17 00:00:00 2001 From: lichtens Date: Thu, 27 Sep 2018 15:40:08 -0400 Subject: [PATCH 2/3] Adding excluded funcotator fields to the mutect2 nio wdl --- scripts/mutect2_wdl/mutect2_nio.wdl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/mutect2_wdl/mutect2_nio.wdl b/scripts/mutect2_wdl/mutect2_nio.wdl index 0306b11ee76..f956d447a0c 100755 --- a/scripts/mutect2_wdl/mutect2_nio.wdl +++ b/scripts/mutect2_wdl/mutect2_nio.wdl @@ -55,6 +55,7 @@ ## funco_data_sources_tar_gz: Funcotator datasources tar gz file. Bucket location is recommended when running on the cloud. ## funco_annotation_defaults: Default values for annotations, when values are unspecified. Specified as :. For example: "Center:Broad" ## funco_annotation_overrides: Values for annotations, even when values are unspecified. Specified as :. For example: "Center:Broad" +## funcotator_excluded_fields: Annotations that should not appear in the output (VCF or MAF). Specified as . For example: "ClinVar_ALLELEID" ## ## Outputs : ## - One VCF file and its index with primary filtering applied; secondary filtering and functional annotation if requested; a bamout.bam @@ -107,6 +108,7 @@ workflow Mutect2 { String? sequencing_center String? sequence_source File? default_config_file + String? oncotator_extra_args # funcotator inputs Boolean? run_funcotator @@ -117,6 +119,8 @@ workflow Mutect2 { File? funco_transcript_selection_list Array[String]? funco_annotation_defaults Array[String]? funco_annotation_overrides + Array[String]? funcotator_excluded_fields + String? funcotator_extra_args File? gatk_override @@ -129,8 +133,6 @@ workflow Mutect2 { Boolean filter_oncotator_maf_or_default = select_first([filter_oncotator_maf, true]) Boolean? filter_funcotations Boolean filter_funcotations_or_default = select_first([filter_funcotations, true]) - String? oncotator_extra_args - String? funcotator_extra_args Int? preemptible_attempts Int? max_retries @@ -373,6 +375,7 @@ workflow Mutect2 { gatk_docker = gatk_docker, gatk_override = gatk_override, filter_funcotations = filter_funcotations_or_default, + funcotator_excluded_fields = funcotator_excluded_fields, sequencing_center = sequencing_center, sequence_source = sequence_source, disk_space_gb = ceil(size(funcotate_vcf_input, "GB") * large_input_to_output_multiplier) + funco_tar_size + disk_pad, @@ -1013,6 +1016,7 @@ task FuncotateMaf { File? transcript_selection_list Array[String]? annotation_defaults Array[String]? annotation_overrides + Array[String]? funcotator_excluded_fields Boolean filter_funcotations File? interval_list @@ -1023,6 +1027,7 @@ task FuncotateMaf { String annotation_def_arg = if defined(annotation_defaults) then " --annotation-default " else "" String annotation_over_arg = if defined(annotation_overrides) then " --annotation-override " else "" String filter_funcotations_args = if (filter_funcotations) then " --remove-filtered-variants " else "" + String excluded_fields_args = if defined(funcotator_excluded_fields) then " --exclusion-list " else "" String final_output_filename = basename(input_vcf, ".vcf") + ".maf.annotated" # ============== @@ -1085,6 +1090,7 @@ task FuncotateMaf { --annotation-default source:${default="Unknown" sequence_source} \ ${annotation_def_arg}${default="" sep=" --annotation-default " annotation_defaults} \ ${annotation_over_arg}${default="" sep=" --annotation-override " annotation_overrides} \ + ${excluded_fields_args}${default="" sep=" --exclusion-list " funcotator_excluded_fields} \ ${filter_funcotations_args} \ ${extra_args} >>> From f1b035cb2c438b2ac19fe1781d7014b55ec4e641 Mon Sep 17 00:00:00 2001 From: lichtens Date: Fri, 28 Sep 2018 16:25:00 -0400 Subject: [PATCH 3/3] Updating field name from other branch --- scripts/mutect2_wdl/mutect2.wdl | 4 ++-- scripts/mutect2_wdl/mutect2_nio.wdl | 4 ++-- scripts/mutect2_wdl/unsupported/funcotator.wdl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/mutect2_wdl/mutect2.wdl b/scripts/mutect2_wdl/mutect2.wdl index 936b76b89d8..a7e29f150ec 100755 --- a/scripts/mutect2_wdl/mutect2.wdl +++ b/scripts/mutect2_wdl/mutect2.wdl @@ -1205,7 +1205,7 @@ task FuncotateMaf { String annotation_def_arg = if defined(annotation_defaults) then " --annotation-default " else "" String annotation_over_arg = if defined(annotation_overrides) then " --annotation-override " else "" String filter_funcotations_args = if (filter_funcotations) then " --remove-filtered-variants " else "" - String excluded_fields_args = if defined(funcotator_excluded_fields) then " --exclusion-list " else "" + String excluded_fields_args = if defined(funcotator_excluded_fields) then " --exclude-field " else "" String final_output_filename = basename(input_vcf, ".vcf") + ".maf.annotated" # ============== @@ -1268,7 +1268,7 @@ task FuncotateMaf { --annotation-default source:${default="Unknown" sequence_source} \ ${annotation_def_arg}${default="" sep=" --annotation-default " annotation_defaults} \ ${annotation_over_arg}${default="" sep=" --annotation-override " annotation_overrides} \ - ${excluded_fields_args}${default="" sep=" --exclusion-list " funcotator_excluded_fields} \ + ${excluded_fields_args}${default="" sep=" --exclude-field " funcotator_excluded_fields} \ ${filter_funcotations_args} \ ${extra_args} >>> diff --git a/scripts/mutect2_wdl/mutect2_nio.wdl b/scripts/mutect2_wdl/mutect2_nio.wdl index f956d447a0c..2f30bfd1b75 100755 --- a/scripts/mutect2_wdl/mutect2_nio.wdl +++ b/scripts/mutect2_wdl/mutect2_nio.wdl @@ -1027,7 +1027,7 @@ task FuncotateMaf { String annotation_def_arg = if defined(annotation_defaults) then " --annotation-default " else "" String annotation_over_arg = if defined(annotation_overrides) then " --annotation-override " else "" String filter_funcotations_args = if (filter_funcotations) then " --remove-filtered-variants " else "" - String excluded_fields_args = if defined(funcotator_excluded_fields) then " --exclusion-list " else "" + String excluded_fields_args = if defined(funcotator_excluded_fields) then " --exclude-field " else "" String final_output_filename = basename(input_vcf, ".vcf") + ".maf.annotated" # ============== @@ -1090,7 +1090,7 @@ task FuncotateMaf { --annotation-default source:${default="Unknown" sequence_source} \ ${annotation_def_arg}${default="" sep=" --annotation-default " annotation_defaults} \ ${annotation_over_arg}${default="" sep=" --annotation-override " annotation_overrides} \ - ${excluded_fields_args}${default="" sep=" --exclusion-list " funcotator_excluded_fields} \ + ${excluded_fields_args}${default="" sep=" --exclude-field " funcotator_excluded_fields} \ ${filter_funcotations_args} \ ${extra_args} >>> diff --git a/scripts/mutect2_wdl/unsupported/funcotator.wdl b/scripts/mutect2_wdl/unsupported/funcotator.wdl index fc9b67f2e7f..eeda7a2763c 100644 --- a/scripts/mutect2_wdl/unsupported/funcotator.wdl +++ b/scripts/mutect2_wdl/unsupported/funcotator.wdl @@ -20,7 +20,7 @@ # annotation_defaults - Annotations to include in all annotated variants if the annotation is not specified in the data sources (in the format :). This will add the specified annotation to every annotated variant if it is not already present. # annotation_overrides - Override values for annotations (in the format :). Replaces existing annotations of the given name with given values. # gatk4_jar_override - Override Jar file containing GATK 4.0. Use this when overriding the docker JAR or when using a backend without docker. -# funcotator_extra_args - Extra command-line arguments to pass through to Funcotator. (e.g. " --exclusion-list foo_field --exclusion-list bar_field ") +# funcotator_extra_args - Extra command-line arguments to pass through to Funcotator. (e.g. " --exclude-field foo_field --exclude-field bar_field ") # # This WDL needs to decide whether to use the ``gatk_jar`` or ``gatk_jar_override`` for the jar location. As of cromwell-0.24, # this logic *must* go into each task. Therefore, there is a lot of duplicated code. This allows users to specify a jar file