Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Funcotator excluded fields option explicitly to the M2 WDL. #5242

Merged
merged 3 commits into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions scripts/mutect2_wdl/mutect2.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ANNOTATION>:<VALUE>. For example: "Center:Broad"
## funco_annotation_overrides: Values for annotations, even when values are unspecified. Specified as <ANNOTATION>:<VALUE>. For example: "Center:Broad"
## funcotator_excluded_fields: Annotations that should not appear in the output (VCF or MAF). Specified as <ANNOTATION>. 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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand All @@ -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 " --exclude-field " else ""
String final_output_filename = basename(input_vcf, ".vcf") + ".maf.annotated"
# ==============

Expand Down Expand Up @@ -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=" --exclude-field " funcotator_excluded_fields} \
${filter_funcotations_args} \
${extra_args}
>>>
Expand Down
10 changes: 8 additions & 2 deletions scripts/mutect2_wdl/mutect2_nio.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ANNOTATION>:<VALUE>. For example: "Center:Broad"
## funco_annotation_overrides: Values for annotations, even when values are unspecified. Specified as <ANNOTATION>:<VALUE>. For example: "Center:Broad"
## funcotator_excluded_fields: Annotations that should not appear in the output (VCF or MAF). Specified as <ANNOTATION>. 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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand All @@ -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 " --exclude-field " else ""
String final_output_filename = basename(input_vcf, ".vcf") + ".maf.annotated"
# ==============

Expand Down Expand Up @@ -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=" --exclude-field " funcotator_excluded_fields} \
${filter_funcotations_args} \
${extra_args}
>>>
Expand Down
2 changes: 1 addition & 1 deletion scripts/mutect2_wdl/unsupported/funcotator.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ANNOTATION>:<VALUE>). 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 <ANNOTATION>:<VALUE>). 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. " --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
Expand Down