Commit 9ab0debe authored by van den Berg's avatar van den Berg
Browse files

Clean up input for multiqc

parent 88c13809
......@@ -424,25 +424,13 @@ rule multiqc:
Depends on stats.tsv to forcefully run at end of pipeline
"""
input:
bam = expand("{sample}/bams/{sample}.bam", sample=config["samples"]),
metric = expand("{sample}/bams/{sample}.metrics",
sample=config["samples"]),
alignment_metrics = expand(
"{sample}/bams/{sample}.alignment_summary_metrics",
sample=config["samples"]
),
insert_metrics = expand(
"{sample}/bams/{sample}.insert_size_metrics",
sample=config["samples"]
),
fastqc_raw = (f"{sample}/pre_process/raw-{sample}-{read_group}/.done"
for read_group, sample in get_readgroup_per_sample()),
fastqc_trim = (f"{sample}/pre_process/trimmed-{sample}-{read_group}/.done"
for read_group, sample in get_readgroup_per_sample()),
hs_metric = expand("{sample}/bams/{sample}.hs_metrics.txt",
sample=config["samples"]) if "baitsfile" in config else []
bam = expand("{s}/bams/{s}.bam", s=config["samples"]),
metric = expand("{s}/bams/{s}.metrics", s=config["samples"]),
alignment_metrics = expand("{s}/bams/{s}.alignment_summary_metrics", s=config["samples"]),
insert_metrics = expand("{s}/bams/{s}.insert_size_metrics", s=config["samples"]),
fastqc_raw = all_raw_fastqc,
fastqc_trim = all_trimmed_fastqc,
hs_metric = expand("{s}/bams/{s}.hs_metrics.txt", s=config["samples"]) if "baitsfile" in config else []
output:
html = "multiqc_report/multiqc_report.html",
......
......@@ -87,8 +87,8 @@ def sample_bamfiles(wildcards):
files = list()
sample = config['samples'][wildcards.sample]
sample_name = wildcards.sample
for readgroup in sample['read_groups']:
files.append(f'{sample_name}/bams/{sample_name}-{readgroup}.sorted.bam')
for read_group in sample['read_groups']:
files.append(f'{sample_name}/bams/{sample_name}-{read_group}.sorted.bam')
return files
def gather_gvcf(wildcards):
......@@ -135,6 +135,22 @@ def sample_cutadapt_files(wildcards):
files = list()
sample = config['samples'][wildcards.sample]
sample_name = wildcards.sample
for readgroup in sample['read_groups']:
files.append(f'{sample_name}/pre_process/{sample_name}-{readgroup}.txt')
for read_group in sample['read_groups']:
files.append(f'{sample_name}/pre_process/{sample_name}-{read_group}.txt')
return files
def all_raw_fastqc(wildcards):
""" Determine the raw fastq files for each sample """
fastq_files = list()
for sample in config['samples']:
for read_group in config['samples'][sample]['read_groups']:
fastq_files.append(f"{sample}/pre_process/raw-{sample}-{read_group}/.done")
return fastq_files
def all_trimmed_fastqc(wildcards):
""" Determine the raw fastq files for each sample """
fastq_files = list()
for sample in config['samples']:
for read_group in config['samples'][sample]['read_groups']:
fastq_files.append(f"{sample}/pre_process/trimmed-{sample}-{read_group}/.done")
return fastq_files
Markdown is supported
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