Skip to content

Commit

Permalink
Retain input factor levels for splitGeneGroups
Browse files Browse the repository at this point in the history
  • Loading branch information
lkhilton committed Dec 18, 2024
1 parent 6a6a606 commit 66de5bb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions R/prettyOncoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -907,10 +907,14 @@ prettyOncoplot = function(
}


if(missing(splitGeneGroups)){
row_split = rep("", length(genes))
}else{
row_split = factor(splitGeneGroups[genes], levels = unique(splitGeneGroups[genes]))
if (missing(splitGeneGroups)) {
row_split <- rep("", length(genes))
} else {
if(is.factor(splitGeneGroups)){
row_split <- splitGeneGroups[genes]
} else(
row_split <- factor(splitGeneGroups[genes], levels = unique(splitGeneGroups[genes]))
)
}

if(!missing(groupNames)){
Expand Down

0 comments on commit 66de5bb

Please sign in to comment.