Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vtools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klinische Genetica
capture-lumc
vtools
Commits
c6f39403
Commit
c6f39403
authored
Dec 03, 2019
by
van den Berg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'testing' into devel
parents
335925d5
7b50bc24
Pipeline
#2916
failed with stage
in 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
vtools/cli.py
vtools/cli.py
+6
-1
No files found.
vtools/cli.py
View file @
c6f39403
...
...
@@ -6,6 +6,7 @@ vtools.cli
:copyright: (c) Leiden University Medical Center
:license: MIT
"""
import
os
import
json
import
click
from
cyvcf2
import
VCF
,
Writer
...
...
@@ -35,7 +36,7 @@ from .gcoverage import RefRecord, region_coverages
@
click
.
option
(
"-s"
,
"--stats"
,
type
=
click
.
Path
(
writable
=
True
),
help
=
"Path to output stats json file"
)
@
click
.
option
(
"-dvcf"
,
"--discordant-vcf"
,
type
=
click
.
Path
(
writable
=
True
),
help
=
"Path to output
gzipped
discordant vcf file"
,
help
=
"Path to output
the
discordant vcf file"
,
required
=
False
)
@
click
.
option
(
"-mq"
,
"--min-qual"
,
type
=
float
,
help
=
"Minimum quality of variants to consider"
,
default
=
30
)
...
...
@@ -56,6 +57,10 @@ def evaluate_cli(call_vcf, positive_vcf, call_samples, positive_samples,
# If there were discordand records, and a discordant-vcf should be written
if
len
(
disc
)
>
0
and
discordant_vcf
:
# make sure the parent folder exists
parent_folder
=
os
.
path
.
dirname
(
discordant_vcf
)
os
.
makedirs
(
parent_folder
,
exist_ok
=
True
)
with
click
.
open_file
(
discordant_vcf
,
'w'
)
as
fout
:
# First, we write the vcf header
with
gzip
.
open
(
call_vcf
,
'rt'
)
as
fin
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment