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

feat: Update of datavzrd Version for boolean spell and use of clin_sig spell #342

Merged
merged 4 commits into from
Nov 29, 2024

Conversation

BenOrl
Copy link
Contributor

@BenOrl BenOrl commented Nov 27, 2024

An updated version of datavzrd is used for the boolean spell, which now visualizes via badges. The clinical significance function is replaced by the clin_sig spell.

Summary by CodeRabbit

  • New Features

    • Enhanced rendering and handling of variant data, including new columns and updated descriptions for coding and non-coding variants.
    • Improved user interface elements for data visualization of variant impact assessments and clinical significance.
  • Bug Fixes

    • Updated configurations for clinical significance handling to ensure accuracy in variant assessments.
  • Documentation

    • Adjusted dataset definitions to reflect new paths and headers for better clarity and usability.
  • Chores

    • Removed obsolete clinical_significance.js file and associated functions to streamline the codebase.

Copy link

coderabbitai bot commented Nov 27, 2024

Walkthrough

The changes introduced in the pull request primarily affect the variant-calls-template.datavzrd.yaml file. Modifications include the addition of new JavaScript functions for processing variant data, updates to existing functions, and enhancements to the rendering of variant tables. The configuration for clinical significance has been updated to a new version, and the dataset definitions have been adjusted to reflect new paths and headers. Overall, the changes improve the handling and visualization of variant data while maintaining the file's structural integrity.

Changes

File Path Change Summary
workflow/resources/datavzrd/variant-calls-template.datavzrd.yaml - Added new JavaScript functions: spliceai_content, make_popover.
- Updated existing functions: hgvs_content, protein_id, empty_content.
- Updated spell configuration for clinical significance and boolean logic to v1.2.1.
- Adjusted dataset definitions for coding and non-coding variants.
- Enhanced rendering tables with additional columns and updated descriptions.
workflow/resources/datavzrd/clinical_significance.js - Removed function clin_sig(value) for mapping clinical significance values to color codes.
workflow/rules/datavzrd.smk - Removed input parameter clin_sig from the datavzrd_variants_calls rule.

Possibly related PRs

  • refactor: Change of the canonical function #337: The changes in this PR directly modify the variant-calls-template.datavzrd.yaml file, specifically updating the plotting configurations for the canonical and mane_plus_clinical columns, which aligns with the main PR's focus on enhancing the handling of variant data in the same YAML file.

Suggested reviewers

  • johanneskoester

Poem

In the land of data, we hop and play,
With variants dancing in a colorful array.
New functions sprout like carrots in spring,
Enhancing our tables, oh what joy they bring!
With each little tweak, our insights take flight,
A rabbit's delight in the data's bright light! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6340902 and 036d0a3.

📒 Files selected for processing (2)
  • workflow/resources/datavzrd/clinical_significance.js (0 hunks)
  • workflow/rules/datavzrd.smk (0 hunks)
💤 Files with no reviewable changes (2)
  • workflow/resources/datavzrd/clinical_significance.js
  • workflow/rules/datavzrd.smk

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.

Copy link

@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: 0

🧹 Outside diff range and nitpick comments (1)
workflow/resources/datavzrd/variant-calls-template.datavzrd.yaml (1)

480-483: Consider DRY optimization for repeated boolean configurations

The boolean spell configurations are identical across coding and noncoding sections. Consider extracting these common configurations into a reusable YAML anchor to reduce duplication.

Example optimization:

# At the top of the file
__definitions__:
  boolean_spell: &boolean_spell
    url: v1.2.1/logic/boolean
    with:
      true_value: "True"
      false_value: "False"

# In the configuration
canonical:
  spell: *boolean_spell

mane_plus_clinical:
  spell: *boolean_spell

Also applies to: 488-491

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 762781e and 6f1c212.

📒 Files selected for processing (1)
  • workflow/resources/datavzrd/variant-calls-template.datavzrd.yaml (3 hunks)
🔇 Additional comments (3)
workflow/resources/datavzrd/variant-calls-template.datavzrd.yaml (3)

309-312: LGTM: Boolean spell configuration is now more explicit

The update properly defines true/false values for the boolean spell, improving clarity and consistency.


317-320: LGTM: Consistent boolean configuration

The boolean spell configuration matches the canonical flag, maintaining consistency across the configuration.


205-206: Verify the new clinical significance spell functionality

The update to use the specialized clin_sig spell (v1.2.1) aligns with the PR objectives. This change should provide better visualization of clinical significance data.

Let's verify the spell's existence and compatibility:

✅ Verification successful

The clinical significance spell update is appropriate and consistent with the codebase

The verification shows that:

  1. The clinical significance functionality is properly implemented in clinical_significance.js with color mappings for different significance levels
  2. The spell update to v1.2.1/med/clin_sig is consistent with other v1.2.1 spells used in the same file (e.g., for boolean values)
  3. The clinical significance column is properly integrated in the datavzrd configuration and is marked as optional
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and compatibility of the new clin_sig spell

# Check if the new spell version exists in the repository
rg -l "v1.2.1/med/clin_sig" .

# Look for any existing usage patterns of clinical significance
rg "'clinical significance':" -A 5 -B 5

Length of output: 77


Script:

#!/bin/bash
# Let's try different search patterns to understand the clinical significance configuration

# Search for clin_sig in any context
rg "clin_sig" -A 3 -B 3

# Search for clinical significance without quotes
rg "clinical.?significance" -A 3 -B 3

# Look for spell configurations in the datavzrd yaml
fd ".*\.datavzrd\.yaml$" --exec grep -A 5 -B 5 "spell:"

# Check if there are any other version references
rg "v1\.2\.1" -A 3 -B 3

Length of output: 2134


Script:

#!/bin/bash
# Let's examine the clinical_significance.js file and check the datavzrd yaml file content

# Check the content of clinical_significance.js
cat workflow/resources/datavzrd/clinical_significance.js

# Examine the full variant-calls-template.datavzrd.yaml
cat workflow/resources/datavzrd/variant-calls-template.datavzrd.yaml

# Look for any documentation about spells
fd "README|CHANGELOG" --exec grep -A 5 -B 5 -i "spell"

Length of output: 17871

Copy link
Contributor

@FelixMoelder FelixMoelder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Still, tidying up the code base would be nice. The js-file which got replaced by the clin-sig spell is not required anymore and therefore can be deleted. Also, the input of the datavzrd rule pointing to that js-file needs to be modified.

Copy link

@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: 0

🧹 Outside diff range and nitpick comments (1)
workflow/resources/datavzrd/variant-calls-template.datavzrd.yaml (1)

309-312: LGTM: Boolean spell configurations consistently updated

The boolean spell configurations have been consistently updated across all instances with:

  • Version upgrade to v1.2.1
  • Explicit false_value setting

Consider extracting the common boolean spell configuration into a YAML anchor to reduce duplication. Example:

# At the top of the file
__definitions__:
  boolean_spell: &boolean_spell
    url: v1.2.1/logic/boolean
    with:
      true_value: "True"
      false_value: "False"

# Then in the configurations
canonical:
  spell: *boolean_spell

Also applies to: 317-320, 480-483, 488-491

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6f1c212 and 6340902.

📒 Files selected for processing (1)
  • workflow/resources/datavzrd/variant-calls-template.datavzrd.yaml (3 hunks)
🔇 Additional comments (2)
workflow/resources/datavzrd/variant-calls-template.datavzrd.yaml (2)

205-206: LGTM: Clinical significance spell version updated as suggested

The update to v1.2.1 for the clinical significance spell has been implemented as previously suggested.


Line range hint 341-371: LGTM: Well-defined visualization configurations

The visualization configurations for SpliceAI and AlphaMissense scores are well-structured with:

  • Clear domain boundaries for score ranges
  • Appropriate color schemes for representing different ranges
  • Consistent configuration between coding and noncoding sections

Also applies to: 531-561

Copy link
Contributor

@FelixMoelder FelixMoelder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine now! Thanks :)

@FelixMoelder FelixMoelder enabled auto-merge (squash) November 29, 2024 10:24
@FelixMoelder FelixMoelder merged commit 185b2fe into master Nov 29, 2024
9 checks passed
@FelixMoelder FelixMoelder deleted the update_dna-seq-varlociraptor branch November 29, 2024 10:54
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