feat: Agat prepare genome resources meta-wrapper#5437
Conversation
📝 WalkthroughWalkthroughThis PR adds a new meta-wrapper ChangesAgat genome statistics meta-wrapper
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Snakemake
participant Download as Download rules
participant AGAT as AGAT fix/filter rules
participant Stats as compute_genome_wide_statistics
Snakemake->>Download: download_ensembl_genome_sequence / download_ensembl_genome_annotations
Download->>Download: filter_genome_sequence_contigs (optional)
Download->>AGAT: fix_known_format_issues_with_ensembl_gff
AGAT->>AGAT: remove_tsl_na_from_gff_annotations
AGAT->>AGAT: ensure_annotations_and_sequences_have_same_contigs
AGAT->>Stats: matched GFF + FASTA
Stats-->>Snakemake: report.txt, statistics.yaml, plots/
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@meta/bio/agat_genome_statistics/meta_wrapper.smk`:
- Around line 59-70: The AGAT filtering command in
remove_tsl_na_from_gff_annotations is passing a quoted value for
transcript_support_level, so it will not match plain NA entries in the GFF3
annotations. Update the params.extra argument for
agat_sp_filter_feature_by_attribute_value.pl to use the unquoted NA value,
keeping the existing attribute and test options intact so the rule matches the
intended records.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 14151a4e-3645-43a5-b0aa-e1bdca3a6e0b
📒 Files selected for processing (6)
meta/bio/agat_genome_statistics/meta.yamlmeta/bio/agat_genome_statistics/meta_wrapper.smkmeta/bio/agat_genome_statistics/test/Snakefilemeta/bio/agat_genome_statistics/test/config.yamlmeta/bio/agat_genome_statistics/used_wrappers.yamltest_wrappers.py
|
Not sure I follow... this PR add a meta-wrapper for AGAT showcasing how to use wildcards and pathvars together. |
This PR is here as an attempt to answer a coworker's issue with
pathvars.pathvarevaluations are postponed after the wrapper evaluation. This lead to two kind of errors :pathvarscan only be strings. e.g."v5.10.0/bio/reference/ensembl-sequence"expects numbers in itsreleaseparameter.pathvarsbefore they're being replaced by Snakemake. e.g."v5.10.0/bio/reference/ensembl-sequence"fails to castreleaseto int.Here, we use
pathvarsandwildcardsalongside. But replacing thewildcardswithpathvarswill reproduce the above issues.QC
snakemake-wrappers.While the contributions guidelines are more extensive, please particularly ensure that:
test.pywas updated to call any added or updated example rules in aSnakefileinput:andoutput:file paths in the rules can be chosen arbitrarilyinput:oroutput:)tempfile.gettempdir()points tometa.yamlcontains a link to the documentation of the respective tool or command underurl:Summary by CodeRabbit