Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanse committed Oct 26, 2020
2 parents df39e11 + 3a3e49c commit cab177e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions vignettes/JPR_TechnicalNote.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ title: rawR - Technical Note, Journal of Proteome Research, Second Biennial Spec
Issue on Software Tools and Resources in February 2021
author: "Tobias Kockmann^1‡^ & Christian Panse^1,2‡^"
date: "`r Sys.Date()`"
bibliography: rawR.bib
output:
pdf_document:
keep_tex: true
keep_tex: true
html_document:
df_print: paged
citation_package: natbib
word_document: default
bibliography: rawR.bib
vignette: |
%\usepackage[utf8]{inputenc}
%\VignetteEncoding{UTF-8}
Expand Down Expand Up @@ -131,13 +132,12 @@ C <- readChromatogram(rawfile, mass = iRT, tol = 10, type = "xic", filter = "ms"
plot(C)
```

For regression, we now extract the RTs at the maximum of intensity traces stored in the chromatogram object and fit a linear model of the form $$rt = a \cdot score+b$$.
For regression, we now extract the RTs at the maximum of the intensity traces stored in the chromatogram object and fit a linear model of the form $$rt = a + b\cdot score$$. The fitted model can than be inspected using the well known procedures. Code chunk `iRTscoreFitPlot` shows a visual inspection by scatter plotting observed RTs as a function of iRT score together with the regression line. The corresponding $$R^2$$ indicates that the RTs behave highly linear! This is expected since, the iRT peptides were separated on a 20 min linear gradient from 5% to 35% using C18 RP material.

```{r iRTscoreFit, error=TRUE}
score <- c(-24.92, 19.79, 70.52, 87.23, 0, 28.71, 12.39, 33.38, 42.26, 54.62, 100)
rt <- sapply(C, function(x) x$times[which.max(x$intensities)[1]])
fit <- lm(rt ~ score)
summary(fit)
```


Expand All @@ -148,8 +148,12 @@ plot(rt ~ score,
xlab = "iRT score",
pch=16,frame.plot = FALSE)
abline(fit, col = 'grey')
legend("topleft", legend = "regression line", bty = "n", cex = 0.75)
#text(score, rt, substr(names(iRT),1,3),pos=3)
abline(v = 0, col = "grey", lty = 2)
legend("topleft", legend = paste("Regression line: ", "rt =",
format(coef(fit)[1], digits = 4), " + ",
format(coef(fit)[2], digits = 2), "score",
"\nR2: ", format(summary(fit)$r.squared, digits = 2)),
bty = "n", cex = 0.75)
text(score, rt, iRT,pos=1,cex=0.5)
```

Expand Down

0 comments on commit cab177e

Please sign in to comment.