Skip to content

Conversation

@dlaehnemann
Copy link
Member

@dlaehnemann dlaehnemann commented Dec 18, 2025

This flavor does not exist for other species. We'll have to see, whether isoformanalyzer will work for non-human, I guess.

Summary by CodeRabbit

  • Bug Fixes
    • Annotation resource selection is now species-aware: human (Homo sapiens) datasets use the specialized annotation path while non-human datasets use the appropriate alternative, improving consistency and accuracy of annotation handling across organisms.

✏️ Tip: You can customize this high-level summary in your review settings.

…exist for other species (we'll have to see, whether isoformanalyzer will work for non-human, I guess)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Walkthrough

The get_annotation rule in workflow/rules/ref.smk now sets its flavor parameter conditionally: it is "chr_patch_hapl_scaff" when config["path"]["resource"]["ref"]["species"] == "homo_sapiens", and "" (empty string) for all other species.

Changes

Cohort / File(s) Summary
Annotation rule species-dependent flavor
workflow/rules/ref.smk
Modified get_annotation rule to set flavor conditionally based on config["path"]["resource"]["ref"]["species"]: "chr_patch_hapl_scaff" for homo_sapiens, "" for others.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the config path and exact species string match ("homo_sapiens").
  • Confirm that downstream logic accepts an empty-string flavor for non-human species.

Possibly related PRs

Suggested reviewers

  • johanneskoester

Poem

🐰 I hopped into rules with a curious glee,
If human, a flavor—chr_patch_hapl_scaff—immediately!
Else silence in strings, a quiet little hop,
Logic trimmed tidy before I stop.
Nibble nibble 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: restricting the chr_patch_hapl_scaff flavor to homo_sapiens, matching the conditional logic introduced in the get_annotation rule.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/get-annotation-for-non-human

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 866df15 and 8429ce1.

📒 Files selected for processing (1)
  • workflow/rules/ref.smk (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • workflow/rules/ref.smk
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: formatting

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
workflow/rules/ref.smk (1)

26-26: Consider using direct config access for consistency.

The rest of the file consistently uses direct config access (e.g., lines 7, 23, 24, 25). Using lookup() here introduces inconsistency without apparent benefit.

🔎 Apply this diff for consistency:
-        flavor="chr_patch_hapl_scaff" if lookup(within=config, dpath="resources/ref/species") == "homo_sapiens" else "",  # optional, e.g. chr_patch_hapl_scaff, see Ensembl FTP.
+        flavor="chr_patch_hapl_scaff" if config["resources"]["ref"]["species"] == "homo_sapiens" else "",  # optional, e.g. chr_patch_hapl_scaff, see Ensembl FTP.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8712c72 and 8d7e151.

📒 Files selected for processing (1)
  • workflow/rules/ref.smk (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Tests
workflow/rules/ref.smk

[error] 26-26: LookupError in file "/home/runner/work/rna-seq-kallisto-sleuth/rna-seq-kallisto-sleuth/workflow/rules/ref.smk": Error in lookup function with dpath: 'resource/ref/species'. Dpath not found.

@dlaehnemann
Copy link
Member Author

From trying this in practice, it seems like the diffsplice functionality then only works for homo_sapiens, because we probably are back to a mismatch in the transcripts listed in the different Ensembl files. But I am also not sure if we want to continue supporting the diffsplice functionality. Maybe we just remove it altogether and only bring back differential splicing analysis as a separate workflow that can be loaded as a module?

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.

2 participants