Skip to content

Commit

Permalink
Merge pull request #21 from cokelaer/main
Browse files Browse the repository at this point in the history
Fix CI and typo in onerror section
  • Loading branch information
cokelaer authored Feb 20, 2024
2 parents 96e2ec4 + 2a3d20d commit ecbe310
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/apptainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- name: install package itself
run: |
pip install .
pip install "pulp==2.7.0" --no-deps
- name: testing
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:
branches-ignore: []
schedule:
- cron: '0 0 1 * *'
- cron: '0 0 8 * *'

jobs:
build-linux:
Expand Down Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions sequana_pipelines/fastqc/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 8 additions & 14 deletions sequana_pipelines/fastqc/fastqc.rules
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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"""<h2> General information</h2>
<div style="float:left; width:30%">{js2} {htmltable2}</div>
"""

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"""<div style="float:right; width:65%">
Expand All @@ -359,12 +352,13 @@ 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
shell("chmod -R g+w .")

onerror:
manager.error_status()
manager.onerror()

0 comments on commit ecbe310

Please sign in to comment.