Commit 14ce6cb4 authored by van den Berg's avatar van den Berg
Browse files

Add tests for bedfile

parent 0102bc14
......@@ -484,12 +484,12 @@ rule covstats:
bam="{sample}/bams/{sample}.markdup.bam",
genome="current.genome",
covpy=settings["covstats"],
bed=get_bedpath
bed=settings.get("bedfile","")
params:
subt="Sample {sample}"
output:
covj="{sample}/coverage/{bed}.covstats.json",
covp="{sample}/coverage/{bed}.covstats.png"
covj="{sample}/coverage/covstats.json",
covp="{sample}/coverage/covstats.png"
singularity: containers["bedtools-2.26-python-2.7"]
shell: "bedtools coverage -sorted -g {input.genome} -a {input.bed} "
"-b {input.bam} -d | python {input.covpy} - --plot {output.covp} "
......@@ -534,7 +534,7 @@ if "bedfile" in settings:
unum="{sample}/bams/{sample}.unique.num",
ubnum="{sample}/bams/{sample}.usable.basenum",
fastqc="{sample}/pre_process/fastq_stats.json",
cov=expand("{{sample}}/coverage/{bed}.covstats.json", bed=settings["bedfile"]),
cov="{sample}/coverage/covstats.json",
colpy=settings["collect_stats"]
params:
sample_name="{sample}",
......
......@@ -127,3 +127,38 @@
- path: "micro/coverage/refFlat_coverage.tsv"
contains:
- "1\tMIR12136\t133.0\t99.0\t133.0\t99.0\t100.0\t100.0\t100.0\t100.0\t100.0\t100.0\t100.0\t100.0\t100.0\t100.0\tNR_162149"
- name: test-integration-all-on-target
tags:
- integration
- new
command: >
snakemake
--use-singularity
--singularity-prefix /tmp/singularity
--singularity-args ' --cleanenv --bind /tmp'
--jobs 1 -w 120
-r -p -s Snakefile
--config
CONFIG_JSON=tests/data/config/sample_config_bed_all.json
stderr:
contains:
- "Job counts"
- "localrule all:"
- "(100%) done"
must_not_contain:
- "rror"
files:
- path: "micro/coverage/covstats.png"
- path: "micro/coverage/covstats.json"
contains:
- "\"frac_min_100x\": 0.9748"
- "\"mean\": 136.70"
- "\"width_nonzero\": 16569"
- path: "stats.tsv"
contains:
- "sample_name\tpreqc_reads\tpreqc_bases\tpostqc_reads\tpostqc_bases\tmapped_reads\tmapped_bases\tusable_reads\tusable_bases\ttotal_variants\tsnps\tinsertions\tdeletions\ttransversions\ttransitions\tti_tv_ratio\thomozygous_variants\theterozygous_variants\tcovstats.json_median_coverage"
- "micro\t15440\t2276743\t15398\t2269171\t15515\t2275114\t15477\t2270739\t17\t15\t2\t0\t0\t15\tnan\t16\t1\t136"
- "\tcovstats.json_modal_coverage\tcovstats.json_horizontal_coverage\t"
- "\t137\t1.0\t"
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