-
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
Changes from 7 commits
c094feb
7c7be7d
8df0b1d
502b76c
4c037bd
53d5c13
742bfb3
5a8dc77
c211a01
f086dce
87e31a6
140490c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,6 +52,7 @@ Suggests: | |
| impute, | ||
| knitr, | ||
| magrittr, | ||
| miRNAmeConverter, | ||
| org.Hs.eg.db, | ||
| RColorBrewer, | ||
| readr, | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||
| #' @importFrom GenomicFeatures genes | ||||||
| #' @importFrom GenomeInfoDb keepStandardChromosomes seqlevelsStyle | ||||||
| #' seqlevelsStyle<- | ||||||
| #' @importFrom BiocBaseUtils isScalarCharacter | ||||||
| #' @importFrom BiocBaseUtils isScalarCharacter isCharacter | ||||||
| NULL | ||||||
|
|
||||||
| .checkHas <- | ||||||
|
|
@@ -32,7 +32,12 @@ NULL | |||||
| for (i in which(which)) { | ||||||
| lookup <- FUN(rownames(x[[i]])) | ||||||
| ranges <- lookup[["mapped"]] | ||||||
| rse <- x[[i]][names(ranges), ] | ||||||
| if (!is.null(mcols(ranges)[["rowIdx"]])) | ||||||
| rse <- `rownames<-`( | ||||||
| x[[i]][mcols(ranges)[["rowIdx"]], ], names(ranges) | ||||||
| ) | ||||||
| else | ||||||
| rse <- x[[i]][names(ranges), ] | ||||||
| # rowData not merged with mcols of RHS in `rowRanges<-` method | ||||||
| mcols(ranges) <- | ||||||
| S4Vectors::DataFrame(rowData(rse), S4Vectors::mcols(ranges)) | ||||||
|
|
@@ -60,9 +65,18 @@ NULL | |||||
| #' `GRanges()` object with ranges of mapped symbols | ||||||
| #' @keywords internal | ||||||
| .makeListRanges <- function(x, gn) { | ||||||
| res <- list(unmapped = x[!x %in% names(gn)]) | ||||||
| x <- x[x %in% names(gn)] | ||||||
| gn <- gn[match(x, names(gn))] | ||||||
| checkInstalled("miRNAmeConverter") | ||||||
| nc <- miRNAmeConverter::MiRNANameConverter() | ||||||
| mirna_version <- | ||||||
| miRNAmeConverter::assessVersion(nc, names(gn))[1L, "version"] | ||||||
| trout <- miRNAmeConverter::translateMiRNAName( | ||||||
| nc, x, versions = mirna_version | ||||||
| ) | ||||||
| new_x <- trout[[paste0("v", mirna_version, ".0")]] | ||||||
| res <- list(unmapped = setdiff(x, trout[["input"]])) | ||||||
| rowIdx <- match(tolower(trout[["input"]]), x) | ||||||
|
||||||
| rowIdx <- match(tolower(trout[["input"]]), x) | |
| rowIdx <- match(tolower(trout[["input"]]), tolower(x)) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.