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
34801b91
Commit
34801b91
authored
5 years ago
by
van den Berg
Browse files
Options
Downloads
Patches
Plain Diff
Add comment for decomposed variants
parent
c2d64d27
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
Pipeline
#2773
failed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_evaluate.py
+3
-3
3 additions, 3 deletions
tests/test_evaluate.py
vtools/evaluate.py
+7
-0
7 additions, 0 deletions
vtools/evaluate.py
with
10 additions
and
3 deletions
tests/test_evaluate.py
+
3
−
3
View file @
34801b91
...
...
@@ -117,7 +117,7 @@ def test_truncated_called_no_call(NA12878_call_truncated):
@pytest.fixture
(
scope
=
'
module
'
)
def
NA12878_positive_truncated
():
"""
When the
known
set is truncated, i.e. the called vcf file contains
"""
When the
positive
set is truncated, i.e. the called vcf file contains
variants which are absent from the positive vcf file
"""
filename
=
'
tests/cases/gatk.vcf.gz
'
truncated
=
'
tests/cases/gatk_truncated.vcf.gz
'
...
...
@@ -129,7 +129,7 @@ def NA12878_positive_truncated():
return
d
def
test_truncated_
known
_no_call
(
NA12878_positive_truncated
):
"""
Variants which are missing from the
known
vcf do not count towards
def
test_truncated_
positive
_no_call
(
NA12878_positive_truncated
):
"""
Variants which are missing from the
positive
vcf do not count towards
alleles_no_call
"""
assert
NA12878_positive_truncated
[
'
alleles_no_call
'
]
==
0
This diff is collapsed.
Click to expand it.
vtools/evaluate.py
+
7
−
0
View file @
34801b91
...
...
@@ -66,6 +66,7 @@ def site_concordancy(call_vcf: VCF,
}
discordant_count
=
0
discordant_records
=
list
()
for
pos_record
in
positive_vcf
:
d
[
'
total_sites
'
]
+=
1
query_str
=
"
{0}:{1}-{2}
"
.
format
(
...
...
@@ -76,7 +77,13 @@ def site_concordancy(call_vcf: VCF,
it
=
call_vcf
(
query_str
)
same
=
[]
# If the vcf file has been decomposed, there can be multiple sites with
# the same CHROM and POS, which is why we have to iterate over all the
# sites that are returned
for
it_record
in
it
:
# We only want to consider sites that have the same CHROM, POS, REF
# and ALT as the positive vcf, since otherwise we might consider
# A/T and A/G as identical since they are both heterozygous
if
(
it_record
.
CHROM
==
pos_record
.
CHROM
and
it_record
.
POS
==
pos_record
.
POS
and
it_record
.
REF
==
pos_record
.
REF
...
...
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