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

External AF SVID INFO key is String type #283

Merged
merged 1 commit into from
Jan 14, 2022
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
Empty file added la
Empty file.
46 changes: 23 additions & 23 deletions wdl/AnnotateExternalAF.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ workflow AnnotateExternalAF {
RuntimeAttr? runtime_attr_select_matched_svs

}
call SplitBed as split_ref_bed{
call SplitBed as split_ref_bed {
input:
bed = ref_bed,
sv_base_mini_docker = sv_base_mini_docker,
runtime_attr_override = runtime_attr_split_ref_bed
}
call SplitVcf as split_query_vcf{
call SplitVcf as split_query_vcf {
input:
vcf = vcf,
sv_pipeline_docker = sv_pipeline_docker,
Expand Down Expand Up @@ -82,20 +82,20 @@ workflow AnnotateExternalAF {
vcfs = AnnotateExternalAFperContig.annotated_vcf,
vcfs_idx = AnnotateExternalAFperContig.annotated_vcf_tbi,
naive = true,
outfile_prefix = "~{prefix}.annotated.vcf",
outfile_prefix = "~{prefix}.annotated",
sv_base_mini_docker = sv_base_mini_docker,
runtime_attr_override = runtime_override_combine_vcfs
}

output{
output {
File annotated_vcf = CombineVcfStep2.concat_vcf
File annotated_vcf_tbi = CombineVcfStep2.concat_vcf_idx
}

}

task SplitBed{
input{
task SplitBed {
input {
File bed
String sv_base_mini_docker
RuntimeAttr? runtime_attr_override
Expand Down Expand Up @@ -133,7 +133,7 @@ task SplitBed{
cat header <(zcat ~{bed} | awk '{if ($6=="BND" || $6=="CTX") print}' ) > ~{prefix}.BND_CTX.bed
>>>

output{
output {
File del = "~{prefix}.DEL.bed"
File dup = "~{prefix}.DUP.bed"
File ins = "~{prefix}.INS.bed"
Expand All @@ -142,8 +142,8 @@ task SplitBed{
}
}

task SplitVcf{
input{
task SplitVcf {
input {
File vcf
String sv_pipeline_docker
RuntimeAttr? runtime_attr_override
Expand Down Expand Up @@ -187,7 +187,7 @@ task SplitVcf{
cat header <(awk '{if ($5=="BND" || $5=="CTX") print}' ~{prefix}.bed )> ~{prefix}.BND_CTX.bed
>>>

output{
output {
File bed = "~{prefix}.bed"
File del = "~{prefix}.DEL.bed"
File dup = "~{prefix}.DUP.bed"
Expand All @@ -197,8 +197,8 @@ task SplitVcf{
}
}

task BedtoolsClosest{
input{
task BedtoolsClosest {
input {
File bed_a
File bed_b
String svtype
Expand Down Expand Up @@ -237,13 +237,13 @@ task BedtoolsClosest{
bedtools closest -wo -a <(sort -k1,1 -k2,2n filea.bed) -b <(sort -k1,1 -k2,2n fileb.bed) >> ~{svtype}.bed
>>>

output{
output {
File output_bed = "~{svtype}.bed"
}
}

task SelectMatchedSVs{
input{
task SelectMatchedSVs {
input {
File input_bed
String svtype
Array[String] population
Expand Down Expand Up @@ -282,13 +282,13 @@ task SelectMatchedSVs{
-p ~{pop_list}
>>>

output{
output {
File output_comp = "~{prefix}.comparison"
}
}

task SelectMatchedINSs{
input{
task SelectMatchedINSs {
input {
File input_bed
String svtype
Array[String] population
Expand Down Expand Up @@ -327,13 +327,13 @@ task SelectMatchedINSs{
-p ~{pop_list}
>>>

output{
output {
File output_comp = "~{prefix}.comparison"
}
}

task ModifyVcf{
input{
task ModifyVcf {
input {
Array[File] labeled_del
Array[File] labeled_dup
Array[File] labeled_ins
Expand Down Expand Up @@ -387,7 +387,7 @@ task ModifyVcf{
else:
body[pin[2]]=pin
SVID_key.append(pin[2])
header.append(['##INFO=<ID='+"~{ref_prefix}"+'_SVID'+',Number=1,Type=Float,Description="Allele frequency (for biallelic sites) or copy-state frequency (for multiallelic sites) of an overlapping event in gnomad.">'])
header.append(['##INFO=<ID='+"~{ref_prefix}"+'_SVID'+',Number=1,Type=String,Description="SVID of an overlapping event in gnomad used for external allele frequency annotation.">'])

fin.close()
fin=open('labeled.bed')
Expand Down Expand Up @@ -419,7 +419,7 @@ task ModifyVcf{
tabix ~{prefix}.annotated.vcf.gz
>>>

output{
output {
File annotated_vcf = "~{prefix}.annotated.vcf.gz"
File annotated_vcf_tbi = "~{prefix}.annotated.vcf.gz.tbi"
}
Expand Down
6 changes: 3 additions & 3 deletions wdl/AnnotateExternalAFperContig.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "Structs.wdl"
import "TasksMakeCohortVcf.wdl" as MiniTasks

workflow AnnotateExternalAFperContig {
input{
input {
File vcf
File vcf_idx
File ref_bed
Expand Down Expand Up @@ -148,7 +148,7 @@ workflow AnnotateExternalAFperContig {


scatter (vcf_shard in SplitVcf.vcf_shards) {
call ModifyVcf{
call ModifyVcf {
input:
labeled_del = calcu_del.output_comp,
labeled_dup = calcu_dup.output_comp,
Expand Down Expand Up @@ -468,7 +468,7 @@ task ModifyVcf {
else:
body[pin[2]]=pin
SVID_key.append(pin[2])
header.append(['##INFO=<ID='+"~{ref_prefix}"+'_SVID'+',Number=1,Type=Float,Description="Allele frequency (for biallelic sites) or copy-state frequency (for multiallelic sites) of an overlapping event in gnomad.">'])
header.append(['##INFO=<ID='+"~{ref_prefix}"+'_SVID'+',Number=1,Type=String,Description="SVID of an overlapping event in gnomad used for external allele frequency annotation.">'])

fin.close()
fin=open('labeled.bed')
Expand Down