This files contains all the commands performing a default SWATH ion library generation at the FGCZ. This document is usually triggered by the bfabric system (Türker et al. 2010) and is meant for training and reproducibility.
specL 1.10.0
In a first step, the peptide identification result is generated by a standard shotgun proteomics experiment and has to be processed using the bibliospec software. (Frewen and MacCoss 2007).
For generating the ion library the specL is used. The workflow is described in (Panse et al. 2015).
The following R packages has to be installed on the compute box.
library(specL)
This file can be rendered by useing the following code snippet.
library(rmarkdown)
library(BiocStyle)
report_file <- tempfile(fileext='.Rmd');
file.copy(system.file("doc", "report.Rmd",
package = "specL"),
report_file);
rmarkdown::render(report_file,
output_format='html_document',
output_file='/tmp/report_specL.html')
If no INPUT
is defined the report uses the specL package’s data and the following default parameters.
if(!exists("INPUT")){
INPUT <- list(FASTA_FILE
= system.file("extdata", "SP201602-specL.fasta.gz",
package = "specL"),
BLIB_FILTERED_FILE
= system.file("extdata", "peptideStd.sqlite",
package = "specL"),
BLIB_REDUNDANT_FILE
= system.file("extdata", "peptideStd_redundant.sqlite",
package = "specL"),
MIN_IONS = 5,
MAX_IONS = 6,
MZ_ERROR = 0.05,
MASCOTSCORECUTOFF = 17,
FRAGMENTIONMZRANGE = c(300, 1250),
FRAGMENTIONRANGE = c(5, 200),
NORMRTPEPTIDES = specL::iRTpeptides,
OUTPUT_LIBRARY_FILE = tempfile(),
ANNOTATE = TRUE
)
}
The library generation workflow was performed using the following parameters:
parameter.values | |
---|---|
FASTA_FILE | /tmp/RtmpK5B30f/Rinst68ca1d024d57/specL/extdata/SP201602-specL.fasta.gz |
BLIB_FILTERED_FILE | /tmp/RtmpK5B30f/Rinst68ca1d024d57/specL/extdata/peptideStd.sqlite |
BLIB_REDUNDANT_FILE | /tmp/RtmpK5B30f/Rinst68ca1d024d57/specL/extdata/peptideStd_redundant.sqlite |
MIN_IONS | 5 |
MAX_IONS | 6 |
MZ_ERROR | 0.05 |
MASCOTSCORECUTOFF | 17 |
FRAGMENTIONMZRANGE | 300, 1250 |
FRAGMENTIONRANGE | 5, 200 |
OUTPUT_LIBRARY_FILE | /tmp/RtmpRfOFDt/file6a665b4cb821 |
The following R helper function is used for composing the in-silico fragment ions using protViz.
fragmentIonFunction_specL <- function (b, y) {
Hydrogen <- 1.007825
Oxygen <- 15.994915
Nitrogen <- 14.003074
b1_ <- (b )
y1_ <- (y )
b2_ <- (b + Hydrogen) / 2
y2_ <- (y + Hydrogen) / 2
return( cbind(b1_, y1_, b2_, y2_) )
}
BLIB_FILTERED <- read.bibliospec(INPUT$BLIB_FILTERED_FILE)
## fetched 137 rows.
## assigning 28 modifications ...
summary(BLIB_FILTERED)
## Summary of a "psmSet" object.
## Number of precursor:
## 137
## Number of precursors in Filename(s)
## methods\20140910_01_fetuin_400amol_1.raw 21
## methods\20140910_07_fetuin_400amol_2.raw 116
## Number of annotated precursor:
## 0
BLIB_REDUNDANT <- read.bibliospec(INPUT$BLIB_REDUNDANT_FILE)
## fetched 184 rows.
## assigning 37 modifications ...
summary(BLIB_REDUNDANT)
## Summary of a "psmSet" object.
## Number of precursor:
## 184
## Number of precursors in Filename(s)
## methods\20140910_01_fetuin_400amol_1.raw 32
## methods\20140910_07_fetuin_400amol_2.raw 152
## Number of annotated precursor:
## 0
After processing the psm using bibliospec the protein information is gone.
The read.fasta
function is provided by the CRAN package seqinr.
if(INPUT$ANNOTATE){
FASTA <- read.fasta(INPUT$FASTA_FILE,
seqtype = "AA",
as.string = TRUE)
BLIB_FILTERED <- annotate.protein_id(BLIB_FILTERED,
fasta = FASTA)
}
## start protein annotation ...
## time taken: 0.010159158706665 minutes
The following peptides are used for the RT normalization. The last column indicates by FALSE/TRUE if a peptides is included in the data. The rows were ordered by the RT values.
peptide | rt | included | |
---|---|---|---|
1 | LGGNEQVTR | -24.92000 | FALSE |
21 | LGGNETQVR | -24.92000 | FALSE |
2 | GAGSSEPVTGLDAK | 0.00000 | TRUE |
22 | AGGSSEPVTGLADK | 0.00000 | FALSE |
3 | AAVYHHFISDGVR | 10.48963 | FALSE |
4 | VEATFGVDESNAK | 12.39000 | TRUE |
23 | VEATFGVDESANK | 12.39000 | FALSE |
5 | YILAGVENSK | 19.79000 | FALSE |
24 | YILAGVESNK | 19.79000 | FALSE |
6 | HIQNIDIQHLAGK | 23.93091 | FALSE |
7 | TPVISGGPYEYR | 28.71000 | TRUE |
25 | TPVISGGPYYER | 28.71000 | FALSE |
8 | TPVITGAPYEYR | 33.38000 | TRUE |
26 | TPVITGAPYYER | 33.38000 | FALSE |
9 | DGLDAASYYAPVR | 42.26000 | TRUE |
27 | GDLDAASYYAPVR | 42.26000 | FALSE |
10 | TEVSSNHVLIYLDK | 43.54062 | FALSE |
11 | ADVTPADFSEWSK | 54.62000 | TRUE |
28 | DAVTPADFSEWSK | 54.62000 | FALSE |
12 | LVAYYTLIGASGQR | 64.15480 | FALSE |
13 | GTFIIDPGGVIR | 70.52000 | TRUE |
29 | TGFIIDPGGVIR | 70.52000 | FALSE |
14 | TEHPFTVEEFVLPK | 74.50968 | FALSE |
15 | TTNIQGINLLFSSR | 84.36927 | FALSE |
16 | GTFIIDPAAVIR | 87.23000 | FALSE |
30 | GTFIIDPAAIVR | 87.23000 | FALSE |
17 | LFLQFGAQGSPFLK | 100.00000 | TRUE |
31 | FLLQFGAQGSPLFK | 100.00000 | FALSE |
18 | NQGNTWLTAFVLK | 104.06935 | FALSE |
19 | DSPVLIDFFEDTER | 112.63426 | FALSE |
20 | ITPNLAEFAFSLYR | 122.24622 | FALSE |
specLibrary <- specL::genSwathIonLib(
data = BLIB_FILTERED,
data.fit = BLIB_REDUNDANT,
max.mZ.Da.error = INPUT$MZ_ERROR,
topN = INPUT$MAX_IONS,
fragmentIonMzRange = INPUT$FRAGMENTIONMZRANGE,
fragmentIonRange = INPUT$FRAGMENTIONRANGE,
fragmentIonFUN = fragmentIonFunction_specL,
mascotIonScoreCutOFF = INPUT$MASCOTSCORECUTOFF,
iRT = INPUT$NORMRTPEPTIDES
)
Total Number of PSM’s with Mascot e score < 0.05, in your search is 184. The number of unique precurosors is 137. The size of the generated ion library is 131. That means that 95.62 % of the unique precursors fullfilled the filtering criteria.
summary(specLibrary)
## Summary of a "specLSet" object.
##
## Parameter:
##
## Number of precursor (q1 and peptideModSeq) = 131
## Number of unique precursor
## (q1.in-silico and peptideModSeq) = 122
## Number of iRT peptide(s) = 8
## Which std peptides (iRTs) where found in which raw files:
## ethods\20140910_01_fetuin_400amol_1.raw GAGSSEPVTGLDAK
## ethods\20140910_01_fetuin_400amol_1.raw TPVITGAPYEYR
## ethods\20140910_01_fetuin_400amol_1.raw VEATFGVDESNAK
## ethods\20140910_07_fetuin_400amol_2.raw ADVTPADFSEWSK
## ethods\20140910_07_fetuin_400amol_2.raw DGLDAASYYAPVR
## ethods\20140910_07_fetuin_400amol_2.raw GTFIIDPGGVIR
## ethods\20140910_07_fetuin_400amol_2.raw LFLQFGAQGSPFLK
## ethods\20140910_07_fetuin_400amol_2.raw TPVISGGPYEYR
##
## Number of transitions frequency:
## 5 16
## 6 115
##
## Number of annotated precursor = 1855
## Number of file(s)
## 2
##
## Number of precursors in Filename(s)
## methods\20140910_01_fetuin_400amol_1.raw 19
## methods\20140910_07_fetuin_400amol_2.raw 112
##
## Misc:
##
## Memory usage = 717088 bytes
In the following two code snippets the first element of the ion library is displayed:
# slotNames(specLibrary@ionlibrary[[1]])
specLibrary@ionlibrary[[1]]
## An "specL" object.
##
##
## content:
## group_id = ADQPQC[+57.0]LSLAWSTDGQTLFAGYSDNTIR.3
## peptide_sequence = ADQPQCLSLAWSTDGQTLFAGYSDNTIR
## proteinInformation = sp|O18640|GBLP_DROME
## q1 = 1039.151
## q1.in_silico = 3172.464
## q3 = 925.436 1143.542 996.4756 705.3505 868.4149 503.2933
## q3.in_silico = 925.4374 1143.543 996.4745 705.3526 868.4159 503.2936
## prec_z = 3
## frg_type = y y y y y y
## frg_nr = 8 10 9 6 7 4
## frg_z = 1 1 1 1 1 1
## relativeFragmentIntensity = 100 56 56 35 14 11
## irt = 95.97
## peptideModSeq = ADQPQC[+57.0]LSLAWSTDGQTLFAGYSDNTIR
## mZ.error = 0.001407 0.001031 0.001095 0.002066 0.001004 0.000286
## rachse_20140910_Nuclei_diff_extraction_methods\20140910_07_fetuin_400amol_2.raw
## score = 15.83609
##
## size:
## Memory usage: 4008 bytes
plot(specLibrary@ionlibrary[[1]])
plot an overview of the whole ion library. Please note, that the iRT peptides used for the normalization of RT do not have to be included in the resulting .
plot(specLibrary)
write.spectronaut(specLibrary, file = INPUT$OUTPUT_LIBRARY_FILE)
## writting specL object (including header) to file '/tmp/RtmpRfOFDt/file6a665b4cb821' ...
For questions and improvements please do contact the authors of the application generateSpecLibrary.
This report Rmarkdown file has been written by Witold E. Wolski and is maintained by CP.
Here is the output of sessionInfo()
on the system on which this document was compiled:
## R version 3.4.0 (2017-04-21)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04.2 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.5-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.5-bioc/R/lib/libRlapack.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] knitr_1.15.1 specL_1.10.0 seqinr_3.3-6 RSQLite_1.1-2
## [5] protViz_0.2.28 DBI_0.6-1 BiocStyle_2.4.0
##
## loaded via a namespace (and not attached):
## [1] bookdown_0.3 Rcpp_0.12.10 digest_0.6.12 rprojroot_1.2
## [5] backports_1.0.5 magrittr_1.5 evaluate_0.10 highr_0.6
## [9] stringi_1.1.5 rmarkdown_1.4 tools_3.4.0 ade4_1.7-6
## [13] stringr_1.2.0 parallel_3.4.0 yaml_2.1.14 compiler_3.4.0
## [17] memoise_1.1.0 htmltools_0.3.5
Frewen, Barbara , and Michael J. MacCoss. 2007. “Using BiblioSpec for Creating and Searching Tandem MS Peptide Libraries.” Curr Protoc Bioinformatics, December. doi:10.1002/0471250953.bi1307s20.
Panse, Christian, Christian Trachsel, Jonas Grossmann, and Ralph Schlapbach. 2015. “SpecL—an R/Bioconductor Package to Prepare Peptide Spectrum Matches for Use in Targeted Proteomics.” Bioinformatics 31 (July): 2228–31. doi:10.1093/bioinformatics/btv105.
Türker, Can, Fuat Akal, Dieter Studer-Joho, Christian Panse, Simon Barkow-Oesterreicher, Hubert Rehrauer, and Ralph Schlapbach. 2010. “B-Fabric: The Swiss Army Knife for Life Sciences.” EDBT 2010, 13th International Conference on Extending Database Technology, Lausanne, Switzerland, March 22-26, 2010, Proceedings 11 (March): 717–20. doi:10.1145/1739041.1739135.