Skip to content

Commit 4d1924d

Browse files
Merge pull request #199 from PacificBiosciences/feature/compare-inferred-to-reported-sex
Compare inferred to reported sex for QC
2 parents a6e4cd2 + 0acb3d3 commit 4d1924d

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

workflows/family.wdl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ workflow humanwgs_family {
385385
File? tertiary_sv_filtered_vcf_index = tertiary_analysis.sv_filtered_vcf_index
386386
File? tertiary_sv_filtered_tsv = tertiary_analysis.sv_filtered_tsv
387387

388+
# qc messages
389+
Array[String?] qc_messages = flatten([upstream.msg_qc_sex])
390+
388391
# workflow metadata
389392
String workflow_name = "humanwgs_family"
390393
String workflow_version = "v3.0.0-alpha1" + if defined(debug_version) then "~{"-" + debug_version}" else ""

workflows/singleton.wdl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ workflow humanwgs_singleton {
319319
File? tertiary_sv_filtered_vcf_index = tertiary_analysis.sv_filtered_vcf_index
320320
File? tertiary_sv_filtered_tsv = tertiary_analysis.sv_filtered_tsv
321321

322+
# qc messages
323+
Array[String?] qc_messages = [upstream.msg_qc_sex]
324+
322325
# workflow metadata
323326
String workflow_name = "humanwgs_family"
324327
String workflow_version = "v3.0.0-alpha1" + if defined(debug_version) then "~{"-" + debug_version}" else ""

workflows/upstream/upstream.wdl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ workflow upstream {
100100
runtime_attributes = default_runtime_attributes
101101
}
102102
103+
if (defined(sex) && (mosdepth.inferred_sex != sex)) {
104+
String qc_sex = "~{sample_id}: Reported sex ~{sex} does not match inferred sex ~{mosdepth.inferred_sex}."
105+
}
106+
103107
call DeepVariant.deepvariant {
104108
input:
105109
sample_id = sample_id,
@@ -114,7 +118,7 @@ workflow upstream {
114118
115119
call Sawfish.sawfish_discover {
116120
input:
117-
sex = select_first([sex, mosdepth.inferred_sex]),
121+
sex = mosdepth.inferred_sex,
118122
aligned_bam = aligned_bam_data,
119123
aligned_bam_index = aligned_bam_index,
120124
ref_fasta = ref_map["fasta"], # !FileCoercion
@@ -128,7 +132,7 @@ workflow upstream {
128132
call Trgt.trgt {
129133
input:
130134
sample_id = sample_id,
131-
sex = select_first([sex, mosdepth.inferred_sex]),
135+
sex = mosdepth.inferred_sex,
132136
aligned_bam = aligned_bam_data,
133137
aligned_bam_index = aligned_bam_index,
134138
ref_fasta = ref_map["fasta"], # !FileCoercion
@@ -151,7 +155,7 @@ workflow upstream {
151155
call Hificnv.hificnv {
152156
input:
153157
sample_id = sample_id,
154-
sex = select_first([sex, mosdepth.inferred_sex]),
158+
sex = mosdepth.inferred_sex,
155159
aligned_bam = aligned_bam_data,
156160
aligned_bam_index = aligned_bam_index,
157161
vcf = deepvariant.vcf,
@@ -239,5 +243,8 @@ workflow upstream {
239243
String stat_cnv_DEL_count = hificnv.stat_DEL_count
240244
String stat_cnv_DUP_sum = hificnv.stat_DUP_sum
241245
String stat_cnv_DEL_sum = hificnv.stat_DEL_sum
246+
247+
# qc messages
248+
String? msg_qc_sex = qc_sex
242249
}
243250
}

0 commit comments

Comments
 (0)