From bd91da9cabb4314baf678899ce91e0946c39e88e Mon Sep 17 00:00:00 2001 From: Thomas Cokelaer Date: Tue, 5 Dec 2023 10:43:35 +0100 Subject: [PATCH] hotfix to use on HPC clusters --- README.rst | 1 + pyproject.toml | 2 +- sequana_pipelines/ribofinder/__init__.py | 15 ++++++++++----- sequana_pipelines/ribofinder/ribofinder.rules | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 24846f4..6c691f6 100644 --- a/README.rst +++ b/README.rst @@ -109,6 +109,7 @@ Changelog ========= ==================================================================== Version Description ========= ==================================================================== +1.1.1 * hotfix for running on HPC (slurm) 1.1.0 * Uses click (refactoring of sequana_pipetools) 1.0.1 * add sequana_wrappers in the config/pipeline 1.0.0 * use graphviz apptainer and latest wrappers diff --git a/pyproject.toml b/pyproject.toml index dea6c01..6e39ead 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "sequana-ribofinder" -version = "1.1.0" +version = "1.1.1" description = "A multi-sample identification of ribosomal content" authors = ["Sequana Team"] license = "BSD-3" diff --git a/sequana_pipelines/ribofinder/__init__.py b/sequana_pipelines/ribofinder/__init__.py index 132e999..6d5f263 100644 --- a/sequana_pipelines/ribofinder/__init__.py +++ b/sequana_pipelines/ribofinder/__init__.py @@ -1,6 +1,11 @@ -import pkg_resources -try: - version = pkg_resources.require("sequana_ribofinder")[0].version -except: - version = ">=0.8.0" +import importlib.metadata as metadata + +def get_package_version(package_name): + try: + version = metadata.version(package_name) + return version + except metadata.PackageNotFoundError: + return f"{package_name} not found" + +version = get_package_version("sequana-ribofinder") diff --git a/sequana_pipelines/ribofinder/ribofinder.rules b/sequana_pipelines/ribofinder/ribofinder.rules index bc7c88a..3fc0753 100644 --- a/sequana_pipelines/ribofinder/ribofinder.rules +++ b/sequana_pipelines/ribofinder/ribofinder.rules @@ -184,7 +184,7 @@ rule fix_bowtie1_log: input: expand("{sample}/bowtie1/{sample}.log", sample=manager.samples) output: - "logs/fix_bowtie1_log" + "logs/fix_bowtie1_log/done" run: for filename in input: # we read the file @@ -273,7 +273,7 @@ rule bam_indexing: # ========================================================== multiqc # sequana_multiqc_input = expand("{sample}/bowtie1/{sample}.sorted.bam.bai", sample=sorted(manager.samples)) -sequana_multiqc_input += ["logs/fix_bowtie1_log"] +sequana_multiqc_input += ["logs/fix_bowtie1_log/done"] rule multiqc: