mixOmicsTeam / mixOmics

Development repository for the Bioconductor package 'mixOmics '
http://mixomics.org/
153 stars 51 forks source link

Fix for Issue #237 #238

Closed Max-Bladen closed 1 year ago

Max-Bladen commented 1 year ago

Addresses issue raised in this forum post.

Adjusted get.name.and.value() to ensure names of selected values are retained. Also added check in plotVar() to remove the single Y feature from cord.X as this is unnecessary to plot. This is due to the single Y feature always having correlation of -1 or 1 with all components

knokknok commented 1 year ago

The

      if (any(sapply(cord.X, nrow) == 1)) {
          cord.X <- cord.X[-which(sapply(cord.X, nrow) == 1)]
        }

code now makes the following fail:

data(breast.TCGA)
X <- breast.TCGA$data.train$mirna
Y <- matrix(breast.TCGA$data.train$protein[,1], ncol=1)
rownames(Y) <- rownames(X)
pls.result <- pls(X, Y)
plotVar(pls.result, cex=c(3,4))

Erreur : cex must be either a vector of length 2 or a list of 2 vector components of length 184 and 1 respectively.