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

Hangsu phasing #417

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
add preprocessing
  • Loading branch information
hangsuUNC committed Jan 22, 2024
commit e6536583283ad4d5098fe6842f9880fa48039fcc
35 changes: 33 additions & 2 deletions wdl/pipelines/PacBio/Utility/MergePhasedVCF.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ workflow MergePhasedVCF{
File reference_fasta_fai
}
call FindFiles{input: sampleFolder = SampleFolder}
scatter (bcf_file in FindFiles.vcfFiles){
call preprocess{input: bcf = bcf_file}
}

call VU.CollectDefinitions as CD {
input:
vcfs = FindFiles.vcfFiles
vcfs = preprocess.vcf
}
call VU.MergeAndSortVCFs as Merge {
input:
vcfs = FindFiles.vcfFiles,
vcfs = preprocess.vcf,
ref_fasta_fai = reference_fasta_fai,
prefix = Samplename,
header_definitions_file = CD.union_definitions
Expand Down Expand Up @@ -57,6 +61,33 @@ command {
}
}

task preprocess {
input {
File bcf
}

command {
bcftools view -Oz -o tmp.vcf.gz ~{bcf}
# bcftools sort -o whole_genome_sorted.vcf.gz tmp.vcf.gz
# bcftools index --tbi --force tmp.vcf.gz



}

output {
# Output the list of .bam files
File vcf = "tmp.vcf.gz"
# File whole_genome_vcf_tbi = "tmp.vcf.gz.tbi"

}

runtime {
docker: "us.gcr.io/broad-dsp-lrma/lr-basic:0.1.1"
disks: "local-disk 100 HDD"
}
}

task MergeVcf {
input {
Array[File] vcf_files
Expand Down
8 changes: 4 additions & 4 deletions wdl/pipelines/TechAgnostic/Utility/ConvertToHailMTT2T.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ task preprocess {

command {
bcftools view -Oz -o tmp.vcf.gz ~{bcf}
bcftools sort -o whole_genome_sorted.vcf.gz tmp.vcf.gz
bcftools index --tbi --force whole_genome_sorted.vcf.gz
# bcftools sort -o whole_genome_sorted.vcf.gz tmp.vcf.gz
bcftools index --tbi --force tmp.vcf.gz



}

output {
# Output the list of .bam files
File whole_genome_vcf = "whole_genome_sorted.vcf.gz"
File whole_genome_vcf_tbi = "whole_genome_sorted.vcf.gz.tbi"
File whole_genome_vcf = "tmp.vcf.gz"
File whole_genome_vcf_tbi = "tmp.vcf.gz.tbi"

}

Expand Down
Loading