Skip to content

Commit 5e61251

Browse files
committed
Fixes the do.call paste error
1 parent 564536f commit 5e61251

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/plotSCEHeatmap.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ plotSCEHeatmap <- function(inSCE, useAssay = 'logcounts', useReducedDim = NULL,
262262
store.number = NULL, statistics = "mean")
263263
# TODO: `aggregateAcrossCells` produce duplicated variables in colData
264264
# and unwanted "ncell" variable even if I set `store.number = NULL`.
265-
colData(SCE) <- colData(SCE)[,c(aggregateCol),drop=FALSE] ##change
266-
newColnames <- do.call(paste, list(colData(SCE)[,c(aggregateCol),drop=FALSE], list(sep = "_")))
267-
colnames(SCE) <- newColnames
265+
#colData(SCE) <- colData(SCE)[,c(aggregateCol),drop=FALSE] ##change
266+
temp_df<-as.data.frame(colData(SCE)[,c(aggregateCol),drop=FALSE]) %>% unite("new_colnames",1:ncol(.),sep = "_") %>% remove_rownames() %>% column_to_rownames("new_colnames")
267+
colData(SCE)<-DataFrame(temp_df)
268268
rowData(SCE) <- origRowData
269269
}
270270
if (!is.null(aggregateRow)) {

0 commit comments

Comments
 (0)