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

Add WDL script for normalizing VCF files by removing HAPCOMP and HAPDOM fields" #470

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
output indexed files
  • Loading branch information
shadizaheri committed Sep 15, 2024
commit af3c2cad53fd92f58c983e96aec45b382c90a703
18 changes: 12 additions & 6 deletions wdl/malaria/NormalizeVCF.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ workflow NormalizeVCF {
input {
File input_vcf
File reference_fa
String sample_name # New input for sample name
Int disk_size_gb = 20
Int memory_gb = 4
Int cpu_cores = 1
String sample_name
Int disk_size_gb = 30
Int memory_gb = 8
Int cpu_cores = 4
}

call RemoveHAPCOMP {
Expand Down Expand Up @@ -38,6 +38,7 @@ workflow NormalizeVCF {

output {
File normalized_vcf = NormalizeVCFFile.output_vcf
File normalized_vcf_index = NormalizeVCFFile.output_vcf_index
}
}

Expand All @@ -61,7 +62,7 @@ task RemoveHAPCOMP {
docker: "us.gcr.io/broad-dsp-lrma/bcftools_htslib:v9152024"
memory: "~{memory_gb}G"
cpu: "~{cpu_cores}"
disks: "local-disk ~{disk_size_gb} HDD"
disks: "local-disk ~{disk_size_gb} SSD"
}
}

Expand All @@ -85,7 +86,7 @@ task RemoveHAPDOM {
docker: "us.gcr.io/broad-dsp-lrma/bcftools_htslib:v9152024"
memory: "~{memory_gb}G"
cpu: "~{cpu_cores}"
disks: "local-disk ~{disk_size_gb} HDD"
disks: "local-disk ~{disk_size_gb} SSD"
}
}

Expand All @@ -100,11 +101,16 @@ task NormalizeVCFFile {
}

command {
# Normalize the VCF
bcftools norm -m -any --atom-overlaps . -f ~{reference_fa} ~{input_vcf} | bgzip -c > ~{sample_name}.norm.vcf.gz

# Index the normalized VCF
bcftools index ~{sample_name}.norm.vcf.gz
}

output {
File output_vcf = "~{sample_name}.norm.vcf.gz"
File output_vcf_index = "~{sample_name}.norm.vcf.gz.csi"
}

runtime {
Expand Down
Loading