metabolomics: an interpreting tool to understand kidney graft recipients grouping and their recovery...
DESCRIPTION
Presentazione tenuta il 30 Novembre 2012 al Parco Tecnologico Padano di Lodi in occasione del primo Italian BioR DayTRANSCRIPT
Metabolomics: an interpreting tool to understand kidney graft recipients
grouping and their recovery trajectory
Italian BioR DayLodi 30 Novembre 2012
Marco Calderisi, [email protected]
Italian BioR DayLodi 30 Novembre 2012
Kidney
Italian BioR DayLodi 30 Novembre 2012
Kidney removes wastes and fluid from the body
1/36
Italian BioR DayLodi 30 Novembre 2012
Kidney graft recipients monitoring
Aim
immunological rejection ischemia/reperfusion injury
immunosuppressant nephrotoxicity2/36
How
Italian BioR DayLodi 30 Novembre 2012
Urine samples + 1H-NMR + Chemometrics = Metabolomics
3/36
Metabolomics
Italian BioR DayLodi 30 Novembre 2012
Determination of multiple metabolites in biofluids
and tissues and their changes over time
Instrumentation: NMR, MS, GC/MS, HPLC/MS
4/36
Chemometrics
Italian BioR DayLodi 30 Novembre 2012
Chemometrics: chemistry + statistic + informatic
5/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
PCA
PLS
6/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012 6/36
Data Import
Italian BioR DayLodi 30 Novembre 2012
Matlab
save datiperR.mat data asseX '-v6'
require(R.matlab)aa <- readMat('datiperR.mat')
dati <- aa$datadati <- t(dati)
asseX <- aa$asseX
7/36
Data Analysis
Italian BioR DayLodi 30 Novembre 2012
Preprocessing and pretreatment
Exploration
Modelling
8/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
baseline and phase correction,referencing to internal standard,signals alignment
normalizationcentering
scalingother transformations
9/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
ptw, dtw, xcms -> MS or LC spectraPROcess -> protein mass spectrometry
peak peaking
binning, TMS alignment
10/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
TMS peaks before and after alignment...with icoshift...
11/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
# 10 points binnings ynew <- colMeans(matrix(dati[1,1:32760], nrow = 10))xnew <- colMeans(matrix(asseX[1:32760], nrow = 10))
# plotplot(asseX[1:32760], dati[1, 1:32760], type = "l", xlab = "asseX ", ylab = "response", main = "binning", col = "red", ylim=c(0,10^8))
lines(xnew, ynew)
binning
12/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
binning
13/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
require(ptw)# baseline driftybase <- 45600*asseX + 20000*asseX^2 - 2000*asseX^3plot(asseX, ybase[1,], type='l', col='blue')y1mod <- dati[1,]+ybase[1,]# plotplot(asseX, y1mod, type='l', ylim=c(-3000000, 10000000), col='blue')lines(asseX, dati[1,], col='red')# correctionlines(asseX, baseline.corr(y1mod), col='grey')abline(h=0, col='green', lty=2)legend('topright', legend=c('modified', 'original', 'baseline corrected'), lty=1, bty='n', col=c('blue', 'red', 'grey'), cex=0.7)
Baseline correction
14/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
Baseline correction
15/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
δ ppm!
Data reduction
xnew <- c(x[p1:p2,], x[p3:p4,])
p1
p2
p3
p4
16/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
Data reduction
plot(dati[1,], type='l')require (TeachingDemos)plot(dati[1,], type='l')# zooming the plotzoomplot(locator(2))# find the pointsp1 <- locator(1)p2 <- locator(1)plot(dati[1,], type='l')# zooming the plotzoomplot(locator(2))p3 <- locator(1)p4 <- locator(1)# new reduced datasetdati.r <- dati[,c(p1$x:p2$x, p3$x:p4$x)]
17/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
Unit area normalizationdati.un <- sweep(dati.r, MARGIN = 1, apply(dati, 1,function(x) sqrt(sum(x^2))), FUN = '/')
par(mfrow=c(2,1))asseX <- t(asseX.r)matplot(asseX.r, t(dati.r), type='l', lwd=1, col=setcol, lty=1)matplot(asseX.r, t(dati.un), type='l', lwd=1, col=setcol, lty=1)
18/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
Unit area normalization
19/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
ScalingCENTERING
AUTOSCALING
PARETO SCALING
(X-Xmedio)/radq(sd)
20/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
Scalingrequire(pls)
dati.c <- scale(dati.r, center = T, scale =F)dati.sc <- scale(dati.r, center = T, scale =T)
dati.p <- sweep(dati.r, MARGIN = 2, sqrt(apply(dati.r, MARGIN = 2, sd)), FUN = "/")
21/36
Preprocessing + Pretreatment
Italian BioR DayLodi 30 Novembre 2012
Scaling
22/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
15 patients were sampled all along the hospital recovery period (from 5 to 40 days) and during the first follow up
systematic sampling (one sample a day)
23/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012 24/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
PCAPareto scaling3 patients
Post-operation
Pre-discharge
Follow-up
25/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
PCAPareto scaling15 patients
Pre-discharge
Post-operation
Follow-up
26/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
require(ChemometricsWithR)
mod <- PCA(dati.p)
figura1a <- scores(mod)
plot(figura1a[,2], figura1a[,3], xlab ='PC 1 (exp. var. 13.96%)', ylab = 'PC 2 (exp. var. 9.88%)', xaxt="n", yaxt="n", mgp=c(2.5, 1, 0), cex.lab = 1, type = 'n')
axis(1, at=seq(-1,1,0.25), lwd = 0, lwd.ticks = 1, tcl = 0.2, cex.axis=1, mgp=c(1.5, 0.5, 0))axis(2, at=seq(-1,1,0.25), lwd = 0, lwd.ticks = 1, tcl = 0.2, cex.axis=1, las = 2, mgp=c(1.5, 0.5, 0))
points(figura1a[,2], figura1a[,3], pch=as.numeric(figura1a[,1]), cex=0.8)
abline(v=0, h=0, col='grey', lty = 2)
27/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
PLS-DA analysisone class vs one class
Modelled class: 1 2 3
Calibration Sensitivity 0.96 0.88 0.91
Specificity 1 0.9 0.96
Class. Err 0.02 0.11 0.07
Cross Validation Sensitivity 0.94 0.86 0.91
Specificity 1 0.83 0.92
Class. Err 0.03 0.15 0.08
28/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
Post operation stage.The creatinine and creatine signals are rather low and there is a lipoprotein signal
29/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
Pre discharge stage.Creatinine and creatine signals pretty high and lipoprotein signal almost disappeared
30/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
Follow up stage.The creatinine and creatine signals are very intense
31/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
mod <- do.pls(dati.p, class.p, 2, scale="mean")
VIP.scores.Y1 <- mod$VIP[,2]
plot(-axis.scale,VIP.scores.Y1, type='l', xaxt='n', yaxt='n', xlab='[ppm]', ylab='VIP scores', ylim=c(0,350), lwd = 0.5, cex.lab=0.8, main = 'VIP scores class 1', cex.main=0.9, col='black', mgp=c(2.5, 1, 0))
axis(1, at=seq(0,-10,-1), labels = seq(0,10,1), lwd = 0, lwd.ticks = 1, tcl = 0.2, cex.axis=0.8)
axis(2, at=seq(0, 320, 50), lwd = 0, lwd.ticks = 1, tcl = 0.2, cex.axis=0.8, las= 1)
grid(col = "lightgray", lty = "dotted", lwd =1)
32/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
require(pls) // do.pls
short command: mod <- do.pls(x,y)extensive command: mod <- do.pls(x,y, ncomp, scale=c("mean", "autoscaling"), graph=c("line", "points"))
aim: to do a pls regression analysis with just one “click”
http://cran.r-project.org/web/packages/pls/http://mevik.net/work/software/pls.html
33/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
Input:
•x is the predictor matrix
•y is the response variable
•ncomp it is the requested number of latent variables (optional). The default is the LV’s number corresponding to the lowest
RMSECV(*)
•scale: choose between mean centering (default) and autoscaling
•graph it is the plot layout: choose between points or line for predictors plot (optional).
(*) only Leave-One-Out CV procedure it is implemented
34/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012
Output:
it is a list.
•modello, it is the usual mvr output
•performance, explained variance for predictors and response variable, RMSE, RMSECV, number of latent variables selected)
•VIP
•coefficients
35/36
Exploration + Modelling
Italian BioR DayLodi 30 Novembre 2012 36/36
grazie per l’attenzioneMarco Calderisi, [email protected]
Italian BioR DayLodi 30 Novembre 2012