From 0aa8cad6884a953f9c89a2fdd7af397e4e9ccf3e Mon Sep 17 00:00:00 2001 From: Max Schubach Date: Thu, 10 Nov 2022 11:19:04 +0100 Subject: [PATCH] feature: replace merging by NGmerge close replace MergeTrimReadsBAM.py #57 --- config/sbatch.yml | 6 +++--- workflow/rules/assignment.smk | 15 +++++++++------ workflow/rules/common.smk | 2 +- workflow/schemas/config.schema.yaml | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/config/sbatch.yml b/config/sbatch.yml index cbb2fe3..4127599 100644 --- a/config/sbatch.yml +++ b/config/sbatch.yml @@ -13,7 +13,7 @@ assignment_merge: time: "0-08:00" queue: medium assignment_fastq_split: - time: "0-02:00" + time: "0-04:00" threads: 1 mem: 10G queue: medium @@ -28,9 +28,9 @@ assignment_collect: mem: 10G queue: medium assignment_getBCs: - time: "0-04:00" + time: "1-08:00" threads: 1 - queue: short + queue: medium assignment_statistic_totalCounts: time: "0-01:00" threads: 1 diff --git a/workflow/rules/assignment.smk b/workflow/rules/assignment.smk index 8d257fc..3684acd 100644 --- a/workflow/rules/assignment.smk +++ b/workflow/rules/assignment.smk @@ -1,6 +1,3 @@ -SPLIT_FILES_NUMBER = 1 - - include: "assignment/statistic.smk" @@ -78,9 +75,15 @@ rule assignment_merge: "results/assignment/{assignment}/fastq/merge_split{split}.join.fastq.gz" ), params: - min_overlap=20, - frac_mismatches_allowed=0.10, - min_dovetailed_overlap=50, + min_overlap=lambda wc: config["assignments"][wc.assignment]["NGmerge"][ + "min_overlap" + ], + frac_mismatches_allowed=lambda wc: config["assignments"][wc.assignment][ + "NGmerge" + ]["frac_mismatches_allowed"], + min_dovetailed_overlap=lambda wc: config["assignments"][wc.assignment][ + "NGmerge" + ]["min_dovetailed_overlap"], log: temp("results/logs/assignment/merge.{assignment}.{split}.log"), shell: diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index 7ca7661..21563ac 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -408,7 +408,7 @@ def withoutZeros(project, conf): def getSplitNumber(): - split = SPLIT_FILES_NUMBER + split = 1 if "global" in config: if "assignments" in config["global"]: diff --git a/workflow/schemas/config.schema.yaml b/workflow/schemas/config.schema.yaml index 7a7db67..6c4b3ea 100644 --- a/workflow/schemas/config.schema.yaml +++ b/workflow/schemas/config.schema.yaml @@ -68,6 +68,24 @@ properties: type: string minItems: 1 uniqueItems: true + NGmerge: + type: object + properties: + min_overlap: + type: integer + default: 20 + frac_mismatches_allowed: + type: number + default: 0.1 + min_dovetailed_overlap: + type: integer + default: 20 + required: + - min_overlap + - frac_mismatches_allowed + - min_dovetailed_overlap + default: {} + additionalProperties: false reference: type: string configs: @@ -106,6 +124,7 @@ properties: - configs - alignment_start - sequence_length + - NGmerge additionalProperties: false additionalProperties: false minProperties: 1