Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: MultiQC automatically detects configuration from input file(s) #2722

Merged
merged 61 commits into from Mar 6, 2024

Conversation

tdayris
Copy link
Contributor

@tdayris tdayris commented Mar 6, 2024

This PR lets MultiQC automatically detect configuration file, when user provides them in input, as described in official documentation.

QC

  • I confirm that:

For all wrappers added by this PR,

  • there is a test case which covers any introduced changes,
  • input: and output: file paths in the resulting rule can be changed arbitrarily,
  • either the wrapper can only use a single core, or the example rule contains a threads: x statement with x being a reasonable default,
  • rule names in the test case are in snake_case and somehow tell what the rule is about or match the tools purpose or name (e.g., map_reads for a step that maps reads),
  • all environment.yaml specifications follow the respective best practices,
  • the environment.yaml pinning has been updated by running snakedeploy pin-conda-envs environment.yaml on a linux machine,
  • wherever possible, command line arguments are inferred and set automatically (e.g. based on file extensions in input: or output:),
  • all fields of the example rules in the Snakefiles and their entries are explained via comments (input:/output:/params: etc.),
  • stderr and/or stdout are logged correctly (log:), depending on the wrapped tool,
  • temporary files are either written to a unique hidden folder in the working directory, or (better) stored where the Python function tempfile.gettempdir() points to (see here; this also means that using any Python tempfile default behavior works),
  • the meta.yaml contains a link to the documentation of the respective tool or command,
  • Snakefiles pass the linting (snakemake --lint),
  • Snakefiles are formatted with snakefmt,
  • Python wrapper scripts are formatted with black.
  • Conda environments use a minimal amount of channels, in recommended ordering. E.g. for bioconda, use (conda-forge, bioconda, nodefaults, as conda-forge should have highest priority and defaults channels are usually not needed because most packages are in conda-forge nowadays).

tdayris and others added 30 commits September 21, 2020 09:16
* perf: update bio/bcftools/index/environment.yaml.

* perf: update bio/bcftools/index/environment.yaml.

* perf: update bio/bcftools/index/environment.yaml.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
* Add autobump action

* fix paths

* dbg

* dbg branch

* add checkout

* dbg

* trigger rerun

* entity regex and add label

* dbg

* Update autobump.yml

* Update autobump.yml
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
@fgvieira
Copy link
Collaborator

fgvieira commented Mar 6, 2024

Is the new test being triggered in test.py?

bio/multiqc/wrapper.py Outdated Show resolved Hide resolved
@tdayris
Copy link
Contributor Author

tdayris commented Mar 6, 2024

Is the new test being triggered in test.py?

It was unstashed, my fault. It's in now. Thanks !

bio/multiqc/test/Snakefile Outdated Show resolved Hide resolved
bio/multiqc/wrapper.py Outdated Show resolved Hide resolved
bio/multiqc/wrapper.py Outdated Show resolved Hide resolved
@fgvieira
Copy link
Collaborator

fgvieira commented Mar 6, 2024

Can it be a problem that the config will also be included as input?

use_input_files_only = snakemake.params.get("use_input_files_only", False)
if not use_input_files_only:
input_data = set(Path(fp).parent for fp in snakemake.input)
else:
input_data = set(snakemake.input)

@tdayris
Copy link
Contributor Author

tdayris commented Mar 6, 2024

Having config in input does not raise any error. However not having them will speed-up the process.

@fgvieira fgvieira merged commit f61238d into snakemake:master Mar 6, 2024
6 checks passed
johanneskoester pushed a commit that referenced this pull request Mar 13, 2024
🤖 I have created a release \*beep\* \*boop\*
---
##
[3.5.0](https://www.github.com/snakemake/snakemake-wrappers/compare/v3.4.1...v3.5.0)
(2024-03-13)


### Features

* Genepred to bed
([#2726](https://www.github.com/snakemake/snakemake-wrappers/issues/2726))
([3998574](https://www.github.com/snakemake/snakemake-wrappers/commit/3998574d4c3cc02706ef4056dbb387835755e0f6))
* MultiQC automatically detects configuration from input file(s)
([#2722](https://www.github.com/snakemake/snakemake-wrappers/issues/2722))
([f61238d](https://www.github.com/snakemake/snakemake-wrappers/commit/f61238d350ba737aae0b2948857d7f50d5f124d7))
* Rseqc distribution
([#2737](https://www.github.com/snakemake/snakemake-wrappers/issues/2737))
([c732ff0](https://www.github.com/snakemake/snakemake-wrappers/commit/c732ff0c1fc5e139659a65c5b4495c67a1476985))
* Rseqc infer experiment
([#2730](https://www.github.com/snakemake/snakemake-wrappers/issues/2730))
([c597f2b](https://www.github.com/snakemake/snakemake-wrappers/commit/c597f2b50170ef0f3843624b38beb27f644022cc))
* Rseqc read duplication
([#2731](https://www.github.com/snakemake/snakemake-wrappers/issues/2731))
([2d5f9e7](https://www.github.com/snakemake/snakemake-wrappers/commit/2d5f9e79b6620cd2bc4627c643b0db846e4d576d))
* Rseqc read gc
([#2729](https://www.github.com/snakemake/snakemake-wrappers/issues/2729))
([739d809](https://www.github.com/snakemake/snakemake-wrappers/commit/739d809ad6d85a17bc5028a549d1e9e1b5262568))
* run Mutect2 multiple with input bam files
([#2736](https://www.github.com/snakemake/snakemake-wrappers/issues/2736))
([7b42689](https://www.github.com/snakemake/snakemake-wrappers/commit/7b426894a935eb071a842176e2449d481edf6d6c))


### Performance Improvements

* autobump bio/gseapy/gsea
([#2727](https://www.github.com/snakemake/snakemake-wrappers/issues/2727))
([400db30](https://www.github.com/snakemake/snakemake-wrappers/commit/400db30891d291605d7bb9e039937a62aea23107))
* autobump bio/sra-tools/fasterq-dump
([#2728](https://www.github.com/snakemake/snakemake-wrappers/issues/2728))
([92c9521](https://www.github.com/snakemake/snakemake-wrappers/commit/92c952124f885624e7725b672f8926cfb7386f76))
* Update Datavzrd
([#2735](https://www.github.com/snakemake/snakemake-wrappers/issues/2735))
([41b562c](https://www.github.com/snakemake/snakemake-wrappers/commit/41b562cf1c387294e7637e46cce66dd2bcb6218e))
* Update Datavzrd to 2.36.4
([#2720](https://www.github.com/snakemake/snakemake-wrappers/issues/2720))
([7611d30](https://www.github.com/snakemake/snakemake-wrappers/commit/7611d30950b85360cb91ff2b58895ae788e05c68))
* Update Datavzrd to 2.36.5
([#2733](https://www.github.com/snakemake/snakemake-wrappers/issues/2733))
([2fad8a1](https://www.github.com/snakemake/snakemake-wrappers/commit/2fad8a1bdf205033b799ce0048aae5af6c2b57c1))
* Update Datavzrd to 2.36.8
([#2738](https://www.github.com/snakemake/snakemake-wrappers/issues/2738))
([8c86447](https://www.github.com/snakemake/snakemake-wrappers/commit/8c86447fde4419e377e7a2c544a330343bbf19ab))
---


This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants