diff --git a/NAMESPACE b/NAMESPACE index 504a7c7d..6db47d72 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -31,6 +31,7 @@ export(getMethylationStats) export(getSampleID) export(getTargetAnnotationStats) export(getTreatment) +export(joinSegmentNeighbours) export(makeMethylDB) export(methRead) export(methSeg) @@ -93,6 +94,7 @@ importFrom(S4Vectors,DataFrame) importFrom(S4Vectors,Rle) importFrom(S4Vectors,elementMetadata) importFrom(S4Vectors,levels) +importFrom(data.table,":=") importFrom(data.table,"key<-") importFrom(data.table,CJ) importFrom(data.table,SJ) @@ -107,6 +109,7 @@ importFrom(data.table,setcolorder) importFrom(data.table,setkey) importFrom(data.table,setkeyv) importFrom(data.table,setnames) +importFrom(data.table,setorder) importFrom(data.table,tables) importFrom(fastseg,fastseg) importFrom(grDevices,colorRamp) diff --git a/R/methSeg.R b/R/methSeg.R index c9eae628..7a8df39f 100644 --- a/R/methSeg.R +++ b/R/methSeg.R @@ -371,7 +371,7 @@ joinSegmentNeighbours <- function(res) { ## now we just merge ranges, that had a non-zero value in l for (i in which(l!=0)) { - res_dt[k[i]:(k[i]+l[i]),`:=`(seqnames=unique(seqnames), + res_dt[k[i]:(k[i]+l[i]),":="(seqnames=unique(seqnames), start=min(start), end=max(end), strand = "*", diff --git a/R/methylKit.R b/R/methylKit.R index d684cd8b..d6a9fefa 100644 --- a/R/methylKit.R +++ b/R/methylKit.R @@ -11,7 +11,8 @@ #' #' @importFrom Rsamtools TabixFile scanTabix yieldSize "yieldSize<-" #' -#' @importFrom data.table data.table fread setnames setcolorder as.data.table tables setkey setkeyv key "key<-" haskey CJ SJ copy rbindlist +#' @importFrom data.table data.table fread setnames setcolorder as.data.table tables +#' setkey setkeyv key "key<-" haskey CJ SJ copy rbindlist setorder #' #' @importFrom mclust densityMclust Mclust #'