From 3627a9317bedc4f628045ed8c0e68f9b0e6d8258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Corcoran?= Date: Mon, 27 Nov 2023 16:06:09 +0100 Subject: [PATCH 1/4] feat: update samtools.smk and remove design_bed as a default extra --- workflow/rules/samtools.smk | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/workflow/rules/samtools.smk b/workflow/rules/samtools.smk index b3d6266..c260d9d 100644 --- a/workflow/rules/samtools.smk +++ b/workflow/rules/samtools.smk @@ -10,11 +10,7 @@ rule samtools_stats: output: temp("qc/samtools_stats/{sample}_{type}.samtools-stats.txt"), params: - extra="%s -t %s" - % ( - config.get("samtools_stats", {}).get("extra", ""), - config.get("reference", {}).get("design_bed", ""), - ), + extra=config.get("samtools_stats", {}).get("extra", ""), log: "qc/samtools_stats/{sample}_{type}.samtools-stats.txt.log", benchmark: @@ -34,7 +30,7 @@ rule samtools_stats: message: "{rule}: calculate qc using samtools for {input.bam}" wrapper: - "0.79.0/bio/samtools/stats" + "v3.0.0/bio/samtools/stats" rule samtools_idxstats: From 1e9bee9f91dbe5494013d5835a8ec68d704b04a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Corcoran?= Date: Tue, 5 Dec 2023 09:35:13 +0100 Subject: [PATCH 2/4] Update workflow/rules/samtools.smk Co-authored-by: jonca79 <54137490+jonca79@users.noreply.github.com> --- workflow/rules/samtools.smk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/rules/samtools.smk b/workflow/rules/samtools.smk index c260d9d..999b732 100644 --- a/workflow/rules/samtools.smk +++ b/workflow/rules/samtools.smk @@ -8,7 +8,7 @@ rule samtools_stats: input: bam="alignment/samtools_merge_bam/{sample}_{type}.bam", output: - temp("qc/samtools_stats/{sample}_{type}.samtools-stats.txt"), + stats=temp("qc/samtools_stats/{sample}_{type}.samtools-stats.txt"), params: extra=config.get("samtools_stats", {}).get("extra", ""), log: From df5872821a5ae6f51cf261962c0fc035214fd81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Corcoran?= Date: Tue, 5 Dec 2023 09:35:39 +0100 Subject: [PATCH 3/4] feat: add schemas for samtools rules --- workflow/schemas/rules.schema.yaml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/workflow/schemas/rules.schema.yaml b/workflow/schemas/rules.schema.yaml index 66e9ae7..a0fef0f 100644 --- a/workflow/schemas/rules.schema.yaml +++ b/workflow/schemas/rules.schema.yaml @@ -405,6 +405,47 @@ properties: type: string description: WGS statistics used by MultiQC + samtools_idxstats: + type: object + description: input and output parameters for samtools_stats + properties: + input: + type: object + description: list of inputs + properties: + bam: + type: string + description: Aligned bam file + bai: + type: string + description: Bam index file + output: + type: object + description: list of outputs + properties: + stats: + type: string + description: Alignment summary statistics from samtools idxstats + + samtools_stats: + type: object + description: input and output parameters for samtools_stats + properties: + input: + type: object + description: list of inputs + properties: + bam: + type: string + description: Aligned bam file + output: + type: object + description: list of outputs + properties: + stats: + type: string + description: Alignment summary statistics from samtools stats + verifybamid2: type: object description: input and output parameters for verifybamid2 From 1e91fee98bd99b014e8f43139599a5f8815c3ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Corcoran?= Date: Tue, 5 Dec 2023 09:36:15 +0100 Subject: [PATCH 4/4] Update rules.schema.yaml --- workflow/schemas/rules.schema.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/schemas/rules.schema.yaml b/workflow/schemas/rules.schema.yaml index a0fef0f..6e92c59 100644 --- a/workflow/schemas/rules.schema.yaml +++ b/workflow/schemas/rules.schema.yaml @@ -407,7 +407,7 @@ properties: samtools_idxstats: type: object - description: input and output parameters for samtools_stats + description: input and output parameters for samtools_idxstats properties: input: type: object