Comments (1)
Picking matching parameters is more of an art than a science. It really depends on the precision of your callers and the tolerance you wish to allow them such that it is a fair comparison.
For example, depth of coverage callers (such as CNVnator) will have very 'fuzzy' boundaries, and don't report the exact deleted sequence but only varying regions. So thresholds of pctsim==0
, pctsize==.5
, pctovl==.5
, refdist==1000
may seem fair.
Spiral Genetics' BioGraph Discovery reports precise breakpoints and full alternate allele sequences, so when benchmarking those results, we want to ensure our accuracy by using the stricter default thresholds. I also use defaults when doing a benchmark comparison to tools like Manta.
If you're still having trouble picking thresholds, it may be beneficial to do a few runs of truvari over different values. Start with the strict defaults and gradually increase the leniency. From there, you can look at the performance metrics and manually inspect differences between the runs to find out what level you find acceptable. I built truvari to be flexible in this manner, but more importantly, truvari helps one clearly report the thresholds used for reproducibility (see the json at the top of your log.txt).
If you're curious for more details on what these specific parameters mean, you can see all the implementation details pulled from the code below. Also, I've recently expanded the documentation in the README for detail aboutpctsim
. See the section Comparing Haplotype Sequences of Variants
. For more details on the Levenshtein distance ratio, see https://stackabuse.com/levenshtein-distance-and-text-similarity-in-python/
#pctsize
def var_sizesim(sizeA, sizeB):
"""
Calculate the size similarity pct for the two entries
compares the longer of entryA's two alleles (REF or ALT)
"""
return min(sizeA, sizeB) / float(max(sizeA, sizeB)), sizeA - sizeB
#pctovl
def get_rec_ovl(astart, aend, bstart, bend):
"""
Compute reciprocal overlap between two spans
"""
ovl_start = max(astart, bstart)
ovl_end = min(aend, bend)
if ovl_start < ovl_end: # Otherwise, they're not overlapping
ovl_pct = float(ovl_end - ovl_start) / max(aend - astart, bend - bstart)
else:
ovl_pct = 0
return ovl_pct
For refdist
we only consider matching comparison calls within REFDIST base-pairs upstream of the base call's start position and REFDIST base-pairs downstream of the base calls' end position.
from truvari.
Related Issues (20)
- Duplication to Insertion doubt HOT 4
- Failure in pip installation HOT 2
- Question: Does truvari have a upper limit on the file size? How to speed up? HOT 2
- BED Region off-by-one error HOT 4
- Zero matches between base and comp HOT 4
- AttributeError: 'CollapsedCalls' object has no attribute 'consolidate' | version 4.2.1 HOT 4
- Calculate SNV HOT 7
- complex genotype problem HOT 3
- GT integrate HOT 1
- No TP or FP calls for CNV HOT 1
- merging different SV type? HOT 3
- No FP or TP calls HOT 2
- Unable to run MAFFT HOT 9
- md5sum FIPS issue HOT 1
- Support vector for intra-sample merge HOT 6
- some questions about the results in fp.vcf.gz
- some questions about the results in fp.vcf.gz HOT 1
- Getting same numbers of TP-base and TP-comp HOT 4
- Suggested minor documentation changes
- Truvari, STRs and Expansion Hunter - Query HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from truvari.