From 5644719c49119dbd3336a39e0ca9f6587a50c84a Mon Sep 17 00:00:00 2001 From: Vito Zanotelli Date: Tue, 6 Aug 2024 09:23:13 +0200 Subject: [PATCH 1/2] Correctly handle non str index list As reported in #522, currently this wrapper has issues if `idx` is a sequence is it incorrectly checked `input.index` to be as tring instead of `input.idx`. This is fixed now. While the discussin in #522 indicates, that there is an underlying issue with the concept of `input.idx` being as sequence of indices, this may need rework later. Until all the details are decided, having a correct version should be still valuable. --- bio/bwa-mem2/mem/wrapper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bio/bwa-mem2/mem/wrapper.py b/bio/bwa-mem2/mem/wrapper.py index f5185fcef..fbb0afce0 100644 --- a/bio/bwa-mem2/mem/wrapper.py +++ b/bio/bwa-mem2/mem/wrapper.py @@ -27,11 +27,11 @@ bwa_threads = snakemake.threads samtools_threads = snakemake.threads - 1 -index = snakemake.input.get("index", "") -if isinstance(index, str): - index = path.splitext(snakemake.input.idx)[0] +idx = snakemake.input.get("idx", "") +if isinstance(idx, str): + index = path.splitext(idx)[0] else: - index = path.splitext(snakemake.input.idx[0])[0] + index = path.splitext(idx[0])[0] # Check inputs/arguments. From 3ef9dcae41ca5ee3c76f50744c1d8d00cd1c3ea9 Mon Sep 17 00:00:00 2001 From: "korbit-ai[bot]" <131444098+korbit-ai[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 19:59:34 +0000 Subject: [PATCH 2/2] [skip ci]