Skip to content

Commit

Permalink
decomposition strand flip
Browse files Browse the repository at this point in the history
  • Loading branch information
ACEnglish committed Jan 28, 2025
1 parent 84a114d commit 24859cf
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 40 deletions.
Binary file modified repo_utils/answer_key/bench/bench_bnd_decomp/fn.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench_bnd_decomp/fn.vcf.gz.tbi
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench_bnd_decomp/fp.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench_bnd_decomp/fp.vcf.gz.tbi
Binary file not shown.
48 changes: 26 additions & 22 deletions repo_utils/answer_key/bench/bench_bnd_decomp/log.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
2025-01-09 16:25:00,733 [INFO] Truvari v5.0.0
2025-01-09 16:25:00,733 [INFO] Command /data/truvari/__main__.py bench -b repo_utils/test_files/variants/bnd.base.vcf.gz -c repo_utils/test_files/variants/bnd.comp2.vcf.gz --sizemax 1000000000 -p 0 --pick multi -o test_results/bench_bnd_decomp/
2025-01-09 16:25:00,734 [INFO] Params:
2025-01-28 22:35:15,820 [INFO] Truvari v5.0.1.dev0+31b79f9
2025-01-28 22:35:15,822 [INFO] Command /data/truvari/__main__.py bench -b repo_utils/test_files/variants/bnd.base.vcf.gz -c repo_utils/test_files/variants/bnd.comp2.vcf.gz --sizemax 1000000000 -p 0 --pick multi -o test_results/bench_bnd_decomp/
2025-01-28 22:35:15,823 [INFO] Params:
{
"base": "/data/repo_utils/test_files/variants/bnd.base.vcf.gz",
"comp": "/data/repo_utils/test_files/variants/bnd.comp2.vcf.gz",
Expand Down Expand Up @@ -33,32 +33,36 @@
"write_resolved": false,
"decompose": true,
"short_circuit": false,
"skip_gt": false
"skip_gt": false,
"max_resolve": 25000
}
2025-01-09 16:25:00,783 [WARNING] 193 contigs present in comparison VCF header are not in baseline VCF.
2025-01-09 16:25:12,483 [INFO] Zipped 30098 variants Counter({'comp': 29902, 'base': 196})
2025-01-09 16:25:12,483 [INFO] 20659 chunks of 30098 variants Counter({'comp': 29902, 'base': 186, '__filtered': 10})
2025-01-09 16:25:15,625 [INFO] Stats: {
"TP-base": 140,
"TP-comp": 124,
"FP": 28406,
"FN": 46,
"precision": 0.0043463021381002455,
"recall": 0.7526881720430108,
"f1": 0.008642698114935937,
2025-01-28 22:35:15,911 [WARNING] 193 contigs present in comparison VCF header are not in baseline VCF.
2025-01-28 22:35:39,849 [INFO] Zipped 30098 variants Counter({'comp': 29902, 'base': 196})
2025-01-28 22:35:39,850 [INFO] 20659 chunks of 30098 variants Counter({'comp': 29902, 'base': 186, '__filtered': 10})
2025-01-28 22:35:45,581 [INFO] Stats: {
"TP-base": 147,
"TP-comp": 128,
"FP": 28402,
"FN": 39,
"precision": 0.004486505432877673,
"recall": 0.7903225806451613,
"f1": 0.008922360385402724,
"base cnt": 186,
"comp cnt": 28530,
"TP-comp_TP-gt": 1,
"TP-comp_FP-gt": 123,
"TP-comp_FP-gt": 127,
"TP-base_TP-gt": 1,
"TP-base_FP-gt": 139,
"gt_concordance": 0.008064516129032258,
"TP-base_FP-gt": 146,
"gt_concordance": 0.0078125,
"gt_matrix": {
"(0, 1)": {
"(0, 0)": 132,
"(0, 0)": 133,
"(0, 1)": 1
},
"(0, 0, 1)": {
"(0, 0)": 3
},
"(0, 1, 0)": {
"(0, 0)": 2
},
"(0, 0, 0, 1)": {
Expand All @@ -67,12 +71,12 @@
"(0, 0, 1, 0)": {
"(0, 0)": 1
},
"(0, 1, 0)": {
"(0, 0)": 1
"(0, 1, 1)": {
"(0, 0)": 4
},
"(1, 0)": {
"(0, 0)": 2
}
}
}
2025-01-09 16:25:15,626 [INFO] Finished bench
2025-01-28 22:35:45,582 [INFO] Finished bench
2 changes: 1 addition & 1 deletion repo_utils/answer_key/bench/bench_bnd_decomp/params.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"base": "/data/repo_utils/test_files/variants/bnd.base.vcf.gz", "comp": "/data/repo_utils/test_files/variants/bnd.comp2.vcf.gz", "output": "test_results/bench_bnd_decomp/", "includebed": null, "extend": 0, "debug": false, "reference": null, "refdist": 500, "pctseq": 0.0, "pctsize": 0.7, "pctovl": 0.0, "typeignore": false, "no_roll": true, "chunksize": 1000, "bSample": "HG008-T", "cSample": "HG008_NP_PB_germline", "dup_to_ins": false, "bnddist": 100, "sizemin": 50, "sizefilt": 30, "sizemax": 1000000000, "passonly": false, "no_ref": false, "pick": "multi", "ignore_monref": true, "check_multi": true, "check_monref": true, "no_single_bnd": true, "write_resolved": false, "decompose": true, "short_circuit": false, "skip_gt": false}
{"base": "/data/repo_utils/test_files/variants/bnd.base.vcf.gz", "comp": "/data/repo_utils/test_files/variants/bnd.comp2.vcf.gz", "output": "test_results/bench_bnd_decomp/", "includebed": null, "extend": 0, "debug": false, "reference": null, "refdist": 500, "pctseq": 0.0, "pctsize": 0.7, "pctovl": 0.0, "typeignore": false, "no_roll": true, "chunksize": 1000, "bSample": "HG008-T", "cSample": "HG008_NP_PB_germline", "dup_to_ins": false, "bnddist": 100, "sizemin": 50, "sizefilt": 30, "sizemax": 1000000000, "passonly": false, "no_ref": false, "pick": "multi", "ignore_monref": true, "check_multi": true, "check_monref": true, "no_single_bnd": true, "write_resolved": false, "decompose": true, "short_circuit": false, "skip_gt": false, "max_resolve": 25000}
29 changes: 16 additions & 13 deletions repo_utils/answer_key/bench/bench_bnd_decomp/summary.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
{
"TP-base": 140,
"TP-comp": 124,
"FP": 28406,
"FN": 46,
"precision": 0.0043463021381002455,
"recall": 0.7526881720430108,
"f1": 0.008642698114935937,
"TP-base": 147,
"TP-comp": 128,
"FP": 28402,
"FN": 39,
"precision": 0.004486505432877673,
"recall": 0.7903225806451613,
"f1": 0.008922360385402724,
"base cnt": 186,
"comp cnt": 28530,
"TP-comp_TP-gt": 1,
"TP-comp_FP-gt": 123,
"TP-comp_FP-gt": 127,
"TP-base_TP-gt": 1,
"TP-base_FP-gt": 139,
"gt_concordance": 0.008064516129032258,
"TP-base_FP-gt": 146,
"gt_concordance": 0.0078125,
"gt_matrix": {
"(0, 1)": {
"(0, 0)": 132,
"(0, 0)": 133,
"(0, 1)": 1
},
"(0, 0, 1)": {
"(0, 0)": 3
},
"(0, 1, 0)": {
"(0, 0)": 2
},
"(0, 0, 0, 1)": {
Expand All @@ -27,8 +30,8 @@
"(0, 0, 1, 0)": {
"(0, 0)": 1
},
"(0, 1, 0)": {
"(0, 0)": 1
"(0, 1, 1)": {
"(0, 0)": 4
},
"(1, 0)": {
"(0, 0)": 2
Expand Down
Binary file modified repo_utils/answer_key/bench/bench_bnd_decomp/tp-base.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench_bnd_decomp/tp-base.vcf.gz.tbi
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench_bnd_decomp/tp-comp.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench_bnd_decomp/tp-comp.vcf.gz.tbi
Binary file not shown.
8 changes: 4 additions & 4 deletions truvari/variant_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,25 +334,25 @@ def decompose(self):

elif svtype == truvari.SV.DEL:
record1 = self.copy()
record1.alts = (f"N]{self.chrom}:{self.end}]",)
record1.alts = (f"N[{self.chrom}:{self.end}[",)
record1.info["SVTYPE"] = "BND"

record2 = self.copy()
record2.pos = self.end
record2.alts = (f"[{self.chrom}:{self.pos}[N",)
record2.alts = (f"]{self.chrom}:{self.pos}]N",)
record2.info["SVTYPE"] = "BND"

ret = [record1, record2]

elif svtype == truvari.SV.DUP:
# Assumes DUP:TANDEM
record1 = self.copy()
record1.alts = (f"N[{self.chrom}:{self.end}[",)
record1.alts = (f"]{self.chrom}:{self.end}]N",)
record1.info["SVTYPE"] = "BND"

record2 = self.copy()
record2.pos = self.end
record2.alts = (f"]{self.chrom}:{self.pos}]N",)
record2.alts = (f"N[{self.chrom}:{self.pos}[",)
record2.info["SVTYPE"] = "BND"

ret = [record1, record2]
Expand Down

0 comments on commit 24859cf

Please sign in to comment.