Skip to content

Commit

Permalink
New module: Seqera Platform CLI (#2151)
Browse files Browse the repository at this point in the history
* New module: seqera-cli

* [automated] Update CHANGELOG.md

* Add barplot, version, parse uncompressed

* Fix

* Update docs

* Support custom header["to_float"] function, use it for duration. Meaninful colors for barplot

* Shorter repo name

* remove mention of table sorting

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Robert Syme <rob.syme@gmail.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Robert Syme <rob.syme@gmail.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Phil Ewels <phil.ewels@seqera.io>

* Remove to_float, support format callable instead. Add humanize for dates and gb

* nbsp

* Fix

* Address review, fixes

* Add nextflow and platform versions, use color badges, use deterministic hash for categorical Bscale

* Fix lint

* Fix order

* Rename search pattern

* Add simple barplots

* Simple barplots: show if no data

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

* Update multiqc/modules/seqera_cli/seqera_cli.py

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

---------

Co-authored-by: MultiQC Bot <multiqc-bot@seqera.io>
Co-authored-by: Phil Ewels <phil.ewels@seqera.io>
Co-authored-by: Robert Syme <rob.syme@gmail.com>
Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
  • Loading branch information
5 people committed Nov 2, 2023
1 parent b37840e commit 17bc033
Show file tree
Hide file tree
Showing 16 changed files with 495 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/multiqc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
run: |
multiqc ${{ needs.changes.outputs.single_module }} test_data/data/modules/ --filename all_ignored.html --ignore-samples '*'
if [[ -f all_ignored.html ]]; then
echo "No report should have been generated! Likely due to a module missing self.ignore_samples() or UserWarning when no matching files are found" >&2
echo "No report should have been generated! Likely due to a module missing self.ignore_samples() or ModuleNoSamplesFound when no matching files are found" >&2
exit 1
fi
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

### New Modules

- [**Seqera Platform CLI**](https://github.com/seqeralabs/tower-cli) ([#2151](https://github.com/ewels/MultiQC/pull/2151))
- Seqera Platform CLI reports statistics generated by the Seqera Platform CLI.

### Module updates

- **fastp**: correctly parse sample name from --in1/--in2 command. Prefer file name if not `fastp.json`; fallback to file name when error ([#2139](https://github.com/ewels/MultiQC/pull/2139))
Expand Down
2 changes: 2 additions & 0 deletions CSP.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# (Content Security Policy), you will need the following scripts allowlisted:

script-src 'self'
# 1.18
'sha256-W6HVWfJ0uI4smLSf8gzVvnrHUJaXGP/HEeBvr0SYfyk=' # multiqc/templates/default/assets/js/multiqc_tables.js

# 1.17
'sha256-krKzkLmKjisEgw0YGKglUFqLmEh6sK08Qw6xPmmo/10=' # ////////////////////////////////////////////////// Base JS for MultiQC Reports//
Expand Down
9 changes: 6 additions & 3 deletions docs/core/development/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,8 @@ headers['name'] = {
'min': None, # Maximum value in range, for bar / colour coding
'scale': 'GnBu', # Colour scale for colour coding. Set to False to disable.
'suffix': None, # Suffix for value (eg. '%')
'format': '{:,.1f}', # Output format() string
'shared_key': None # See below for description
'format': '{:,.1f}', # Output format() string. Can also be a lambda function.
'shared_key': None, # See below for description
'modify': None, # Lambda function to modify values
'hidden': False, # Set to True to hide the column on page load
'placement' : 1000.0, # Alter the default ordering of columns in the table
Expand All @@ -817,13 +817,16 @@ headers['name'] = {
- `modify`
- A python `lambda` function to change the data in some way when it is
inserted into the table.
- `format`
- A format string or a python `lambda` function to format the data to display
on screen.
- `hidden`
- Setting this to `True` will hide the column when the report loads. It can
then be shown through the _Configure Columns_ modal in the report. This can
be useful when data could be sometimes useful. For example, some modules
show "percentage aligned" on page load but hide "number of reads aligned".
- `placement`
- If you feel that the results from your module should appear at the left side
- If you feel that the results from your module should appear on the left side
of the table set this value less than 1000. Or to move the column right, set
it greater than 1000. This value can be any float.

Expand Down
2 changes: 1 addition & 1 deletion docs/core/development/plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ config = {
'cpswitch': True, # Show the 'Counts / Percentages' switch?
'cpswitch_c_active': True, # Initial display with 'Counts' specified? False for percentages.
'cpswitch_counts_label': 'Counts', # Label for 'Counts' button
'cpswitch_percent_label': 'Percentages' # Label for 'Percentages' button
'cpswitch_percent_label': 'Percentages',# Label for 'Percentages' button
'logswitch': False, # Show the 'Log10' switch?
'logswitch_active': False, # Initial display with 'Log10' active?
'logswitch_label': 'Log10', # Label for 'Log10' button
Expand Down
24 changes: 24 additions & 0 deletions docs/modules/seqera_cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Seqera Platform CLI
url: https://github.com/seqeralabs/tower-cli
description: Reports statistics generated by the Seqera Platform CLI.
---

Parses a tar-gz dump containing logs and stats from a Seqera Platform run, that is,
the `runs_SmUkr43Nul49G.tar.gz` file generated by the following command:

```sh
tw runs dump -id=SmUkr43Nul49G --workspace=seqeralabs/benchmarks --output=runs_SmUkr43Nul49G.tar.gz
```

Expects the dump to contain a `workflow.json` file, along with `workflow-load.json`.

Can also parse an uncompressed version of the dump, that is, a `workflow.json` file
and a `workflow-load.json` sitting together in a directory.

To allow reading the tar-gz archives, run with `ignore_images: false`
in the config, e.g.:

```sh
multiqc . --cl-config 'ignore_images: false'
```
1 change: 1 addition & 0 deletions multiqc/modules/seqera_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .seqera_cli import MultiqcModule

0 comments on commit 17bc033

Please sign in to comment.