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

Moving up ability to set mismatch quality related filter thresholds to the input YAML #169

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
15 changes: 12 additions & 3 deletions definitions/detect_variants_nonhuman.wdl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ workflow detectVariantsNonhuman {
Array[String] variants_to_table_fields = ["CHROM", "POS", "ID", "REF", "ALT", "set", "AC", "AF"]
Array[String] variants_to_table_genotype_fields = ["GT", "AD"]
Array[String] vep_to_table_fields = []

Int? max_mm_qualsum_diff
Int? max_var_mm_qualsum
}

call m.mutect {
Expand All @@ -77,7 +80,9 @@ workflow detectVariantsNonhuman {
normal_bam_bai=normal_bam_bai,
interval_list=roi_intervals,
scatter_count=scatter_count,
fp_min_var_freq=fp_min_var_freq
fp_min_var_freq=fp_min_var_freq,
max_mm_qualsum_diff=max_mm_qualsum_diff,
max_var_mm_qualsum=max_var_mm_qualsum
}

call sapp.strelkaAndPostProcessing as strelka {
Expand All @@ -94,7 +99,9 @@ workflow detectVariantsNonhuman {
cpu_reserved=strelka_cpu_reserved,
normal_sample_name=normal_sample_name,
tumor_sample_name=tumor_sample_name,
fp_min_var_freq=fp_min_var_freq
fp_min_var_freq=fp_min_var_freq,
max_mm_qualsum_diff=max_mm_qualsum_diff,
max_var_mm_qualsum=max_var_mm_qualsum
}

call vpapp.varscanPreAndPostProcessing as varscan {
Expand All @@ -114,7 +121,9 @@ workflow detectVariantsNonhuman {
p_value=varscan_p_value,
max_normal_freq=varscan_max_normal_freq,
normal_sample_name=normal_sample_name,
tumor_sample_name=tumor_sample_name
tumor_sample_name=tumor_sample_name,
max_mm_qualsum_diff=max_mm_qualsum_diff,
max_var_mm_qualsum=max_var_mm_qualsum
}

call cv.combineVariants as combine {
Expand Down
7 changes: 6 additions & 1 deletion definitions/somatic_exome_nonhuman.wdl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ workflow somaticExomeNonhuman {

String tumor_sample_name
String normal_sample_name

Int? max_mm_qualsum_diff
Int? max_var_mm_qualsum
}

call aen.alignmentExomeNonhuman as tumorAlignmentAndQc {
Expand Down Expand Up @@ -161,7 +164,9 @@ workflow somaticExomeNonhuman {
vep_to_table_fields=vep_to_table_fields,
tumor_sample_name=tumor_sample_name,
normal_sample_name=normal_sample_name,
strelka_exome_mode=true
strelka_exome_mode=true,
max_mm_qualsum_diff=max_mm_qualsum_diff,
max_var_mm_qualsum=max_var_mm_qualsum
}

call btc.bamToCram as tumorBamToCram {
Expand Down
4 changes: 4 additions & 0 deletions definitions/subworkflows/fp_filter.wdl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ workflow fpFilter {
String variant_caller
String? sample_name
Float? fp_min_var_freq
Int? max_mm_qualsum_diff
Int? max_var_mm_qualsum
}

call vs.vcfSanitize as sanitizeVcf {
Expand Down Expand Up @@ -54,6 +56,8 @@ workflow fpFilter {
vcf=index.indexed_vcf,
sample_name=sample_name,
fp_min_var_freq=fp_min_var_freq,
max_mm_qualsum_diff=max_mm_qualsum_diff,
max_var_mm_qualsum=max_var_mm_qualsum,
output_vcf_basename = variant_caller + "_full"
}

Expand Down
7 changes: 6 additions & 1 deletion definitions/subworkflows/mutect.wdl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ workflow mutect {
Int scatter_count
String tumor_sample_name
Float? fp_min_var_freq

Int? max_mm_qualsum_diff
Int? max_var_mm_qualsum
}

call sil.splitIntervalList {
Expand Down Expand Up @@ -66,7 +69,9 @@ workflow mutect {
vcf_tbi=indexVcf.indexed_vcf_tbi,
variant_caller="mutect",
sample_name=tumor_sample_name,
fp_min_var_freq=fp_min_var_freq
fp_min_var_freq=fp_min_var_freq,
max_mm_qualsum_diff=max_mm_qualsum_diff,
max_var_mm_qualsum=max_var_mm_qualsum
}

output {
Expand Down
8 changes: 7 additions & 1 deletion definitions/subworkflows/strelka_and_post_processing.wdl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ workflow strelkaAndPostProcessing {
File? call_regions_tbi

Float? fp_min_var_freq

Int? max_mm_qualsum_diff
Int? max_var_mm_qualsum

}

call s.strelka {
Expand Down Expand Up @@ -99,7 +103,9 @@ workflow strelkaAndPostProcessing {
vcf_tbi=regionFilter.filtered_vcf_tbi,
sample_name=tumor_sample_name,
variant_caller="strelka",
fp_min_var_freq=fp_min_var_freq
fp_min_var_freq=fp_min_var_freq,
max_mm_qualsum_diff=max_mm_qualsum_diff,
max_var_mm_qualsum=max_var_mm_qualsum
}

output {
Expand Down
6 changes: 6 additions & 0 deletions definitions/subworkflows/varscan_pre_and_post_processing.wdl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ workflow varscanPreAndPostProcessing {
Float? p_value
Float? max_normal_freq
Int scatter_count = 50

Int? max_mm_qualsum_diff
Int? max_var_mm_qualsum

}

call sil.splitIntervalList {
Expand Down Expand Up @@ -156,6 +160,8 @@ workflow varscanPreAndPostProcessing {
vcf_tbi=index.indexed_vcf_tbi,
fp_min_var_freq=varscan_min_var_freq,
sample_name=tumor_sample_name,
max_mm_qualsum_diff=max_mm_qualsum_diff,
max_var_mm_qualsum=max_var_mm_qualsum,
variant_caller="varscan"
}

Expand Down
14 changes: 13 additions & 1 deletion definitions/tools/fp_filter.wdl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ task fpFilter {
String output_vcf_basename = "fpfilter"
String sample_name = "TUMOR"
Float fp_min_var_freq = 0.05
Int? max_mm_qualsum_diff
Int? max_var_mm_qualsum
}

Int space_needed_gb = 10 + round(size(vcf, "GB")*2 + size([reference, reference_fai, reference_dict, bam], "GB"))
Expand All @@ -26,7 +28,17 @@ task fpFilter {

String output_vcf = output_vcf_basename + ".vcf"
command <<<
/usr/bin/perl /usr/bin/fpfilter.pl --bam-readcount /usr/bin/bam-readcount --samtools /opt/samtools/bin/samtools --output ~{output_vcf} --reference ~{reference} --bam-file ~{bam} --vcf-file ~{vcf} --sample ~{sample_name} --min-var-freq ~{fp_min_var_freq}
/usr/bin/perl /usr/bin/fpfilter.pl \
--bam-readcount /usr/bin/bam-readcount \
--samtools /opt/samtools/bin/samtools \
--output ~{output_vcf} \
--reference ~{reference} \
--bam-file ~{bam} \
--vcf-file ~{vcf} \
--sample ~{sample_name} \
--min-var-freq ~{fp_min_var_freq} \
~{if defined(max_mm_qualsum_diff) then "--max-mm-qualsum-diff ~{max_mm_qualsum_diff}" else ""} \
~{if defined(max_var_mm_qualsum) then "--max_var_mm_qualsum ~{max_var_mm_qualsum}" else ""}
>>>

output {
Expand Down
Binary file modified workflows.zip
100644 → 100755
Binary file not shown.
Loading