-
Notifications
You must be signed in to change notification settings - Fork 7
Restore mirToRanges functionality #36
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
Conversation
|
The |
|
@lwaldron |
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.
Pull Request Overview
This pull request restores the mirToRanges functionality that was previously marked as defunct. The implementation introduces miRNA name version conversion using the miRNAmeConverter package to handle different miRNA naming versions before mapping them to genomic ranges.
Key changes:
- Restored
mirToRangesfunction from defunct status with new implementation - Added miRNA name conversion logic using
miRNAmeConverterpackage to handle version translations - Modified row indexing mechanism to support name remapping when miRNA identifiers are converted between versions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| R/simplifyTCGA.R | Restored mirToRanges function implementation; added miRNA name conversion logic to .makeListRanges; updated .getRangesOfMir to accept character vector instead of scalar; added conditional rowIdx-based subsetting in .convertTo |
| DESCRIPTION | Added miRNAmeConverter to Suggests dependencies |
| NAMESPACE | Added isCharacter import from BiocBaseUtils |
| man/simplifyTCGA.Rd | Updated author attribution to include M. Ramos |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
R/simplifyTCGA.R
Outdated
| ) | ||
| new_x <- trout[[paste0("v", mirna_version, ".0")]] | ||
| res <- list(unmapped = setdiff(x, trout[["input"]])) | ||
| rowIdx <- match(tolower(trout[["input"]]), x) |
Copilot
AI
Nov 10, 2025
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.
Using tolower(trout[["input"]]) for matching assumes that the original input x contains lowercase miRNA identifiers. However, miRNA identifiers are typically mixed-case (e.g., "hsa-miR-21"). This mismatch will likely cause incorrect row index mapping.
Consider using case-insensitive matching or ensuring consistent case handling: rowIdx <- match(trout[["input"]], x) or rowIdx <- match(tolower(trout[["input"]]), tolower(x)).
| rowIdx <- match(tolower(trout[["input"]]), x) | |
| rowIdx <- match(tolower(trout[["input"]]), tolower(x)) |
Hi Levi, @lwaldron
Could you take a look and provide feedback, if possible?
Thank you!