Skip to content

Commit

Permalink
Merge branch 'release/v4.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ACEnglish committed Jan 12, 2024
2 parents 1f32b66 + b304c0f commit bd39129
Show file tree
Hide file tree
Showing 229 changed files with 9,792 additions and 7,650 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -49,7 +49,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -63,4 +63,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
python -m pip install .
- name: Build the release tarball
run: |
python -m pip install --upgrade pip setuptools wheel
python setup.py sdist bdist_wheel
python -m pip install --upgrade pip setuptools wheel build
python3 -m build --wheel --sdist
- name: Publish distribution 📦 to Test PyPI
if: github.event.inputs.skip_test != 'skip'
uses: pypa/gh-action-pypi-publish@master
Expand All @@ -47,7 +47,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: release-tarball
path: dist/Truvari*.tar.gz
path: dist/truvari*.tar.gz
# if-no-files-found: ignore
- name: Publish distribution 📦 to PyPI
if: github.event.inputs.official == 'PUBLISH TO PYPI'
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=biograph._capi,tabix,pysam,intervaltree,edlib,setproctitle
extension-pkg-whitelist=tabix,pysam,intervaltree,edlib,setproctitle,pyabpoa,pywfa


[MESSAGES CONTROL]
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ RUN apt-get -qq update \
&& \
rm -rf /var/lib/apt/lists/*

ADD . /opt/truvari-source
RUN mkdir -p /opt/truvari-source/truvari/
COPY setup.py README.md /opt/truvari-source
COPY truvari/ /opt/truvari-source/truvari/
WORKDIR /opt/truvari-source

RUN wget https://mafft.cbrc.jp/alignment/software/mafft_7.505-1_amd64.deb \
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021 Spiral Genetics
Copyright 2024 Adam English

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
Expand Down
9 changes: 6 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ pywfa>=0.5.1
sphinx==4.2.0
sphinx_rtd_theme==1.0.0
readthedocs-sphinx-search==0.1.1
pywfa>=0.5.1
rich>=12.5.1
edlib>=1.3.9
pysam>=0.22
intervaltree>=3.0.2
intervaltree>=3.1
joblib>=1.2.0
numpy>=1.23.3
numpy>=1.24.4
pytabix>=0.1
bwapy>=0.1.4
pandas>=1.4.4
pandas>=1.5.3
pyabpoa>=1.4.3
4 changes: 2 additions & 2 deletions imgs/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[build-system]
requires = ["setuptools >= 69.0"]
build-backend = "setuptools.build_meta"

[project]
name = "truvari"
authors = [
{name = "ACEnglish", email="[email protected]"}
]
description = "Structural variant comparison tool for VCFs"
readme = "README.md"
license = { text = "MIT" }
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = [
"pywfa>=0.5.1",
"rich>=12.5.1",
"edlib>=1.3.9",
"pysam>=0.22",
"intervaltree>=3.1",
"joblib>=1.2.0",
"numpy>=1.24.4",
"pytabix>=0.1",
"bwapy>=0.1.4",
"pandas>=1.5.3",
"pyabpoa>=1.4.3",
]

[project.scripts]
truvari = "truvari.__main__:main"

[project.urls]
Homepage = "https://github.com/ACEnglish/truvari"
Documentation = "https://truvari.readthedocs.io/en/latest/"
Issues = "https://github.com/ACEnglish/truvari/issues"
Changelog = "https://github.com/ACEnglish/truvari/wiki/Updates"

[tool.setuptools]
packages = ["truvari", "truvari.annotations"]
Binary file modified repo_utils/answer_key/anno_answers.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/anno_answers.vcf.gz.tbi
Binary file not shown.
9 changes: 9 additions & 0 deletions repo_utils/answer_key/bench/bench12/candidate.refine.bed
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
chr20 258766 258767
chr20 278929 279069
chr20 380877 380878
chr20 420664 420665
chr20 641912 642330
chr20 709758 709852
chr20 727507 727556
chr20 764536 764537
chr20 949515 949619
Binary file modified repo_utils/answer_key/bench/bench12/fn.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12/fn.vcf.gz.tbi
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12/fp.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12/fp.vcf.gz.tbi
Binary file not shown.
59 changes: 39 additions & 20 deletions repo_utils/answer_key/bench/bench12/log.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@
2022-12-01 18:25:54,715 [INFO] Truvari v4.0.0.dev0+detached
2022-12-01 18:25:54,716 [INFO] Command /data/truvari/__main__.py bench -b repo_utils/test_files/variants/input1.vcf.gz -c repo_utils/test_files/variants/input2.vcf.gz -f repo_utils/test_files/references/reference.fa -o test_results/bench12/
2022-12-01 18:25:54,717 [INFO] Params:
2024-01-09 03:54:51,643 [INFO] Truvari v4.2.0rc1
2024-01-09 03:54:51,645 [INFO] Command /data/truvari/__main__.py bench -b repo_utils/test_files/variants/input1.vcf.gz -c repo_utils/test_files/variants/input2.vcf.gz -f repo_utils/test_files/references/reference.fa -o test_results/bench12/
2024-01-09 03:54:51,646 [INFO] Params:
{
"base": "/data/repo_utils/test_files/variants/input1.vcf.gz",
"comp": "/data/repo_utils/test_files/variants/input2.vcf.gz",
"output": "test_results/bench12/",
"reference": "/data/repo_utils/test_files/references/reference.fa",
"includebed": null,
"extend": 0,
"debug": false,
"prog": false,
"reference": "/data/repo_utils/test_files/references/reference.fa",
"refdist": 500,
"pctsim": 0.7,
"pctseq": 0.7,
"minhaplen": 50,
"pctsize": 0.7,
"pctovl": 0.0,
"typeignore": false,
"dup_to_ins": false,
"use_lev": false,
"chunksize": 1000,
"gtcomp": false,
"bSample": "NA24385",
"cSample": "NA12878",
"dup_to_ins": false,
"sizemin": 50,
"sizefilt": 30,
"sizemax": 50000,
"passonly": false,
"no_ref": false,
"includebed": null,
"extend": 0,
"multimatch": false
"pick": "single",
"check_monref": true,
"check_multi": true
}
2022-12-01 18:25:54,891 [INFO] Zipped 3934 variants Counter({'base': 2151, 'comp': 1783})
2022-12-01 18:25:54,892 [INFO] 13 chunks of 3934 variants Counter({'__filtered': 3904, 'base': 16, 'comp': 14})
2022-12-01 18:25:54,897 [INFO] Stats: {
2024-01-09 03:54:51,858 [INFO] Zipped 3934 variants Counter({'base': 2151, 'comp': 1783})
2024-01-09 03:54:51,868 [INFO] 13 chunks of 3934 variants Counter({'__filtered': 3904, 'base': 16, 'comp': 14})
2024-01-09 03:54:51,993 [INFO] Stats: {
"TP-base": 8,
"TP-call": 8,
"TP-comp": 8,
"FP": 3,
"FN": 8,
"precision": 0.7272727272727273,
"recall": 0.5,
"f1": 0.5925925925925926,
"base cnt": 16,
"call cnt": 11,
"TP-call_TP-gt": 4,
"TP-call_FP-gt": 4,
"comp cnt": 11,
"TP-comp_TP-gt": 4,
"TP-comp_FP-gt": 4,
"TP-base_TP-gt": 4,
"TP-base_FP-gt": 4,
"gt_concordance": 0.5,
Expand All @@ -60,6 +59,26 @@
"(1, 0)": {
"(1, 1)": 1
}
},
"weighted": {
"sequence": {
"TP": 12.533399924635887,
"FP": 1.6414000391960144,
"FN": 4.268600061535835,
"precision": 0.8842029486564768,
"recall": 0.7459469072105135,
"f1": 0.8092120519139951,
"total": 18
},
"size": {
"TP": 10.914199993014336,
"FP": 2.0859000086784363,
"FN": 5.752500012516975,
"precision": 0.8395473874503406,
"recall": 0.6548506896621499,
"f1": 0.7357854564939021,
"total": 18
}
}
}
2022-12-01 18:25:54,987 [INFO] Finished bench
2024-01-09 03:54:51,994 [INFO] Finished bench
2 changes: 1 addition & 1 deletion repo_utils/answer_key/bench/bench12/params.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"base": "/data/repo_utils/test_files/variants/input1.vcf.gz", "comp": "/data/repo_utils/test_files/variants/input2.vcf.gz", "output": "test_results/bench12/", "reference": "/data/repo_utils/test_files/references/reference.fa", "debug": false, "prog": false, "refdist": 500, "pctsim": 0.7, "minhaplen": 50, "pctsize": 0.7, "pctovl": 0.0, "typeignore": false, "dup_to_ins": false, "use_lev": false, "chunksize": 1000, "gtcomp": false, "bSample": "NA24385", "cSample": "NA12878", "sizemin": 50, "sizefilt": 30, "sizemax": 50000, "passonly": false, "no_ref": false, "includebed": null, "extend": 0, "multimatch": false}
{"base": "/data/repo_utils/test_files/variants/input1.vcf.gz", "comp": "/data/repo_utils/test_files/variants/input2.vcf.gz", "output": "test_results/bench12/", "includebed": null, "extend": 0, "debug": false, "reference": "/data/repo_utils/test_files/references/reference.fa", "refdist": 500, "pctseq": 0.7, "minhaplen": 50, "pctsize": 0.7, "pctovl": 0.0, "typeignore": false, "chunksize": 1000, "bSample": "NA24385", "cSample": "NA12878", "dup_to_ins": false, "sizemin": 50, "sizefilt": 30, "sizemax": 50000, "passonly": false, "no_ref": false, "pick": "single", "check_monref": true, "check_multi": true}
2 changes: 1 addition & 1 deletion repo_utils/answer_key/bench/bench12/summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"(1, 1)": 1
}
}
}
}
Binary file modified repo_utils/answer_key/bench/bench12/tp-base.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12/tp-base.vcf.gz.tbi
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12/tp-comp.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12/tp-comp.vcf.gz.tbi
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
chr20 258766 258767
chr20 278929 279069
chr20 380877 380878
chr20 641912 642330
chr20 709758 709852
chr20 727507 727556
chr20 764536 764537
chr20 949515 949619
Binary file modified repo_utils/answer_key/bench/bench12_gtcomp/fn.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12_gtcomp/fn.vcf.gz.tbi
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12_gtcomp/fp.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12_gtcomp/fp.vcf.gz.tbi
Binary file not shown.
59 changes: 39 additions & 20 deletions repo_utils/answer_key/bench/bench12_gtcomp/log.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@
2022-12-01 18:26:08,784 [INFO] Truvari v4.0.0.dev0+detached
2022-12-01 18:26:08,785 [INFO] Command /data/truvari/__main__.py bench -b repo_utils/test_files/variants/input1.vcf.gz -c repo_utils/test_files/variants/input2.vcf.gz -f repo_utils/test_files/references/reference.fa -o test_results/bench12_gtcomp/ --gtcomp
2022-12-01 18:26:08,786 [INFO] Params:
2024-01-09 03:55:04,513 [INFO] Truvari v4.2.0rc1
2024-01-09 03:55:04,514 [INFO] Command /data/truvari/__main__.py bench -b repo_utils/test_files/variants/input1.vcf.gz -c repo_utils/test_files/variants/input2.vcf.gz -f repo_utils/test_files/references/reference.fa -o test_results/bench12_gtcomp/ --pick ac
2024-01-09 03:55:04,515 [INFO] Params:
{
"base": "/data/repo_utils/test_files/variants/input1.vcf.gz",
"comp": "/data/repo_utils/test_files/variants/input2.vcf.gz",
"output": "test_results/bench12_gtcomp/",
"reference": "/data/repo_utils/test_files/references/reference.fa",
"includebed": null,
"extend": 0,
"debug": false,
"prog": false,
"reference": "/data/repo_utils/test_files/references/reference.fa",
"refdist": 500,
"pctsim": 0.7,
"pctseq": 0.7,
"minhaplen": 50,
"pctsize": 0.7,
"pctovl": 0.0,
"typeignore": false,
"dup_to_ins": false,
"use_lev": false,
"chunksize": 1000,
"gtcomp": true,
"bSample": "NA24385",
"cSample": "NA12878",
"dup_to_ins": false,
"sizemin": 50,
"sizefilt": 30,
"sizemax": 50000,
"passonly": false,
"no_ref": false,
"includebed": null,
"extend": 0,
"multimatch": false
"pick": "ac",
"check_monref": true,
"check_multi": true
}
2022-12-01 18:26:08,975 [INFO] Zipped 3934 variants Counter({'base': 2151, 'comp': 1783})
2022-12-01 18:26:08,976 [INFO] 13 chunks of 3934 variants Counter({'__filtered': 3904, 'base': 16, 'comp': 14})
2022-12-01 18:26:08,981 [INFO] Stats: {
2024-01-09 03:55:04,725 [INFO] Zipped 3934 variants Counter({'base': 2151, 'comp': 1783})
2024-01-09 03:55:04,726 [INFO] 13 chunks of 3934 variants Counter({'__filtered': 3904, 'base': 16, 'comp': 14})
2024-01-09 03:55:04,843 [INFO] Stats: {
"TP-base": 9,
"TP-call": 8,
"TP-comp": 8,
"FP": 3,
"FN": 7,
"precision": 0.7272727272727273,
"recall": 0.5625,
"f1": 0.6343612334801763,
"base cnt": 16,
"call cnt": 11,
"TP-call_TP-gt": 4,
"TP-call_FP-gt": 4,
"comp cnt": 11,
"TP-comp_TP-gt": 4,
"TP-comp_FP-gt": 4,
"TP-base_TP-gt": 4,
"TP-base_FP-gt": 5,
"gt_concordance": 0.5,
Expand All @@ -60,6 +59,26 @@
"(1, 0)": {
"(1, 1)": 1
}
},
"weighted": {
"sequence": {
"TP": 12.533399924635887,
"FP": 1.6414000391960144,
"FN": 4.268600061535835,
"precision": 0.8842029486564768,
"recall": 0.7459469072105135,
"f1": 0.8092120519139951,
"total": 18
},
"size": {
"TP": 10.914199993014336,
"FP": 2.0859000086784363,
"FN": 5.752500012516975,
"precision": 0.8395473874503406,
"recall": 0.6548506896621499,
"f1": 0.7357854564939021,
"total": 18
}
}
}
2022-12-01 18:26:09,088 [INFO] Finished bench
2024-01-09 03:55:04,844 [INFO] Finished bench
2 changes: 1 addition & 1 deletion repo_utils/answer_key/bench/bench12_gtcomp/params.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"base": "/data/repo_utils/test_files/variants/input1.vcf.gz", "comp": "/data/repo_utils/test_files/variants/input2.vcf.gz", "output": "test_results/bench12_gtcomp/", "reference": "/data/repo_utils/test_files/references/reference.fa", "debug": false, "prog": false, "refdist": 500, "pctsim": 0.7, "minhaplen": 50, "pctsize": 0.7, "pctovl": 0.0, "typeignore": false, "dup_to_ins": false, "use_lev": false, "chunksize": 1000, "gtcomp": true, "bSample": "NA24385", "cSample": "NA12878", "sizemin": 50, "sizefilt": 30, "sizemax": 50000, "passonly": false, "no_ref": false, "includebed": null, "extend": 0, "multimatch": false}
{"base": "/data/repo_utils/test_files/variants/input1.vcf.gz", "comp": "/data/repo_utils/test_files/variants/input2.vcf.gz", "output": "test_results/bench12_gtcomp/", "includebed": null, "extend": 0, "debug": false, "reference": "/data/repo_utils/test_files/references/reference.fa", "refdist": 500, "pctseq": 0.7, "minhaplen": 50, "pctsize": 0.7, "pctovl": 0.0, "typeignore": false, "chunksize": 1000, "bSample": "NA24385", "cSample": "NA12878", "dup_to_ins": false, "sizemin": 50, "sizefilt": 30, "sizemax": 50000, "passonly": false, "no_ref": false, "pick": "ac", "check_monref": true, "check_multi": true}
2 changes: 1 addition & 1 deletion repo_utils/answer_key/bench/bench12_gtcomp/summary.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"(1, 1)": 1
}
}
}
}
Binary file modified repo_utils/answer_key/bench/bench12_gtcomp/tp-base.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12_gtcomp/tp-base.vcf.gz.tbi
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12_gtcomp/tp-comp.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench12_gtcomp/tp-comp.vcf.gz.tbi
Binary file not shown.
10 changes: 10 additions & 0 deletions repo_utils/answer_key/bench/bench13/candidate.refine.bed
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
chr20 149012 149073
chr20 183616 183617
chr20 258766 258767
chr20 280210 280275
chr20 380877 380911
chr20 420664 420665
chr20 641905 642391
chr20 709758 709852
chr20 727555 727590
chr20 764441 764537
Binary file modified repo_utils/answer_key/bench/bench13/fn.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench13/fn.vcf.gz.tbi
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench13/fp.vcf.gz
Binary file not shown.
Binary file modified repo_utils/answer_key/bench/bench13/fp.vcf.gz.tbi
Binary file not shown.
Loading

0 comments on commit bd39129

Please sign in to comment.