Skip to content

Commit

Permalink
Merge pull request #766 from Ashastry2/master
Browse files Browse the repository at this point in the history
Fixes issue with do.call and if/else error
  • Loading branch information
joshua-d-campbell authored Oct 15, 2024
2 parents 40527af + 5e61251 commit d392716
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Imports:
utils,
stats,
zellkonverter
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Suggests:
testthat,
Rsubread,
Expand Down
9 changes: 5 additions & 4 deletions R/plotSCEHeatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ plotSCEHeatmap <- function(inSCE, useAssay = 'logcounts', useReducedDim = NULL,
store.number = NULL, statistics = "mean")
# TODO: `aggregateAcrossCells` produce duplicated variables in colData
# and unwanted "ncell" variable even if I set `store.number = NULL`.
colData(SCE) <- colData(SCE)[,c(aggregateCol),drop=FALSE] ##change
newColnames <- do.call(paste, c(colData(SCE), list(sep = "_")))
colnames(SCE) <- newColnames
#colData(SCE) <- colData(SCE)[,c(aggregateCol),drop=FALSE] ##change
temp_df<-as.data.frame(colData(SCE)[,c(aggregateCol),drop=FALSE]) %>% unite("new_colnames",1:ncol(.),sep = "_") %>% remove_rownames() %>% column_to_rownames("new_colnames")
colData(SCE)<-DataFrame(temp_df)
rowData(SCE) <- origRowData
}
if (!is.null(aggregateRow)) {
Expand Down Expand Up @@ -292,7 +292,8 @@ plotSCEHeatmap <- function(inSCE, useAssay = 'logcounts', useReducedDim = NULL,
}

# Prepare
if(useAssay == "reducedDim"){

if(!is.null(useReducedDim)){
mat <- assay(SCE)
mat <- .orderMatrix(mat)

Expand Down

0 comments on commit d392716

Please sign in to comment.