Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Klinische Genetica
capture-lumc
vtools
Commits
bbb226bc
Commit
bbb226bc
authored
5 years ago
by
van den Berg
Browse files
Options
Downloads
Patches
Plain Diff
Add test for a rare bug with partial variants
parent
b63f7cb0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!6
Merge testing into master
,
!5
Merge new testing code into devel
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_evaluate.py
+22
-0
22 additions, 0 deletions
tests/test_evaluate.py
with
22 additions
and
0 deletions
tests/test_evaluate.py
+
22
−
0
View file @
bbb226bc
import
pytest
from
collections
import
defaultdict
from
vtools.evaluate
import
site_concordancy
from
vtools.evaluate
import
parse_variants
from
cyvcf2
import
VCF
...
...
@@ -340,3 +342,23 @@ def test_ref_alt_changed_call_concordant(ref_alt_changed_call):
def
test_ref_alt_changed_call_no_call
(
ref_alt_changed_call
):
assert
ref_alt_changed_call
[
'
alleles_no_call
'
]
==
54
def
test_parse_variants_no_call
():
"""
This should be counted as a single no call
"""
results
=
defaultdict
(
int
)
call
=
[
'
.
'
,
'
A
'
]
pos
=
[
'
A
'
,
'
G
'
]
parse_variants
(
'
A
'
,
call
,
pos
,
results
)
assert
results
[
'
alleles_no_call
'
]
==
1
def
test_parse_variants_concordant
():
"""
This should be counted as a single concordant allele
"""
results
=
defaultdict
(
int
)
call
=
[
'
.
'
,
'
A
'
]
pos
=
[
'
A
'
,
'
G
'
]
parse_variants
(
'
A
'
,
call
,
pos
,
results
)
assert
results
[
'
alleles_concordant
'
]
==
1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment