Commit 9c950ec1 authored by Sander Bollen's avatar Sander Bollen
Browse files

add vtoolscoverage metrics

parent a191f581
...@@ -113,8 +113,10 @@ def metrics(do_metrics=True): ...@@ -113,8 +113,10 @@ def metrics(do_metrics=True):
sample=SAMPLES) sample=SAMPLES)
fqcp = expand(out_path("{sample}/pre_process/postqc_fastqc/{sample}.cutadapt_R1_fastqc.zip"), fqcp = expand(out_path("{sample}/pre_process/postqc_fastqc/{sample}.cutadapt_R1_fastqc.zip"),
sample=SAMPLES) sample=SAMPLES)
coverage_stats = expand(out_path("{sample}/coverage/{ref}.coverages.tsv"),
sample=SAMPLES, ref=BASE_REFFLATS)
stats = out_path("stats.json") stats = out_path("stats.json")
return fqcr + fqcm + fqcp + [stats] return fqcr + fqcm + fqcp + coverage_stats + [stats]
rule all: rule all:
...@@ -450,6 +452,17 @@ rule covstats: ...@@ -450,6 +452,17 @@ rule covstats:
"--title 'Targets coverage' --subtitle '{params.subt}' > {output.covj}" "--title 'Targets coverage' --subtitle '{params.subt}' > {output.covj}"
rule vtools_coverage:
"""Calculate coverage statistics per transcript"""
input:
gvcf=out_path("{sample}/vcf/{sample}.g.vcf.gz")
ref=get_refflatpath
output:
tsv=out_path("{sample}/coverage/{ref}.coverages.tsv")
conda: "envs/vcfstats.yml"
shell: "vtools-gcoverage -I {input.gvcf} -R {input.ref} > {output.tsv}"
## vcfstats ## vcfstats
rule vcfstats: rule vcfstats:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment