Comparaison du MIC de matrices de spectres Données human Serum prétraitées par SOAP par deux méthodes:

  1. Full : Avec l’ensemble des étapes
  2. Basic : avec uniquement les étapes de base de soap : Correction de phase 1, transformée de Fourier, Allignement au TMPS, Correction de phase 0, Bucketting, Normalisation

1 Lecture des matrices des spectres et initiatilisation des variables utiles

# 3. on dessine les spectres
for(i in 1:nmatrices)
{
print(spectral_matrices_names[i])  
Draw(spectral_matrices_list[[i]],type.draw="signal",subtype="stacked",num.stacked=4)
}
## [1] "HumSerum_SOAP_Full"

## [1] "HumSerum_SOAP_Basic"

2 Etude de la répétabilité spectrale

2.1 Between and Within group inertia

# Impression des résultats des calculs d'inertie
cat("Inerties non standardisées")
## Inerties non standardisées
pander(list(Inerties_non_standardisees=Inertiavalues,Inerties_en_PC=Inertiapc,Inerties_within_groups=InertiaPerGroup))
  • Inerties_non_standardisees:

      BI WI TI
    HumSerum_SOAP_Full 9568 1304 10872
    HumSerum_SOAP_Basic 1972 7628 9600
  • Inerties_en_PC:

      BI WI TI
    HumSerum_SOAP_Full 88.01 11.99 100
    HumSerum_SOAP_Basic 20.54 79.46 100
  • Inerties_within_groups:

      HumSerum_SOAP_Full HumSerum_SOAP_Basic
    1 51730 20587
    2 43139 16888
    3 45900 17251
    4 45959 20201
    Total 186728 74927

2.2 PCA

2.2.1 Eigenvalues

pander(Eigenvalues)
  PC 1 PC 2 PC 3 PC 4
HumSerum_SOAP_Full 0.7173 0.8984 0.9501 0.9653
HumSerum_SOAP_Basic 0.366 0.6808 0.8124 0.9064

2.2.2 PCA Score Plots

draw.scores12 = vector("list")
draw.scores34 = vector("list")
for(i in 1:nmatrices)
{
draw.scores12[[spectral_matrices_names[i]]]=MBXUCL::DrawSL(PCA.res[[i]], drawNames=TRUE, type.obj = "PCA",createWindow=FALSE, main = paste0("PCA score plot for ",spectral_matrices_names[i]),class = groupes, axes =c(1,2), type.graph ="scores")
draw.scores34[[spectral_matrices_names[i]]]=MBXUCL::DrawSL(PCA.res[[i]], drawNames=TRUE, type.obj = "PCA",createWindow=FALSE, main = paste0("PCA score plot for ",spectral_matrices_names[i]),class = groupes, axes =c(3,4), type.graph ="scores")
}
draw.scores12
## $HumSerum_SOAP_Full

## 
## $HumSerum_SOAP_Basic

draw.scores34
## $HumSerum_SOAP_Full

## 
## $HumSerum_SOAP_Basic

2.2.3 PCA Loading Plots

draw.loadings12 = vector("list")
draw.loadings34 = vector("list")
for(i in 1:nmatrices)
{
draw.loadings12[[spectral_matrices_names[i]]] = MBXUCL::DrawSL(PCA.res[[i]], type.graph ="loadings" ,drawNames=TRUE, type.obj = "PCA",createWindow=FALSE, main = paste0("PCA loadings plot for", spectral_matrices_names[i]),axes = c(1:2), loadingstype="l", num.stacked = 2)[[1]]
draw.loadings34[[spectral_matrices_names[i]]] = MBXUCL::DrawSL(PCA.res[[i]], type.graph ="loadings" ,drawNames=TRUE, type.obj = "PCA",createWindow=FALSE, main = paste0("PCA loadings plot for", spectral_matrices_names[i]),axes = c(3:4), loadingstype="l", num.stacked = 2)[[1]]
}

draw.loadings12
## list()
draw.loadings34
## list()

2.3 Unsupervised clustering (MIC)

nClust = length(unique(groupes)) # nombre de clusters à rechercher
clustres=matrix(0,nrow=nmatrices,ncol=8)
dimnames(clustres)=list(spectral_matrices_names,c("DunnW","DunnKM","DBW","DBKM","RandW","RandKM","AdjRandW","AdjRandKM"))
for(i in 1:nmatrices)
{
print(spectral_matrices_names[i]) 
ClustMIC.res = MBXUCL::ClustMIC(Intensities = spectral_matrices_list[[i]], nClust = nClust, Trcl = groupes, Dendr = TRUE)
clustres[i,]=as.numeric(ClustMIC.res[1,1:8])
}
## [1] "HumSerum_SOAP_Full"

## [1] "HumSerum_SOAP_Basic"

pander(clustres)
Table continues below
  DunnW DunnKM DBW DBKM RandW RandKM
HumSerum_SOAP_Full 0.6406 0.6406 0.7385 0.7385 1 1
HumSerum_SOAP_Basic 0.3055 0.3908 2.051 0.9944 0.6714 0.7077
  AdjRandW AdjRandKM
HumSerum_SOAP_Full 1 1
HumSerum_SOAP_Basic 0.09719 0.1969

2.4 PLS-DA

nLVPLSDA = 4  # nombre du composantes du PLSDA
PLSDA.res=list()
perf.plsda.RMSEP=matrix(nrow=nmatrices,ncol=nLVPLSDA)
dimnames(perf.plsda.RMSEP)=list(spectral_matrices_names,paste0("Y",1:nLVPLSDA))
perf.plsda.R2=perf.plsda.RMSEP
perf.plsda.Q2=perf.plsda.RMSEP
for(i in 1:nmatrices)
{
cat("PLS-DA pour ",spectral_matrices_names[i])  
PLSDA.res [[i]]= PLSDA(x = spectral_matrices_list[[i]], y = groupes, nLV = nLVPLSDA, drawRMSEP = TRUE)
perf.plsda.RMSEP[i,] = PLSDA.res[[i]]$RMSEP
perf.plsda.R2[i,]=PLSDA.res[[i]]$R2
perf.plsda.Q2[i,]=PLSDA.res[[i]]$Q2
}
## PLS-DA pour  HumSerum_SOAP_Full

## PLS-DA pour  HumSerum_SOAP_Basic

pander(list(RMSEP=perf.plsda.RMSEP,R2=perf.plsda.R2,Q2=perf.plsda.Q2))
  • RMSEP:

      Y1 Y2 Y3 Y4
    HumSerum_SOAP_Full 0.1074 0.08309 0.1163 0.09467
    HumSerum_SOAP_Basic 0.3738 0.2371 0.3304 0.2987
  • R2:

      Y1 Y2 Y3 Y4
    HumSerum_SOAP_Full 0.9716 0.978 0.9664 0.9694
    HumSerum_SOAP_Basic 0.4906 0.8036 0.579 0.6976
  • Q2:

      Y1 Y2 Y3 Y4
    HumSerum_SOAP_Full 0.9385 0.9632 0.9279 0.9522
    HumSerum_SOAP_Basic 0.2549 0.7002 0.4179 0.5243

2.4.1 Score plots de la PLS_DA

draw.scores= vector("list")
for(i in 1:nmatrices)
{ 
draw.scores[[spectral_matrices_names[i]]]=DrawSL(PLSDA.res[[i]], drawNames=TRUE, type.obj = "PLSDA",
        createWindow=FALSE, main = paste0("PLSDA score plot for ", spectral_matrices_names[i]),
        class = groupes, axes =c(1,2), type.graph ="scores")
}
draw.scores
## $HumSerum_SOAP_Full

## 
## $HumSerum_SOAP_Basic

2.4.2 Loading plots de la PLS_DA

draw.loadings= vector("list")
for(i in 1:nmatrices)
{ 
draw.scores[[spectral_matrices_names[i]]]=DrawSL(PLSDA.res[[i]], drawNames=TRUE, type.obj = "PLSDA",
        createWindow=FALSE, main = paste0("PLSDA loadings plot for", spectral_matrices_names[i]),
        axes = c(1:2), type.graph ="loadings", loadingstype="l", num.stacked = 2)
}

draw.loadings
## list()