Created
April 29, 2014 14:57
-
-
Save sgibb/11402829 to your computer and use it in GitHub Desktop.
synapter ion mobility example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ion Mobility Example | |
```{r setup, include=FALSE} | |
library(knitr) | |
opts_chunk$set(fig.height=10, fig.width=14, fig.path="figure/ionmobility/", cache=TRUE, autodep=TRUE, tidy=FALSE) | |
``` | |
## Default Synapter Preprocessing | |
(same as in `synergise`) | |
```{r loadsynapter} | |
suppressPackageStartupMessages(library("synapter")) | |
``` | |
### File Import | |
```{r fileimport} | |
dataPath <- file.path("..", "..", "..", "playground", "data", | |
"biological_replicas_for_synapter") | |
iaPath <- file.path(dataPath, "HDMSE", "ia") | |
apexPath <- file.path(dataPath, "HDMSE", "apex") | |
input <- list( | |
identpeptide=file.path(iaPath, | |
"fermentor_02_sample_15_HDMSE_01_20140303114821", | |
"fermentor_02_sample_15_HDMSE_01_IA_final_peptide.csv"), | |
quantpeptide=file.path(iaPath, | |
"fermentor_03_sample_15_HDMSE_01_20140303120343", | |
"fermentor_03_sample_15_HDMSE_01_IA_final_peptide.csv"), | |
quantpep3d=file.path(apexPath, | |
"fermentor_03_sample_15_HDMSE_01_20140302183822", | |
"fermentor_03_sample_15_HDMSE_01_Pep3DAMRT.csv"), | |
fasta=file.path(dataPath, | |
"S.cerevisiae_uniprot_reference_canonical_16_09_13.fasta")) | |
## only for reproducibility | |
set.seed(1) | |
system.time(s <- Synapter(input)) | |
``` | |
### Filtering | |
```{r filtering} | |
filterUniqueDbPeptides(s, verbose=TRUE) | |
fdr <- fpr <- 0.05 | |
ppm <- 20 | |
filterIdentPepScore(s, method="BH", fdr=fdr) | |
filterQuantPepScore(s, method="BH", fdr=fdr) | |
filterIdentProtFpr(s, fpr=fpr) | |
filterQuantProtFpr(s, fpr=fpr) | |
filterIdentPpmError(s, ppm=ppm) | |
filterQuantPpmError(s, ppm=ppm) | |
``` | |
### RT Model and Grid Search | |
```{r rtmodel} | |
mergePeptides(s) | |
modelRt(s, span=0.05) | |
system.time(searchGrid(s, verbose=FALSE)) | |
setBestGridParams(s) | |
findEMRTs(s) | |
s | |
``` | |
## Ion Mobility | |
```{r imsummary} | |
set.seed(1) # only for demonstration | |
m <- synapter:::.plotIonMobilitySummary(s) | |
``` | |
```{r imsummarytable, results="asis"} | |
kable(m[1:25,], row.names=FALSE) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment