Skip to content

Commit

Permalink
fix meth block lifter
Browse files Browse the repository at this point in the history
  • Loading branch information
ttriche committed Sep 3, 2024
1 parent 2393a20 commit 97fea51
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: FileSetExperiment
Title: A rectangular FileSet-backed object with rowData and colData
Version: 0.99.2
Version: 0.99.3
Date: 2024-09-02
Authors@R:
person("Tim", "Triche", ,
Expand Down
11 changes: 2 additions & 9 deletions R/switchMethBlocksGenome.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
#' @param x a GenomicRatioSet or something like it with methBlock coords
#' @param to the new genome to use (hg19 or hg38)
#'
#' @return an object very much like x, but mapped onto `g`
#'
#' @details
#' `stable` is a weird flag and you probably should not use it. If and only if
#' a probe maps to the same region in hg19 and hg38, it is deemed stable. That
#' region can be one base pair wide, or it can be a thousand base pairs wide.
#' The point is that this set of mappings is very small (about 4000 probes).
#' @return an object very much like x, but mapped onto `to`
#'
#' @seealso asMethBlocks
#'
#' @import BiocParallel
#' @import GenomicRanges
#'
#' @export
Expand All @@ -37,8 +30,8 @@ switchMethBlocksGenome <- function(x, to=c("hg38", "hg19")) {
message("Found ", mapped, " / ", mappable,
" blocks mapping from ", from, " to ", to, ".")
x <- x[rownames(mb), ]
rowRanges(x) <- as(mb[[to]], "GRanges")
rownames(x) <- mb[[to]]
rowRanges(x) <- as(mb[x, to], "GRanges")
genome(x) <- to
return(x)
}
Expand Down
Binary file added data/cytobands.hg19.rda
Binary file not shown.
Binary file added data/cytobands.hg38.rda
Binary file not shown.
Binary file added data/mbHg19Hg38.rda
Binary file not shown.
Binary file added data/methBlocks.rda
Binary file not shown.
Binary file added data/mfts.rda
Binary file not shown.
8 changes: 1 addition & 7 deletions man/switchMethBlocksGenome.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97fea51

Please sign in to comment.