Process a PCA, using nipals or FactoMineR, on a quantitative dataset.

This method plots a bar plot which represents the distribution of the number of missing values (NA) per lines (ie proteins).

  • wrapper_pca()

  • plotPCA_Eigen_hc(): plots the eigen values of PCA with the highcharts library

  • plotPCA_Eigen(): plots the eigen values of PCA

  • plotPCA_Var()

  • plotPCA_Ind()

my_PCA(
  X,
  scale.unit = TRUE,
  ncp = min(12, nrow(X) - 1, ncol(X)),
  ind.sup = NULL,
  quanti.sup = NULL,
  quali.sup = NULL,
  row.w = NULL,
  col.w = NULL,
  graph = FALSE,
  axes = c(1, 2),
  method = "FM",
  gramschmidt = TRUE
)

omXplore_pca_ui(id)

omXplore_pca_server(id, obj, i)

omXplore_pca(obj, i)

wrapper_pca(
  qdata,
  group,
  var.scaling = TRUE,
  ncp = NULL,
  method = NULL,
  gramschmidt = TRUE
)

plotPCA_Eigen(res.pca)

plotPCA_Var(res.pca, chosen.axes = c(1, 2))

plotPCA_Ind(res.pca, chosen.axes = c(1, 2))

plotPCA_Eigen_hc(res.pca)

Arguments

X

a data.frame() of quantitative data

scale.unit

See FactoMineR::PCA()

ncp

See FactoMineR::PCA()

ind.sup

See FactoMineR::PCA()

quanti.sup

See FactoMineR::PCA()

quali.sup

See FactoMineR::PCA()

row.w

See FactoMineR::PCA()

col.w

See FactoMineR::PCA()

graph

See FactoMineR::PCA()

axes

See FactoMineR::PCA()

method

a string corresponding to the package to use for PCA (if no NA, default is "FM" for FactoMineR)

gramschmidt

A boolean indicating whether to use Gram-Schmidt orthogonalization or not.

id

A character(1) which is the id of the shiny module.

obj

An instance of the class MultiAssayExperiment.

i

An integer which is the index of the assay in the param obj

qdata

A data.frame() of quantitative data

group

A vector with the name of samples

var.scaling

A boolean indicating whether to scale the data or not

res.pca

The result of the function FactoMineR::PCA()

chosen.axes

See the parameter 'axes' of the function factoextra::fviz_pca_var()

Value

res.pca a "PCA" "list" object

NA

NA

A shiny app

The result of the function FactoMineR::PCA()

A plot

A plot

A plot

A plot

Author

Samuel Wieczorek, Enora Fremy

Examples

data(vdata)
obj <- vdata[[1]]
res.pca <- my_PCA(SummarizedExperiment::assay(obj), method = "FM")
#> [1] "FM"
plotPCA_Eigen(res.pca)
plotPCA_Var(res.pca) plotPCA_Eigen_hc(res.pca) plotPCA_Ind(res.pca) if (FALSE) { # \dontrun{ data(vdata) library(shinyWidgets) library(dplyr) # Replace missing values for the example sel <- is.na(SummarizedExperiment::assay(vdata, 1)) SummarizedExperiment::assay(vdata[[1]])[sel] <- 0 omXplore_pca(vdata, 1) shiny::runApp(omXplore_pca(vdata, 1)) } # } data(vdata) obj <- vdata[[1]] res.pca <- wrapper_pca(SummarizedExperiment::assay(obj), get_group(obj)) #> NULL #> Error in if (method == "NIPALS") X.init <- X: argument is of length zero plotPCA_Eigen(res.pca)
plotPCA_Var(res.pca) plotPCA_Eigen_hc(res.pca) plotPCA_Ind(res.pca)