-
Notifications
You must be signed in to change notification settings - Fork 185
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: Rseqc inner distance #3140
Conversation
* 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>
WalkthroughThis update introduces several new files related to the Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
aln="A.bam", | ||
refgene="annotation.bed", | ||
output: | ||
txt="a.txt", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use a more specific name than txt
. What does this file contain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a trash-file IMO. I don't know any tool that uses this file (multiqc uses the output.freq
file, both PDF and R scripts are used by us, humans). RSeQC itself never reads the content of this file.
This file is a TSV is not described by any official documentation. I just read the code, and, for each read in the input (bam/sam), it contains the following: read name <tab> inner_distance if no filtered else NA <tab> comments about read pair
.
Let's call it reads_inner_distance
?
Co-authored-by: Filipe G. Vieira <[email protected]>
Co-authored-by: Filipe G. Vieira <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
test.py (1)
6478-6482
: Consider Adding Generic Exception Handling inrun
FunctionThe
run
function currently handles specific conditions with custom exceptions but lacks a broader exception handling mechanism. Consider adding generic exception handling to catch and log unexpected errors to improve robustness.
- Review the
run
function to ensure all potential error cases are covered.Analysis chain
LGTM! Verify error handling in the
run
function.The function is correctly implemented. Ensure that the
run
function handles exceptions correctly and logs any errors.The code changes are approved.
Run the following script to verify the error handling in the
run
function:Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify error handling in the `run` function. # Test: Search for exception handling in the `run` function. Expect: Proper logging of errors. rg --type python -A 5 'def run' | grep -A 5 'except Exception as e'Length of output: 100
Script:
#!/bin/bash # Description: Verify error handling in the `run` function. # Test: Search for exception handling in the `run` function. Expect: Proper logging of errors. rg --type py -A 10 'def run' | grep -A 10 'except Exception as e'Length of output: 67
Script:
#!/bin/bash # Description: Search for the `run` function and inspect its implementation for error handling. # Test: Search for the `run` function definition and its complete implementation. rg --type py -A 50 'def run'Length of output: 2345
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- bio/rseqc/inner_distance/environment.linux-64.pin.txt (1 hunks)
- bio/rseqc/inner_distance/environment.yaml (1 hunks)
- bio/rseqc/inner_distance/meta.yaml (1 hunks)
- bio/rseqc/inner_distance/test/Snakefile (1 hunks)
- bio/rseqc/inner_distance/test/annotation.bed (1 hunks)
- bio/rseqc/inner_distance/wrapper.py (1 hunks)
- test.py (1 hunks)
Files skipped from review due to trivial changes (2)
- bio/rseqc/inner_distance/environment.linux-64.pin.txt
- bio/rseqc/inner_distance/environment.yaml
Additional context used
Path-based instructions (2)
bio/rseqc/inner_distance/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 theself
argument of methods.
Do not suggest type annotation of thecls
argument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturn
statement.
Pattern
**/wrapper.py
: Do not complain about use of undefined variable calledsnakemake
.test.py (1)
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 theself
argument of methods.
Do not suggest type annotation of thecls
argument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturn
statement.
Ruff
bio/rseqc/inner_distance/wrapper.py
13-13: Undefined name
snakemake
(F821)
14-14: Undefined name
snakemake
(F821)
25-25: Undefined name
snakemake
(F821)
32-32: Undefined name
snakemake
(F821)
39-39: Undefined name
snakemake
(F821)
46-46: Undefined name
snakemake
(F821)
Additional comments not posted (19)
bio/rseqc/inner_distance/test/annotation.bed (1)
1-2
: LGTM!The BED file is correctly formatted.
The code changes are approved.
bio/rseqc/inner_distance/test/Snakefile (6)
1-1
: LGTM!The rule name is descriptive and follows naming conventions.
The code changes are approved.
2-4
: LGTM!The input files are correctly specified and relevant to the task.
The code changes are approved.
5-9
: LGTM!The output files are correctly specified and relevant to the task. The file names are descriptive.
The code changes are approved.
10-11
: LGTM!The log file is correctly specified and relevant to the task.
The code changes are approved.
12-13
: LGTM!The extra parameters are correctly specified and relevant to the task.
The code changes are approved.
14-15
: LGTM!The wrapper path is correctly specified and relevant to the task.
The code changes are approved.
bio/rseqc/inner_distance/meta.yaml (5)
1-2
: LGTM!The name and description are correctly specified and relevant to the task.
The code changes are approved.
3-5
: LGTM!The URL and authors are correctly specified and relevant to the task.
The code changes are approved.
6-8
: LGTM!The input files are correctly specified and relevant to the task.
The code changes are approved.
9-13
: LGTM!The output files are correctly specified and relevant to the task.
The code changes are approved.
14-15
: LGTM!The extra parameters are correctly specified and relevant to the task.
The code changes are approved.
bio/rseqc/inner_distance/wrapper.py (7)
1-9
: LGTM!The file encoding, docstring, and author information are correctly implemented.
The code changes are approved.
10-12
: LGTM!The import statements are correctly implemented and necessary for the functionality.
The code changes are approved.
13-15
: Address log overwriting concern.The
log
variable usesappend=True
, which should prevent overwriting. However, ensure that this behavior is as expected.Please verify that the logs are appended and not overwritten.
Tools
Ruff
13-13: Undefined name
snakemake
(F821)
14-14: Undefined name
snakemake
(F821)
16-23
: LGTM!The shell command execution within a temporary directory is correctly implemented.
The code changes are approved.
25-31
: LGTM!The conditional block for moving the
reads_inner_distance
output file is correctly implemented.The code changes are approved.
Tools
Ruff
25-25: Undefined name
snakemake
(F821)
32-37
: LGTM!The conditional block for moving the
The code changes are approved.
Tools
Ruff
32-32: Undefined name
snakemake
(F821)
39-51
: LGTM!The conditional blocks for moving the
freq
andplot_r
output files are correctly implemented.The code changes are approved.
Tools
Ruff
39-39: Undefined name
snakemake
(F821)
46-46: Undefined name
snakemake
(F821)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- bio/rseqc/inner_distance/environment.linux-64.pin.txt (1 hunks)
- bio/rseqc/inner_distance/environment.yaml (1 hunks)
- bio/rseqc/inner_distance/meta.yaml (1 hunks)
- bio/rseqc/inner_distance/test/Snakefile (1 hunks)
- bio/rseqc/inner_distance/test/annotation.bed (1 hunks)
- bio/rseqc/inner_distance/wrapper.py (1 hunks)
- test.py (1 hunks)
Files skipped from review due to trivial changes (3)
- bio/rseqc/inner_distance/environment.linux-64.pin.txt
- bio/rseqc/inner_distance/environment.yaml
- bio/rseqc/inner_distance/test/annotation.bed
Additional context used
Path-based instructions (2)
bio/rseqc/inner_distance/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 theself
argument of methods.
Do not suggest type annotation of thecls
argument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturn
statement.
Pattern
**/wrapper.py
: Do not complain about use of undefined variable calledsnakemake
.test.py (1)
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 theself
argument of methods.
Do not suggest type annotation of thecls
argument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturn
statement.
Ruff
bio/rseqc/inner_distance/wrapper.py
13-13: Undefined name
snakemake
(F821)
14-14: Undefined name
snakemake
(F821)
25-25: Undefined name
snakemake
(F821)
32-32: Undefined name
snakemake
(F821)
39-39: Undefined name
snakemake
(F821)
46-46: Undefined name
snakemake
(F821)
Additional comments not posted (16)
bio/rseqc/inner_distance/test/Snakefile (5)
2-4
: LGTM!The input section is correctly defined.
The code changes are approved.
5-9
: LGTM!The output section is correctly defined.
The code changes are approved.
10-11
: LGTM!The log section is correctly defined.
The code changes are approved.
12-13
: LGTM!The params section is correctly defined.
The code changes are approved.
14-15
: LGTM!The wrapper section is correctly defined.
The code changes are approved.
bio/rseqc/inner_distance/meta.yaml (5)
1-2
: LGTM!The name and description section is correctly defined.
The code changes are approved.
3-3
: LGTM!The url section is correctly defined.
The code changes are approved.
4-5
: LGTM!The authors section is correctly defined.
The code changes are approved.
6-8
: LGTM!The input section is correctly defined.
The code changes are approved.
9-15
: LGTM!The output and params sections are correctly defined.
The code changes are approved.
bio/rseqc/inner_distance/wrapper.py (5)
3-8
: LGTM!The metadata section is correctly defined.
The code changes are approved.
10-11
: LGTM!The imports section is correctly defined.
The code changes are approved.
13-14
: LGTM!The extra and log parameters section is correctly defined.
The code changes are approved.
Tools
Ruff
13-13: Undefined name
snakemake
(F821)
14-14: Undefined name
snakemake
(F821)
16-23
: LGTM!The main shell command section is correctly defined.
The code changes are approved.
25-51
: LGTM!The output handling section is correctly defined.
The code changes are approved.
Tools
Ruff
25-25: Undefined name
snakemake
(F821)
32-32: Undefined name
snakemake
(F821)
39-39: Undefined name
snakemake
(F821)
46-46: Undefined name
snakemake
(F821)
test.py (1)
6491-6496
: LGTM!The function is correctly implemented and follows the pattern used in other test functions.
The code changes are approved.
🤖 I have created a release \*beep\* \*boop\* --- ## [4.3.0](https://www.github.com/snakemake/snakemake-wrappers/compare/v4.2.0...v4.3.0) (2024-08-28) ### Features * add support for multiple input file subcommands in seqkit wrapper (subcommands "common" and "concat") ([#3142](https://www.github.com/snakemake/snakemake-wrappers/issues/3142)) ([3b5391f](https://www.github.com/snakemake/snakemake-wrappers/commit/3b5391f619b38334829c06b8bd0526a16e19c732)) * Deeptools multibigwig summary ([#3135](https://www.github.com/snakemake/snakemake-wrappers/issues/3135)) ([df7e2bf](https://www.github.com/snakemake/snakemake-wrappers/commit/df7e2bffdd61690e56380bb1b49ca663e58a477c)) * Deeptools plot correlation ([#3137](https://www.github.com/snakemake/snakemake-wrappers/issues/3137)) ([a965bd6](https://www.github.com/snakemake/snakemake-wrappers/commit/a965bd62f13bb62722daf08201a00b1f26bef38d)) * Deeptools plot pca ([#3138](https://www.github.com/snakemake/snakemake-wrappers/issues/3138)) ([0d9862b](https://www.github.com/snakemake/snakemake-wrappers/commit/0d9862b0f91e74bb90993eb7ecb938dec80d779b)) * Rseqc bamstat ([#3139](https://www.github.com/snakemake/snakemake-wrappers/issues/3139)) ([b4267e6](https://www.github.com/snakemake/snakemake-wrappers/commit/b4267e6a0244071a96efc8a91fd6ba982a738cb5)) * Rseqc inner distance ([#3140](https://www.github.com/snakemake/snakemake-wrappers/issues/3140)) ([8ca10f3](https://www.github.com/snakemake/snakemake-wrappers/commit/8ca10f3949ca6fb1ed9f9d046c89ca10a7c32c8c)) --- 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>
QC
snakemake-wrappers
.While the contributions guidelines are more extensive, please particularly ensure that:
test.py
was updated to call any added or updated example rules in aSnakefile
input:
andoutput:
file paths in the rules can be chosen arbitrarilyinput:
oroutput:
)tempfile.gettempdir()
points tometa.yaml
contains a link to the documentation of the respective tool or command underurl:
Summary by CodeRabbit
New Features
environment.linux-64.pin.txt
for a reproducible Conda environment setup on Linux 64-bit.environment.yaml
to streamline the installation of therseqc
package and its dependencies.inner_distance
tool to calculate inner distances between read pairs in genomic data.annotation.bed
file for genomic feature representation.Enhancements
Tests