From f8ae13716cf42aafc73538db89b5b8de3734ae4e Mon Sep 17 00:00:00 2001 From: Thomas Cokelaer Date: Tue, 20 Feb 2024 09:43:17 +0100 Subject: [PATCH 1/2] Fix CI and typo in onerror section --- .github/workflows/apptainer.yml | 1 + .github/workflows/main.yml | 5 +++-- README.rst | 1 + pyproject.toml | 2 +- sequana_pipelines/fastqc/config.yaml | 2 ++ sequana_pipelines/fastqc/fastqc.rules | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/apptainer.yml b/.github/workflows/apptainer.yml index 8119e1b..75a1546 100644 --- a/.github/workflows/apptainer.yml +++ b/.github/workflows/apptainer.yml @@ -49,6 +49,7 @@ jobs: - name: install package itself run: | pip install . + pip install "pulp==2.7.0" --no-deps - name: testing run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 430039a..27a8ca8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ on: pull_request: branches-ignore: [] schedule: - - cron: '0 0 1 * *' + - cron: '0 0 8 * *' jobs: build-linux: @@ -37,11 +37,12 @@ jobs: extra-specs: | python=${{ matrix.python }} - - name: install package itself shell: bash -l {0} run: | pip install . + pip install "pulp==2.7.0" --no-deps + - name: Install dependencies shell: bash -l {0} diff --git a/README.rst b/README.rst index abb2dae..1056f75 100644 --- a/README.rst +++ b/README.rst @@ -132,6 +132,7 @@ Changelog ========= ==================================================================== Version Description ========= ==================================================================== +1.8.2 * Fix the onerror typo in the pipeline, fix CI. 1.8.1 * update __init__ (version) 1.8.0 * uses pyproject instead of setuptools * uses click instead of argparse and newest sequana_pipetools diff --git a/pyproject.toml b/pyproject.toml index b720376..8a58fee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "sequana-fastqc" -version = "1.8.1" +version = "1.8.2" description = "A multi-sample fastqc pipeline from Sequana project" authors = ["Sequana Team"] license = "BSD-3" diff --git a/sequana_pipelines/fastqc/config.yaml b/sequana_pipelines/fastqc/config.yaml index 832ae81..26879aa 100644 --- a/sequana_pipelines/fastqc/config.yaml +++ b/sequana_pipelines/fastqc/config.yaml @@ -32,6 +32,8 @@ apptainers: # # Choose one of the standard method to perform QC of your fastq data # +# method_choice__ = ["fastqc", "falco"] +# general: method_choice: fastqc diff --git a/sequana_pipelines/fastqc/fastqc.rules b/sequana_pipelines/fastqc/fastqc.rules index 22e8c51..a46cc2f 100644 --- a/sequana_pipelines/fastqc/fastqc.rules +++ b/sequana_pipelines/fastqc/fastqc.rules @@ -366,5 +366,5 @@ onsuccess: shell("chmod -R g+w .") onerror: - manager.error_status() + manager.onerror() From 2a3d20dd4af41673dda2eace16f6c79c99218614 Mon Sep 17 00:00:00 2001 From: Thomas Cokelaer Date: Tue, 20 Feb 2024 10:00:49 +0100 Subject: [PATCH 2/2] Update onsuccess section --- sequana_pipelines/fastqc/fastqc.rules | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sequana_pipelines/fastqc/fastqc.rules b/sequana_pipelines/fastqc/fastqc.rules index a46cc2f..3cc61b6 100644 --- a/sequana_pipelines/fastqc/fastqc.rules +++ b/sequana_pipelines/fastqc/fastqc.rules @@ -256,13 +256,15 @@ localrules: rulegraph onsuccess: + from sequana.modules_report.summary import SequanaReport + from sequana import logger + logger.setLevel("INFO") + # Create the tree.html file with all fastqc reports hh = HTMLDirectory(".", pattern="fastqc.html") with open("tree.html", "w") as fout: fout.write(hh.get_html()) - from sequana import logger - logger.setLevel("INFO") # This should create the stats plot and the Makefile manager.teardown() @@ -323,22 +325,13 @@ onsuccess: htmltable2 = datatable.create_datatable(style="width: 20%; float:left" ) - from sequana.modules_report.summary import SummaryModule2 - from sequana_pipelines import fastqc - data = { - "name": manager.name, - "rulegraph": ".sequana/rulegraph.svg", - "stats": "stats.txt", - "pipeline_version": fastqc.version - - } # Here the is main HTML page report contents = f"""

General information

{js2} {htmltable2}
""" - image = SummaryModule2.png_to_embedded_png("dummy", "outputs/summary.png", + image = SequanaReport.png_to_embedded_png("dummy", "outputs/summary.png", style="width:80%; height:40%") contents += f"""
@@ -359,7 +352,8 @@ onsuccess: contents += hh.get_html() - s = SummaryModule2(data, intro=contents) + data = manager.getmetadata() + s = SequanaReport(data, intro=contents) # finally, some cleanup shell("rm -rf rulegraph") # embedded in report