diff --git a/R/ExportMethods.R b/R/ExportMethods.R index 95d2552..76051db 100644 --- a/R/ExportMethods.R +++ b/R/ExportMethods.R @@ -179,6 +179,24 @@ setMethod("plotReverseCumulatives", "GRangesList", .plotReverseCumulatives(L, values, fitInRange, group) }) +#' @rdname plotReverseCumulatives + +setMethod("plotReverseCumulatives", "GRanges", + function( object, values = c("raw", "normalized") + , fitInRange = c(10, 1000) + , group = NULL) { + if(is.null(group)) { + sampleLabels <- "No sample name available" + } else { + sampleLabels <- group + } + L <- List(score(object)) + names(L) <- sampleLabels + metadata(L)$colData <- metadata(object)$colData + if (is.null(metadata(L)$colData)) metadata(L)$colData <- DataFrame(sampleLabels=sampleLabels) + .plotReverseCumulatives(L, values, fitInRange, group = NULL) +}) + #' @name plotInterquantileWidth #' #' @title Plot cluster widths diff --git a/man/plotReverseCumulatives.Rd b/man/plotReverseCumulatives.Rd index c0d0952..e6692b4 100644 --- a/man/plotReverseCumulatives.Rd +++ b/man/plotReverseCumulatives.Rd @@ -4,6 +4,7 @@ \alias{plotReverseCumulatives} \alias{plotReverseCumulatives,CAGEexp-method} \alias{plotReverseCumulatives,GRangesList-method} +\alias{plotReverseCumulatives,GRanges-method} \title{Plot reverse cumulative number of CAGE tags per CTSS} \usage{ plotReverseCumulatives( @@ -26,6 +27,13 @@ plotReverseCumulatives( fitInRange = c(10, 1000), group = NULL ) + +\S4method{plotReverseCumulatives}{GRanges}( + object, + values = c("raw", "normalized"), + fitInRange = c(10, 1000), + group = NULL +) } \arguments{ \item{object}{A \code{CAGEexp} object} diff --git a/man/tagClusters.Rd b/man/tagClusters.Rd index 227be52..e192d03 100644 --- a/man/tagClusters.Rd +++ b/man/tagClusters.Rd @@ -65,6 +65,7 @@ for a specified CAGE experiment from a \code{\link{CAGEexp}} object. tagClustersGR( exampleCAGEexp, "Zf.high", TRUE, 0.1, 0.9 ) tagClustersGR( exampleCAGEexp, 1 , returnInterquantileWidth = TRUE, qLow = 0.1, qUp = 0.9 ) +tagClustersGR( exampleCAGEexp )$clusteringMethod tagClustersGR( exampleCAGEexp )@metadata$colData }