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

fix: Gatk filter mutect call typo #3295

Merged
merged 56 commits into from
Oct 4, 2024

Conversation

tdayris
Copy link
Contributor

@tdayris tdayris commented Oct 4, 2024

Thanks to @ypradat , this PR fixes a typo leading to contamination tables being ignored in GATK FilterMutectCall. There also was a non-finished sentence in the documentation.

QC

While the contributions guidelines are more extensive, please particularly ensure that:

  • test.py was updated to call any added or updated example rules in a Snakefile
  • input: and output: file paths in the rules can be chosen arbitrarily
  • wherever possible, command line arguments are inferred and set automatically (e.g. based on file extensions in input: or output:)
  • 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
  • the meta.yaml contains a link to the documentation of the respective tool or command under url:
  • conda environments use a minimal amount of channels and packages, in recommended ordering

Summary by CodeRabbit

  • New Features

    • Updated input parameter description for the contamination table in the GATK FilterMutectCalls tool.
  • Bug Fixes

    • Corrected a typo in the variable name for the contamination table input, ensuring accurate parameter access.

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>
snakedeploy-bot bot and others added 23 commits October 13, 2022 14:25
Automatic update of bio/deepvariant.

Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
<!-- Ensure that the PR title follows conventional commit style (<type>:
<description>)-->
<!-- Possible types are here:
https://github.com/commitizen/conventional-commit-types/blob/master/index.json
-->

### Description

<!-- Add a description of your PR here-->

### QC
<!-- Make sure that you can tick the boxes below. -->

* [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).
Copy link
Contributor

coderabbitai bot commented Oct 4, 2024

Walkthrough

The changes in this pull request involve modifications to two files related to the gatk FilterMutectCalls tool. The meta.yaml file has been updated to clarify the description of the contamination input parameter, specifically indicating it as an "Optional path to contamination table." In the wrapper.py file, a variable name typo was corrected from contemination_table to contamination_table, ensuring proper access to the input parameter from the snakemake.input dictionary. No other structural changes were made.

Changes

File Change Summary
bio/gatk/filtermutectcalls/meta.yaml Updated description of contamination parameter from "Optional path to" to "Optional path to contamination table."
bio/gatk/filtermutectcalls/wrapper.py Corrected variable name from contemination_table to contamination_table for input parameter access.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Snakemake
    participant GATK

    User->>Snakemake: Provide input parameters
    Snakemake->>GATK: Execute FilterMutectCalls with contamination_table
    GATK-->>Snakemake: Return results
    Snakemake-->>User: Output results
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between fb512aa and d937829.

📒 Files selected for processing (2)
  • bio/gatk/filtermutectcalls/meta.yaml (1 hunks)
  • bio/gatk/filtermutectcalls/wrapper.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
bio/gatk/filtermutectcalls/wrapper.py (2)

Pattern **/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.


Pattern **/wrapper.py: Do not complain about use of undefined variable called snakemake.

🪛 yamllint
bio/gatk/filtermutectcalls/meta.yaml

[error] 13-13: trailing spaces

(trailing-spaces)

🪛 Ruff
bio/gatk/filtermutectcalls/wrapper.py

20-20: Undefined name snakemake

(F821)

🔇 Additional comments (2)
bio/gatk/filtermutectcalls/wrapper.py (2)

20-20: LGTM! Typo correction addresses the reported issue.

The change from contemination_table to contamination_table correctly fixes the typo that was causing contamination tables to be ignored. This aligns with the PR objective and ensures that the GATK FilterMutectCalls process will now properly consider the contamination table input when provided.

🧰 Tools
🪛 Ruff

20-20: Undefined name snakemake

(F821)


20-23: Verify the impact on FilterMutectCalls functionality.

While the typo correction is straightforward, it's important to ensure that this change results in the expected behavior for the GATK FilterMutectCalls process.

To verify the impact, please run the following script:

This script will help confirm that:

  1. The contamination_table is correctly retrieved from the input.
  2. The --contamination-table argument is properly included in the GATK command when a contamination table is provided.
✅ Verification successful

FilterMutectCalls functionality verified.

The contamination table is correctly retrieved and included in the GATK FilterMutectCalls command as expected.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of contamination_table in the GATK command

# Test: Check if the contamination table is correctly passed to the GATK command
# Expect: The contamination table should be included in the command when provided
rg --type python -A 10 'contamination_table' bio/gatk/filtermutectcalls/wrapper.py
rg --type python -A 20 'FilterMutectCalls' bio/gatk/filtermutectcalls/wrapper.py

Length of output: 225


Script:

#!/bin/bash
# Description: Retry verification of contamination_table usage in the GATK command without specifying file type

# Test 1: Check if the contamination table is correctly passed to the GATK command using file extension
rg -A 10 'contamination_table' bio/gatk/filtermutectcalls/wrapper.py

# Test 2: Check the inclusion of FilterMutectCalls in the command using file extension
rg -A 20 'FilterMutectCalls' bio/gatk/filtermutectcalls/wrapper.py

Length of output: 1112

🧰 Tools
🪛 Ruff

20-20: Undefined name snakemake

(F821)


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@tdayris tdayris changed the title [fix] Gatk filter mutect call typo fix: Gatk filter mutect call typo Oct 4, 2024
@fgvieira fgvieira merged commit 6295e37 into snakemake:master Oct 4, 2024
8 of 9 checks passed
fgvieira pushed a commit that referenced this pull request Oct 8, 2024
🤖 I have created a release \*beep\* \*boop\*
---
##
[4.7.0](https://www.github.com/snakemake/snakemake-wrappers/compare/v4.6.0...v4.7.0)
(2024-10-04)


### Features

* Add support for bgzip output
([#3267](https://www.github.com/snakemake/snakemake-wrappers/issues/3267))
([36a2b15](https://www.github.com/snakemake/snakemake-wrappers/commit/36a2b15ece9fe03d1c648c575e7828be99a10347))


### Bug Fixes

* Gatk filter mutect call typo
([#3295](https://www.github.com/snakemake/snakemake-wrappers/issues/3295))
([6295e37](https://www.github.com/snakemake/snakemake-wrappers/commit/6295e372ed45d7827e9ad7aae6ba27826b59c5cc))
* Gatk learn orientation model with multiple input files
([#3296](https://www.github.com/snakemake/snakemake-wrappers/issues/3296))
([250dd3e](https://www.github.com/snakemake/snakemake-wrappers/commit/250dd3ec2709d915fb20293207f18e0c83e931a7))


### Performance Improvements

* autobump bio/bbtools
([#3272](https://www.github.com/snakemake/snakemake-wrappers/issues/3272))
([51a5fee](https://www.github.com/snakemake/snakemake-wrappers/commit/51a5feeb4bc7c15bc6bd8442f9ba13e39e77f33b))
* autobump bio/delly
([#3274](https://www.github.com/snakemake/snakemake-wrappers/issues/3274))
([f432006](https://www.github.com/snakemake/snakemake-wrappers/commit/f4320069f90c781308ba1cf5134c92ed91c3548f))
* autobump bio/deseq2/deseqdataset
([#3275](https://www.github.com/snakemake/snakemake-wrappers/issues/3275))
([e311359](https://www.github.com/snakemake/snakemake-wrappers/commit/e31135953256857f1169a6e80a4336878b452659))
* autobump bio/encode_fastq_downloader
([#3276](https://www.github.com/snakemake/snakemake-wrappers/issues/3276))
([29a80c6](https://www.github.com/snakemake/snakemake-wrappers/commit/29a80c6c2de3e343cf6fd2f0e37e16fa9f1ff11a))
* autobump bio/fastq_screen
([#3277](https://www.github.com/snakemake/snakemake-wrappers/issues/3277))
([fead377](https://www.github.com/snakemake/snakemake-wrappers/commit/fead37750da2c1b8787a2b976375258394e1b29d))
* autobump bio/freebayes
([#3278](https://www.github.com/snakemake/snakemake-wrappers/issues/3278))
([bf6a162](https://www.github.com/snakemake/snakemake-wrappers/commit/bf6a16248108351e111f104b82f44ddf74416502))
* autobump bio/gatk3/baserecalibrator
([#3281](https://www.github.com/snakemake/snakemake-wrappers/issues/3281))
([9e32e0f](https://www.github.com/snakemake/snakemake-wrappers/commit/9e32e0f4ed0a4b14eaec19814ea82564f5b2e316))
* autobump bio/gatk3/indelrealigner
([#3279](https://www.github.com/snakemake/snakemake-wrappers/issues/3279))
([26d23ed](https://www.github.com/snakemake/snakemake-wrappers/commit/26d23ed369ca461fca64368dfc7798dd5c9c82de))
* autobump bio/gatk3/printreads
([#3282](https://www.github.com/snakemake/snakemake-wrappers/issues/3282))
([1d621b7](https://www.github.com/snakemake/snakemake-wrappers/commit/1d621b7a137885b8ea13ce056af10c9d523c335a))
* autobump bio/gatk3/realignertargetcreator
([#3280](https://www.github.com/snakemake/snakemake-wrappers/issues/3280))
([90c78fd](https://www.github.com/snakemake/snakemake-wrappers/commit/90c78fd9f1d638823a3c241d1bebdb7e5627681c))
* autobump bio/kallisto/index
([#3091](https://www.github.com/snakemake/snakemake-wrappers/issues/3091))
([5860f2e](https://www.github.com/snakemake/snakemake-wrappers/commit/5860f2ef20a1a8eb49cd39d5b445c0d1aa087453))
* autobump bio/mapdamage2
([#3287](https://www.github.com/snakemake/snakemake-wrappers/issues/3287))
([d2f8a85](https://www.github.com/snakemake/snakemake-wrappers/commit/d2f8a858337e3e5733a325bf510fceb007bf5567))
* autobump bio/meryl/count
([#3286](https://www.github.com/snakemake/snakemake-wrappers/issues/3286))
([b3595af](https://www.github.com/snakemake/snakemake-wrappers/commit/b3595af3d5b7a20ecf5782682992d262aea29a0a))
* autobump bio/meryl/sets
([#3285](https://www.github.com/snakemake/snakemake-wrappers/issues/3285))
([e8579fa](https://www.github.com/snakemake/snakemake-wrappers/commit/e8579fa26864c6eac2296bf56e2e28acd0daea3e))
* autobump bio/meryl/stats
([#3289](https://www.github.com/snakemake/snakemake-wrappers/issues/3289))
([2dadb31](https://www.github.com/snakemake/snakemake-wrappers/commit/2dadb31f01cf4f03ebf4b6dd0e1b06edd05c3ae3))
* autobump bio/multiqc
([#3288](https://www.github.com/snakemake/snakemake-wrappers/issues/3288))
([c69937c](https://www.github.com/snakemake/snakemake-wrappers/commit/c69937cb537efbdd317d56a2edbfde00de1a016c))
* autobump bio/open-cravat/module
([#3291](https://www.github.com/snakemake/snakemake-wrappers/issues/3291))
([dae6566](https://www.github.com/snakemake/snakemake-wrappers/commit/dae6566111a48fd0f7503eef03731ccf218a53a5))
* autobump bio/open-cravat/run
([#3290](https://www.github.com/snakemake/snakemake-wrappers/issues/3290))
([119c11b](https://www.github.com/snakemake/snakemake-wrappers/commit/119c11b6daafe085961d65b2f708bbed627aae87))
* autobump bio/spades/metaspades
([#3292](https://www.github.com/snakemake/snakemake-wrappers/issues/3292))
([6cbbf83](https://www.github.com/snakemake/snakemake-wrappers/commit/6cbbf83eb4ed0e25a700b1729ba4f76b82d76387))
* autobump bio/vep/plugins
([#3293](https://www.github.com/snakemake/snakemake-wrappers/issues/3293))
([ed94694](https://www.github.com/snakemake/snakemake-wrappers/commit/ed946940d0fd4c76f9481a07a458fe27bc4479e3))
* autobump bio/vsearch
([#3294](https://www.github.com/snakemake/snakemake-wrappers/issues/3294))
([fb512aa](https://www.github.com/snakemake/snakemake-wrappers/commit/fb512aa74030f18fa61b6c50c18e4c67413a550c))
---


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>
@coderabbitai coderabbitai bot mentioned this pull request Dec 9, 2024
7 tasks
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.

5 participants