Skip to content

Commit

Permalink
Update getData.R
Browse files Browse the repository at this point in the history
ensure data matrix has appropriate column names when $phenoData is present.
  • Loading branch information
cbroeckl committed Dec 15, 2023
1 parent 763a0e4 commit ae04824
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/getData.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ getData<-function(ramclustObj=NULL,
cmpdlabel="cmpd",
filter = FALSE
) {

if(is.null(ramclustObj$phenoData)) {
dat <- ramclustObj[[which.data]]
if(filter) {
Expand Down Expand Up @@ -63,6 +64,8 @@ getData<-function(ramclustObj=NULL,
"data" = ramclustObj[[which.data]][,cmpd.use],
"full.data" = data.frame(ramclustObj$phenoData, ramclustObj[[which.data]][,cmpd.use])
)
dimnames(dat$data)[[2]] <- ramclustObj[[cmpdlabel]]
dimnames(dat$full.data)[[2]][(ncol(dat$design)+1):ncol(dat$full.data)] <- ramclustObj[[cmpdlabel]]
}
return(dat)
}
Expand Down

0 comments on commit ae04824

Please sign in to comment.