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

fix: bump cdot to 0.2.27, snakemake wrappers #58

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

tedil
Copy link
Contributor

@tedil tedil commented Nov 26, 2024

Release-As: 0.9.0

Summary by CodeRabbit

  • New Features

    • Updated mehari-data version to v0.9.0.
    • Added new rules for handling RefSeq data in the workflow.
  • Bug Fixes

    • Improved Ensembl sequence retrieval with an upgraded wrapper version.
  • Documentation

    • Updated README to reflect new versions of dependencies and transcript database filenames.
  • Chores

    • Cleaned up configuration files by removing commented-out lines.

Copy link

coderabbitai bot commented Nov 26, 2024

Walkthrough

The pull request includes updates to the README.md, config/config.yaml, and Snakemake workflow files. The README.md reflects a version change for the mehari-data project from v0.7.0 to v0.9.0, along with corresponding updates to dependency versions. The config/config.yaml file sees similar version updates for genomic references. New rules for managing RefSeq data are introduced in the workflow files, including updates to existing rules to accommodate these changes.

Changes

File Change Summary
README.md Version updated to v0.9.0, dependencies mehari to v0.30.1, cdot to v0.2.27, and filenames updated for transcript databases.
config/config.yaml release versions updated to 0.2.27 for various genomic references; custom fields updated for GRCh38 and GRCh37 entries.
workflow/rules/download.smk Added rules get_refseq_installed_files and get_refseq_sequence; updated get_ensembl_sequence rule to version v5.0.2.
workflow/rules/validate.smk Updated datavzrd rule wrapper version from v3.13.1 to v5.0.2; other rules remain unchanged.

Possibly related PRs

  • feat: Upgrade mehari to 0.30.0 #55: The changes in this PR involve upgrading the mehari package version in the config/config.yaml and workflow/envs/mehari.yaml files, which directly relates to the version updates in the README.md and config/config.yaml of the main PR.

Poem

In the meadow, changes bloom,
Versions rise, dispelling gloom.
With mehari now so bright,
New rules dance in the moonlight.
Data flows, a joyful spree,
Hopping forward, wild and free! 🐇✨


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.

@tedil tedil enabled auto-merge (squash) November 26, 2024 11:23
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/rules/download.smk (1)

Line range hint 39-48: Consider adding retry mechanism for FTP downloads

The curl command could benefit from retry logic for better resilience against network issues.

Consider updating the shell command:

     shell:
         """(
-        curl --silent "https://ftp.ncbi.nih.gov/refseq/{params.species}/mRNA_Prot/{params.species_name}.files.installed" > {output}
+        curl --silent --retry 3 --retry-delay 15 "https://ftp.ncbi.nih.gov/refseq/{params.species}/mRNA_Prot/{params.species_name}.files.installed" > {output}
         ) >{log} 2>&1"""
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 3558c6a and b82c64e.

📒 Files selected for processing (4)
  • README.md (1 hunks)
  • config/config.yaml (4 hunks)
  • workflow/rules/download.smk (1 hunks)
  • workflow/rules/validate.smk (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • README.md
  • workflow/rules/validate.smk
🔇 Additional comments (6)
workflow/rules/download.smk (2)

Line range hint 51-67: LGTM! Well-structured rule with proper dependency handling

The rule is well-designed with:

  • Clear input/output definitions
  • Proper conda environment specification
  • Appropriate logging configuration
  • Smart use of external script for complex download logic

13-13: Verify compatibility with major wrapper version upgrade

The change from v3.11.0 to v5.0.2 is a major version bump that might include breaking changes.

Let's verify the wrapper's compatibility:

config/config.yaml (4)

30-30: LGTM: Version bump aligns with PR objective

The cdot release version update to 0.2.27 is consistent with the PR title.


113-113: LGTM: Consistent version bump across genome builds

The cdot release version update to 0.2.27 maintains version parity with GRCh38-refseq.


216-217: LGTM: Consistent changes with GRCh38-ensembl

The changes mirror those made for GRCh38-ensembl, maintaining consistency across genome builds:

  • cdot release version updated to 0.2.27
  • File format changed from GFF3 to GTF

154-155: Verify impact of GFF3 to GTF format change

While the version bump is consistent, the change from GFF3 to GTF format might affect downstream processing. Please ensure that:

  1. The workflow tools support GTF format
  2. The format change is intentional and aligned with the snakemake wrapper updates mentioned in the PR title
✅ Verification successful

Based on the search results, I can now generate a final response. The codebase analysis shows that the workflow is designed to handle both GTF and GFF formats through the CDOT tool, which is used for transcript annotation processing. The format change appears to be intentional and aligned with the version updates.

Format change from GFF3 to GTF is compatible with the workflow

The change from GFF3 to GTF format is safe because:

  1. The workflow uses CDOT (v0.2.27) which supports both GFF3 and GTF formats as evidenced by multiple references in the config file
  2. Both formats are used across different genome builds in the configuration (e.g., RefSeq uses GFF while Ensembl uses GTF)
  3. The format change aligns with the source-specific conventions where Ensembl typically provides GTF files
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for GFF3/GTF file handling in the workflow
echo "Checking for GFF3/GTF file handling in workflow files:"
rg -i "g[tf]f[3]?" workflow/ -A 2

Length of output: 154


Script:

#!/bin/bash
# Search for GFF3/GTF file handling in the entire codebase
echo "Checking for GFF3/GTF file handling across the codebase:"
rg -i "g[tf]f[3]?" -A 2

# Search for any annotation file handling in workflow rules
echo -e "\nChecking for annotation file handling in workflow rules:"
ast-grep --pattern 'rule $_ {
  $$$
  input:
    $$$
    annotation = $_
    $$$
}'

# Check config file for any other GTF/GFF3 references
echo -e "\nChecking config file for GTF/GFF3 patterns:"
cat config/config.yaml

Length of output: 9058


Script:

#!/bin/bash
# Search for cdot configuration or usage in workflow files
echo "Checking for cdot configuration and usage:"
rg -i "cdot" workflow/ -A 3

# Search for any rules that process annotation files
echo -e "\nChecking for rules processing annotation files:"
fd -e smk -e snakefile . -x cat {} \; | rg -A 5 "rule.*annotation"

# Check if there are any documentation files about annotation formats
echo -e "\nChecking for documentation about annotation formats:"
fd -e md . -x rg -i "g[tf]f|annotation" {} \;

Length of output: 27303

@tedil tedil merged commit db18015 into main Nov 26, 2024
8 checks passed
@tedil tedil deleted the update-cdot-and-snakemake-wrappers branch November 26, 2024 11:43
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.

1 participant