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
26922303
Commit
26922303
authored
5 years ago
by
van den Berg
Browse files
Options
Downloads
Patches
Plain Diff
Add testcase for every field in the output
parent
368545f7
No related branches found
No related tags found
2 merge requests
!6
Merge testing into master
,
!5
Merge new testing code into devel
Pipeline
#2744
failed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_evaluate.py
+38
-1
38 additions, 1 deletion
tests/test_evaluate.py
with
38 additions
and
1 deletion
tests/test_evaluate.py
+
38
−
1
View file @
26922303
...
...
@@ -7,7 +7,7 @@ from cyvcf2 import VCF
@pytest.fixture
def
known_concordant
():
known
=
'
/home/rrvandenberg/devel/vtools/
tests/cases/gatk.vcf.gz
'
known
=
'
tests/cases/gatk.vcf.gz
'
d
,
disc
=
site_concordancy
(
VCF
(
known
,
gts012
=
True
),
VCF
(
known
,
gts012
=
True
),
[
'
NA12878
'
],
[
'
NA12878
'
],
min_gq
=
0
,
...
...
@@ -15,6 +15,15 @@ def known_concordant():
return
d
@pytest.fixture
def
blank_NA12878
():
filename
=
'
tests/cases/gatk.vcf.gz
'
d
,
disc
=
site_concordancy
(
VCF
(
filename
,
gts012
=
True
),
VCF
(
filename
,
gts012
=
True
),
[
'
NA12878
'
],
[
'
BLANK
'
],
min_gq
=
0
,
min_dp
=
0
)
return
d
def
test_total_sites
(
known_concordant
):
assert
known_concordant
[
'
total_sites
'
]
==
37
...
...
@@ -29,3 +38,31 @@ def test_alleles_considered(known_concordant):
def
test_alleles_het_concordant
(
known_concordant
):
assert
known_concordant
[
'
alleles_het_concordant
'
]
==
42
def
test_alleles_hom_alt_concordant
(
known_concordant
):
assert
known_concordant
[
'
alleles_hom_alt_concordant
'
]
==
18
def
test_alleles_hom_ref_concordant
(
known_concordant
):
assert
known_concordant
[
'
alleles_hom_ref_concordant
'
]
==
14
def
test_alleles_concordant
(
known_concordant
):
assert
known_concordant
[
'
alleles_concordant
'
]
==
74
def
test_alleles_discordant
(
known_concordant
):
assert
known_concordant
[
'
alleles_discordant
'
]
==
0
def
test_alleles_no_call
(
blank_NA12878
):
assert
blank_NA12878
[
'
alleles_no_call
'
]
==
8
def
test_alleles_low_qual
(
known_concordant
):
assert
known_concordant
[
'
alleles_low_qual
'
]
==
0
def
test_alleles_low_depth
(
known_concordant
):
assert
known_concordant
[
'
alleles_low_depth
'
]
==
0
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