Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hem
hamlet
Commits
9a46725d
Commit
9a46725d
authored
Nov 01, 2021
by
van den Berg
Browse files
Fix bug when VEP is run on an empty VCF file
parent
00bca9c4
Pipeline
#6900
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Snakefile
View file @
9a46725d
...
...
@@ -14,7 +14,7 @@ localrules: create_summary, generate_report, package_results
containers = {
"debian": "docker://debian:buster-slim",
"
fsnviz
": "docker://quay.io/biocontainers/
fsnviz:0.3
.0--pyh
dfd78a
f_
5
",
"
crimson
": "docker://quay.io/biocontainers/
crimson:1.0
.0--pyh
5e36f6
f_
0
",
"hamlet-scripts": "docker://quay.io/redmar_van_den_berg/hamlet-scripts:0.3",
"zip": "docker://quay.io/redmar_van_den_berg/zip:3.0"
}
...
...
@@ -119,7 +119,7 @@ rule create_summary:
run_name=RUN_NAME,
output:
js=OUTPUTS["summary"]
singularity: containers["
fsnviz
"]
singularity: containers["
crimson
"]
shell:
"python {input.scr}"
" {input.idm}"
...
...
includes/snv-indels/Snakefile
View file @
9a46725d
...
...
@@ -225,6 +225,7 @@ rule annotate_vars:
" --custom {input.ref_gonl},GONL,vcf,exact,0,AF"
" --fork {threads} --offline --cache_version 97 --assembly GRCh38 --everything --merged"
" --allele_number --stats_text --vcf --cache --force_overwrite"
" --format vcf"
" --stats_file {output.stats} -o STDOUT | bgzip -c > {output.vcf}"
rule extract_vars:
...
...
scripts/create_summary.py
View file @
9a46725d
...
...
@@ -3,6 +3,7 @@
import
json
import
csv
from
pathlib
import
Path
from
collections
import
defaultdict
import
click
from
crimson
import
picard
,
vep
...
...
@@ -119,16 +120,20 @@ def process_insert_stats(path):
def
process_var_stats
(
path
):
pd
=
vep
.
parse
(
path
)
# If there are no variants, insert an empty defaultdict so that any queried
# value returns 0
if
"Variants by chromosome"
not
in
pd
:
pd
[
"Variants by chromosome"
]
=
defaultdict
(
int
)
return
{
"coding_consequences"
:
{
k
:
v
for
k
,
v
in
pd
[
"Coding consequences"
].
items
()},
"coding_consequences"
:
{
k
:
v
for
k
,
v
in
pd
[
"Coding consequences"
].
items
()},
"num_deletions"
:
pd
[
"Variant classes"
].
get
(
"deletion"
,
0
),
"num_insertions"
:
pd
[
"Variant classes"
].
get
(
"insertion"
,
0
),
"num_snvs"
:
pd
[
"Variant classes"
].
get
(
"SNV"
,
0
),
"per_chromosome"
:
{
k
:
v
for
k
,
v
in
pd
[
"Variants by chromosome"
].
items
()
if
k
in
{
str
(
i
)
for
i
in
range
(
1
,
23
)}.
union
({
"X"
,
"Y"
,
"MT"
})},
"per_chromosome"
:
{
k
:
v
for
k
,
v
in
pd
[
"Variants by chromosome"
].
items
()
if
k
in
{
str
(
i
)
for
i
in
range
(
1
,
23
)}.
union
({
"X"
,
"Y"
,
"MT"
})},
"polyphen"
:
{
"num_benign_variants"
:
pd
[
"PolyPhen summary"
].
get
(
"benign"
,
0
),
"num_possibly_damaging_variants"
:
...
...
Write
Preview
Supports
Markdown
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