# NOT RUN {
data(stemcells)
# -- feature selection with keepX
res = mint.splsda(X = stemcells$gene, Y = stemcells$celltype, ncomp = 3, keepX = c(10, 5, 15),
study = stemcells$study)
plotIndiv(res)
#plot study-specific outputs for all studies
plotIndiv(res, study = "all.partial")
#plot study-specific outputs for study "2"
plotIndiv(res, study = "2")
# -- feature selection with keepX.constraint and keepX
# we force mint.spls to build the PLS-component 1 and 2 with only specific genes
keepX.constraint = list(comp1 = c("ENSG00000138756", "ENSG00000101470"),
comp2 = c("ENSG00000120049", "ENSG00000138685", "ENSG00000204248", "ENSG00000103260"))
# we select 10 and 15 variables on component 3 and 4
res = mint.splsda(X = stemcells$gene, Y = stemcells$celltype, ncomp = 4, study = stemcells$study,
keepX.constraint = keepX.constraint, keepX = c(10, 15))
#plot study-specific outputs for study "2", "3" and "4"
plotIndiv(res, study = c(2, 3, 4))
# poor results as the genes constraint on comp 1 and 2 were not relevant
# }
Run the code above in your browser using DataLab