Contents

1 Requirements

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')

2 Input

2.1 Parameter

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:


Table 1: used INPUT parameter
parameter.values
FASTA_FILE /tmp/Rtmpxk6qkx/Rinst2aa44ab1fd7f/specL/extdata/SP201602-specL.fasta.gz
BLIB_FILTERED_FILE /tmp/Rtmpxk6qkx/Rinst2aa44ab1fd7f/specL/extdata/peptideStd.sqlite
BLIB_REDUNDANT_FILE /tmp/Rtmpxk6qkx/Rinst2aa44ab1fd7f/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/Rtmpd7pNV0/file2e8c3326496

2.2 Define the fragment ions of interest

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_) )
}

2.3 Read the sqlite files

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

2.4 Protein (re)-annotation

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.00934805870056152 minutes

2.5 Peptides used for RT normalization

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.

Table 2: peptides used for RT normaization
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

3 Generate the ion library

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
  )

3.1 Library Generation Summary

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)

4 Output

write.spectronaut(specLibrary, file =  INPUT$OUTPUT_LIBRARY_FILE)
## writting specL object (including header) to file '/tmp/Rtmpd7pNV0/file2e8c3326496' ...

5 Remarks

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.

6 Session info

Here is the output of sessionInfo() on the system on which this document was compiled:

## R version 3.4.2 (2017-09-28)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04.3 LTS
## 
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.6-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.6-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.17      specL_1.12.0    seqinr_3.4-5    RSQLite_2.0    
## [5] protViz_0.2.37  DBI_0.7         BiocStyle_2.6.0
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_0.12.13    magrittr_1.5    bit_1.1-12      rlang_0.1.2    
##  [5] stringr_1.2.0   blob_1.1.0      highr_0.6       tools_3.4.2    
##  [9] parallel_3.4.2  htmltools_0.3.6 yaml_2.1.14     bit64_0.9-7    
## [13] ade4_1.7-8      rprojroot_1.2   digest_0.6.12   tibble_1.3.4   
## [17] bookdown_0.5    memoise_1.1.0   evaluate_0.10.1 rmarkdown_1.6  
## [21] stringi_1.1.5   compiler_3.4.2  backports_1.1.1

References

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.