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: move pindel region bed files to input #594
Conversation
Why not just have the BED file as an input file? This way And the prefix, if necesary, should be inferred by the wrapper, not specified in the rule's |
I was thinking to have the bed files as inputs, but that more or less also makes them required, which I kind of wanted to avoid. If I recall correctly, it is possible to set an input to an empty list for it to not fail, and that could then be handled by the wrapper, but that's also kind of ugly. What do you think? Good point about the prefix. I just followed the existing wrapper blindly. Having the prefix managed by the wrapper would be much cleaner. |
Or no, I'm being a square. Whether the argument would be optional or not would be handled by the wrapper. Much cleaner. |
@fgvieira should I open a new PR, or just modify this one? |
Just modify this one... |
ca2ccec
to
00853c8
Compare
It looks great! Just some small cosmetic suggestions. 😄 |
Great, thanks for the input! This turned out a lot better. |
It seems there is a conflict on |
Should be good to go now. |
🤖 I have created a release \*beep\* \*boop\* --- ## [1.17.0](https://www.github.com/snakemake/snakemake-wrappers/compare/v1.16.0...v1.17.0) (2022-10-13) ### Features * move pindel region bed files to input ([#594](https://www.github.com/snakemake/snakemake-wrappers/issues/594)) ([8f52877](https://www.github.com/snakemake/snakemake-wrappers/commit/8f52877aeb5d6510e34ebe846a4fbe2d0e9a2458)) --- 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>
### Description Recently I discovered that if you pass a non-existent bed file as a value for the command line parameters `-j/--include` or `-J/--exclude` in pindel, the program behaves as if empty files are being passed. Since these are supplied in `params.extra`, no checks are done on them. I realise that this is not an issue with the wrapper, per se, but the pindel repo has been archived, and I think that modifying the wrapper might be a good way to catch potential mistakes. Not sure whether my implementation is the best way to handle things, so thoughts and opinions are welcome. ### QC * [x] 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](https://en.wikipedia.org/wiki/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](https://stackoverflow.com/a/64594513/2352071), * 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 `Snakefile`s 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](https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir); 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, * `Snakefile`s pass the linting (`snakemake --lint`), * `Snakefile`s are formatted with [snakefmt](https://github.com/snakemake/snakefmt), * Python wrapper scripts are formatted with [black](https://black.readthedocs.io). * 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). Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com>
🤖 I have created a release \*beep\* \*boop\* --- ## [1.17.0](https://www.github.com/snakemake/snakemake-wrappers/compare/v1.16.0...v1.17.0) (2022-10-13) ### Features * move pindel region bed files to input ([snakemake#594](https://www.github.com/snakemake/snakemake-wrappers/issues/594)) ([8f52877](https://www.github.com/snakemake/snakemake-wrappers/commit/8f52877aeb5d6510e34ebe846a4fbe2d0e9a2458)) --- 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>
Description
Recently I discovered that if you pass a non-existent bed file as a value for the command line parameters
-j/--include
or-J/--exclude
in pindel, the program behaves as if empty files are being passed. Since these are supplied inparams.extra
, no checks are done on them.I realise that this is not an issue with the wrapper, per se, but the pindel repo has been archived, and I think that modifying the wrapper might be a good way to catch potential mistakes.
Not sure whether my implementation is the best way to handle things, so thoughts and opinions are welcome.
QC
For all wrappers added by this PR,
input:
andoutput:
file paths in the resulting rule can be changed arbitrarily,threads: x
statement withx
being a reasonable default,map_reads
for a step that maps reads),environment.yaml
specifications follow the respective best practices,input:
oroutput:
),Snakefile
s and their entries are explained via comments (input:
/output:
/params:
etc.),stderr
and/orstdout
are logged correctly (log:
), depending on the wrapped tool,tempfile.gettempdir()
points to (see here; this also means that using any Pythontempfile
default behavior works),meta.yaml
contains a link to the documentation of the respective tool or command,Snakefile
s pass the linting (snakemake --lint
),Snakefile
s are formatted with snakefmt,