Commit e1e83b13 authored by van den Berg's avatar van den Berg
Browse files

Move final functions to separate file

parent 9ab0debe
...@@ -32,19 +32,6 @@ include: "common.smk" ...@@ -32,19 +32,6 @@ include: "common.smk"
process_config() process_config()
def get_readgroup(wildcards):
return config["samples"][wildcards.sample]["read_groups"]
def get_readgroup_per_sample():
for sample in config["samples"]:
for rg in config["samples"][sample]["read_groups"]:
yield rg, sample
def coverage_stats(wildcards):
files = expand("{sample}/coverage/refFlat_coverage.tsv",
sample=config["samples"])
return files if "refflat" in config else []
rule all: rule all:
input: input:
multiqc = "multiqc_report/multiqc_report.html", multiqc = "multiqc_report/multiqc_report.html",
...@@ -447,8 +434,7 @@ rule multiqc: ...@@ -447,8 +434,7 @@ rule multiqc:
rule merge_stats: rule merge_stats:
"""Merge all stats of all samples""" """Merge all stats of all samples"""
input: input:
cols = expand("{sample}/{sample}.stats.json", cols = expand("{sample}/{sample}.stats.json", sample=config['samples']),
sample=config['samples']),
mpy = config["merge_stats"], mpy = config["merge_stats"],
insertSize = rules.multiqc.output.insertSize, insertSize = rules.multiqc.output.insertSize,
AlignmentMetrics = rules.multiqc.output.AlignmentMetrics, AlignmentMetrics = rules.multiqc.output.AlignmentMetrics,
......
...@@ -61,6 +61,12 @@ def process_config(): ...@@ -61,6 +61,12 @@ def process_config():
set_default('py_wordcount', srcdir('src/pywc.py')) set_default('py_wordcount', srcdir('src/pywc.py'))
set_default('cutadapt_summary', srcdir('src/cutadapt_summary.py')) set_default('cutadapt_summary', srcdir('src/cutadapt_summary.py'))
def coverage_stats(wildcards):
files = expand("{sample}/coverage/refFlat_coverage.tsv",
sample=config["samples"])
return files if "refflat" in config else []
def coverage_files(wildcards): def coverage_files(wildcards):
""" Return a list of all coverage files """ Return a list of all coverage files
......
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