-
Notifications
You must be signed in to change notification settings - Fork 186
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: Varscan2 - SnpEff Meta wrapper #3501
base: master
Are you sure you want to change the base?
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>
📝 WalkthroughWalkthroughThe changes introduce a new meta-wrapper configuration for a bioinformatics pipeline in the Changes
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 3
🧹 Outside diff range and nitpick comments (5)
meta/bio/varscan2_snpeff/meta.yaml (1)
1-17
: Consider revising step categorization in the tableThe table structure is clear and informative, but there's an inconsistency in the "Step" column:
- Steps 1-3 are labeled as "Call variants" but step 1 (genome sequence acquisition) is actually a prerequisite
- Steps 4-5 are correctly labeled as "Annotate calls"
Consider this revised categorization:
- | Call variants | Shell | Acquire genome sequence | + | Preparation | Shell | Acquire genome sequence |meta/bio/varscan2_snpeff/test/Snakefile (3)
13-25
: Improve parameter naming and directory structureThe rule implementation is correct, but could be improved:
- The
extra
parameter name could be more descriptive- Consider organizing outputs in a more structured way
output: - "samtools/mpileup.gz", + "results/samtools/mpileup.gz", threads: 1 log: - "logs/samtools_mpileup.log", + "logs/samtools/mpileup.log", params: - extra=" --count-orphans ", + mpileup_args=" --count-orphans ",
27-39
: Update input path and add VCF version informationConsider the following improvements:
- Update input path to match the suggested samtools output path
- Add VCF version information in the filename
- Organize outputs in a results directory
input: - mpileup="samtools/mpileup.gz", + mpileup="results/samtools/mpileup.gz", output: - snp="varscan2/snp.vcf", - indel="varscan2/indel.vcf", + snp="results/varscan2/snp.vcf4.2", + indel="results/varscan2/indel.vcf4.2",
1-65
: Consider architectural improvements for the workflowWhile the workflow is well-structured, consider the following improvements:
Add workflow documentation as comments, including:
- Input requirements
- Expected output files
- Resource requirements
- Tool versions
Mark intermediate files as temporary:
output: - "results/samtools/mpileup.gz", + temp("results/samtools/mpileup.gz"),
- Add resource specifications for cluster execution:
# Add to each rule resources: mem_mb=4000, runtime=60test_wrappers.py (1)
817-829
: Add docstring to document test purposeThe test implementation follows the established patterns in the codebase and correctly tests the varscan2-snpeff meta wrapper. Consider adding a docstring to document what this test validates.
def test_varscan2_snpeff_meta(run): + """Test the varscan2-snpeff meta wrapper by validating generation of an annotated VCF file.""" run( "meta/bio/varscan2_snpeff", [ "snakemake", "--cores", "1", "--use-conda", "-F", "snpeff/annotated.vcf", ], )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
meta/bio/varscan2_snpeff/meta.yaml
(1 hunks)meta/bio/varscan2_snpeff/test/Snakefile
(1 hunks)meta/bio/varscan2_snpeff/used_wrappers.yaml
(1 hunks)test_wrappers.py
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- meta/bio/varscan2_snpeff/used_wrappers.yaml
🧰 Additional context used
📓 Path-based instructions (1)
test_wrappers.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 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.
🔇 Additional comments (1)
meta/bio/varscan2_snpeff/meta.yaml (1)
18-20
: LGTM!
The authors section follows the correct YAML format and properly attributes the contribution.
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: 1
🧹 Outside diff range and nitpick comments (1)
meta/bio/varscan2_snpeff/meta.yaml (1)
5-17
: Consider improving the workflow description format and clarity.While the table is visually clear, there are a few suggestions for improvement:
- The "Step" column could be more specific instead of repeating "Call variants" multiple times
- Consider using a more maintainable YAML list format instead of ASCII art table
- The "Shell" tool reference is vague and could be more specific about the actual tool or command being used
Consider this alternative format:
steps: variant_calling: - name: "Genome Sequence Acquisition" tool: "wget/curl" # or specific tool name purpose: "Acquire genome sequence" - name: "Variant Detection" tool: "Samtools" purpose: "Acquire a list of potential variants" - name: "Variant Calling" tool: "Varscan2" purpose: "Call variants with Varscan2" annotation: - name: "Database Preparation" tool: "SnpEff" purpose: "Download variants database" - name: "Variant Annotation" tool: "SnpEff" purpose: "Annotate variants with downloaded database"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
meta/bio/varscan2_snpeff/meta.yaml
(1 hunks)meta/bio/varscan2_snpeff/test/Snakefile
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- meta/bio/varscan2_snpeff/test/Snakefile
🔇 Additional comments (2)
meta/bio/varscan2_snpeff/meta.yaml (2)
1-4
: LGTM! Clear and well-structured header.
The name and description structure follow YAML best practices and clearly indicate the purpose of the meta-wrapper.
19-20
: LGTM! Author information is properly formatted.
The author section follows the correct YAML list structure and matches the PR submitter.
Co-authored-by: Filipe G. Vieira <[email protected]>
I have been contacted about issue #275 . Varscan2 and SnpEff are compatible while calling somatic variants. No error is produced, and SNP are correctly annotated in the end.
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
Tests