You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only way that circosPlot() can be used on a block.spls object is if the Y dataframe is supplied separately. Essentially makes the indY parameter redundant in this context.
### --- SET UP DATA --- ###
suppressMessages(library(mixOmics)) # load package and data
data(breast.TCGA)
## class membershipbreast.group=breast.TCGA$data.train$subtype## data1 has all dataframesbreast.data1<-list(mirna=breast.TCGA$data.train$mirna,
mrna=breast.TCGA$data.train$mrna,
protein=breast.TCGA$data.train$protein)
## data2 has all but protein databreast.data2<-list(mirna=breast.TCGA$data.train$mirna,
mrna=breast.TCGA$data.train$mrna)
### --- RUN BLOCK.SPLS --- ##### form block.spls with combined dataframesbreast.block.spls.comb<- block.spls(breast.data1, indY=3,
keepX=list(mirna= c(10,10),
mrna= c(10,10)))
## form block.spls with separated dataframesbreast.block.spls.sep<- block.spls(breast.data2, breast.TCGA$data.train$protein,
keepX=list(mirna= c(10,10),
mrna= c(10,10)))
### --- PASS TO CIRCOS.PLOT --- ##### works, can find object$X$Y
circosPlot(breast.block.spls.sep, group=breast.group,
cutoff=0.8)
## ERROR RAISED !
circosPlot(breast.block.spls.comb, group=breast.group,
cutoff=0.8)
#> Error in if (length(group) != nrow(object$X$Y)) stop("group must be a factor of length: nrow(object$X$Y) = ", : argument is of length zero
Seeing as within block.spls(), both setting Y explicitly or using the indY parameter are both valid, having the circosPlot() only function in one of these scenarios is suboptimal.
💡 Possible solution:
Seeing as error raised claims that nrow(object$X$Y) is of length 0, this means that the $X$Y component is likely not set when indY is used.
The text was updated successfully, but these errors were encountered:
🐞 Describe the bug:
The only way that
circosPlot()
can be used on ablock.spls
object is if the Y dataframe is supplied separately. Essentially makes theindY
parameter redundant in this context.🔍 reprex results from reproducible example including sessioninfo():
Created on 2022-03-08 by the reprex package (v2.0.1)
Session info
🤔 Expected behavior:
Seeing as within
block.spls()
, both settingY
explicitly or using theindY
parameter are both valid, having thecircosPlot()
only function in one of these scenarios is suboptimal.💡 Possible solution:
Seeing as error raised claims that
nrow(object$X$Y)
is of length 0, this means that the$X$Y
component is likely not set whenindY
is used.The text was updated successfully, but these errors were encountered: