Open charles-plessy opened 1 year ago
However …
consensusClustersGRL <- function(object) {
grl <- lapply(sampleLabels(object), consensusClustersGR, object = object) |> GRangesList()
names(grl) <- unname(sampleLabels(object))
# Also pass the original colData?
grl@metadata$colData <- colData(object)
grl
}
clustersGRL <- consensusClustersGRL(ce_SL)
## Error in validObject(ans) :
## invalid class "ConsensusClusters" object: Consensus clusters must not overlap with each ## other.
I think that this is because GRangesList
objects may be GRanges
behind the scenes.
I am wondering about adding a new accessor that returns a
GRangesList
ofCTSS
objects with the score of their sample. In these objects the non-expressed CTSSes are not represented, therefore the data can not be represented as aDataFrame
or aSummarizedExperiment
since each sample is a vector of a different length.This function would be useful when looping over CTSSes. I am not sure if it is worth to make it public or better to keep it private.
A similar function may be useful for consensus clusters.
The
tagClustersGR
function's name is actually misleading, as it also returns a GRL. But let's not change that.