Conversation
|
The |
|
@lwaldron |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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!