Last data update: 2014.03.03

R: Synergise identification and quantitation results
synergiseR Documentation

Synergise identification and quantitation results

Description

Performs a complete default analysis on the files defined in filenames, creates a complete html report and saves/exports all results as csv and rda files. See details for a description of the pipeline and Synapter for manual execution of individual steps.

Usage

synergise(filenames, master = FALSE, object, outputdir, fdr = 0.01,
  fdrMethod = c("BH", "Bonferroni", "qval"), fpr = 0.01, peplen = 7,
  missedCleavages = 0, identppm = 20, quantppm = 20, uniquepep = TRUE,
  span = 0.05, grid.ppm.from = 2, grid.ppm.to = 20, grid.ppm.by = 2,
  grid.nsd.from = 0.5, grid.nsd.to = 5, grid.nsd.by = 0.5,
  grid.subset = 1, grid.n = 0, grid.param.sel = c("auto", "model",
  "total", "details"), mergedEMRTs = c("rescue", "copy", "transfer"),
  css = NULL, verbose = TRUE)

Arguments

filenames

A named list of file names to be load. The names must be identpeptide, quantpeptide, quantpep3d and fasta. If missing, a dialog box opens to select files interactively. identpeptide can be a csv final peptide file (from PLGS) or a saved "MasterPeptides" data object as created by makeMaster if working with master peptide data. To serialise the "MasterPeptides" instance, use the saveRDS function, and file extenstion rds.

master

A logical indicating if the identification final peptide files are master (see makeMaster) or regular files. Default is FALSE.

object

An instance of class Synapter that will be copied, processed and returned. If filenames are also provided, the latter and object's inputFiles will be checked for equality.

outputdir

A character with the full path to an existing directory.

fdr

Peptide false discovery rate. Default is 0.01.

fdrMethod

P-value adjustment method. One of "BH" (default) for Benjamini and HochBerg (1995), "Bonferroni" for Bonferroni's single-step adjusted p-values for strong control of the FWER and "qval" from the qvalue package. See Synapter for references.

fpr

Protein false positive rate. Default is 0.01.

peplen

Minimum peptide length. Default is 7.

missedCleavages

Number of allowed missed cleavages. Default is 0.

identppm

Identification mass tolerance (in ppm). Default is 20.

quantppm

Quantitation mass tolerance (in ppm). Default is 20.

uniquepep

A logical is length 1 indicating if only unique peptides in the identification and quantitation peptides as well as unique tryptic peptides as defined in the fasta file. Default is TRUE.

span

The loess span parameter. Default is 0.05.

grid.ppm.from

Mass tolerance (ppm) grid starting value. Default is 2.

grid.ppm.to

Mass tolerance (ppm) grid ending value. Default is 20.

grid.ppm.by

Mass tolerance (ppm) grid step value. Default is 2.

grid.nsd.from

Number of retention time stdev grid starting value. Default is 0.5.

grid.nsd.to

Number of retention time stdev grid ending value. Default is 5.

grid.nsd.by

Number of retention time stdev grid step value. Default is 0.5.

grid.subset

Percentage of features to be used for the grid search. Default is 1.

grid.n

Absolute number of features to be used for the grid search. Default is 0, i.e ignored.

grid.param.sel

Grid parameter selection method. One of auto (default), details, model or total. See Synapter for details on these selection methods.

mergedEMRTs

One of "rescue" (default), "copy" or "transfer". See the documentation for the findEMRTs function in Synapter for details.

css

An optional path to a custom css file. If NULL (default), uses synapter.css.

verbose

A logical indicating if progress output should be printed to the console. Default is TRUE.

Details

Data can be input as a Synapter object if available or as a list of files (see filenames) that will be used to read the data in. If none of object and filenames are provided, file section menus are open to select input files. The html report and result files will be created in the outputdir folder. If not provided, the destination can be selected through a selection menu. All other input parameters have default values.

The data processing and analysis pipeline is as follows:

  1. If uniquepep is set to TRUE (default), only unique proteotypic identification and quantitation peptides are retained.

  2. Peptides are filtered for a FDR <= fdr (default is 0.01) using the "BH" method (see fdr and fdrMethod parameters for details).

  3. Peptide with a mass tolerance > 20 ppms (see quantppm and identppm) are filtered out.

  4. Peptides with a protein false positive rate (as reported by the PLGS software) > fpr are filtered out.

  5. Common identification and quantitation peptides are merged and a retention time model is created using the Local Polynomial Regression Fitting (loess function for the stats package) using a default span value of 0.05.

  6. A grid search to optimise the width in retention time and mass tolerance for EMRTs matching is performed. The default grid search space is from 0.5 to 5 by 0.5 retention time model standard deviations (see grid.nsd.from, grid.nsd.to and grid.nsd.by parameters) and from 2 to 20 by 2 parts per million (ppm) for mass tolerance (see grid.ppm.from, grid.ppm.to and grid.ppm.by parameters). The data can be subset using using an absolute number of features (see grid.n) or a fixed percentage (see grid.subset). The pair of optimal nsd and ppm is chosen (see grid.param.sel parameter).

  7. The quantitation EMRTs are matched using the optimised parameters.

If a master identification file is used (master is set to TRUE, default is FALSE), the relevant actions that have already been executed when the file was created with makeMaster are not repeated here.

Value

Invisibly returns an object of class Synapter. Used for its side effect of creating an html report of the run in outputdir.

Author(s)

Laurent Gatto

References

Bond N. J., Shliaha P.V., Lilley K.S. and Gatto L. (2013) J. Prot. Research.

Examples

output <- tempdir() ## a temporary directory
synapterTinyData()
synergise(object = synapterTiny, outputdir = output, grid.subset = 0.2)
htmlReport <- paste0("file:///", file.path(output, "index.html")) ## the result report
## Not run: 
browseURL(htmlReport) ## open the report with default browser

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(synapter)
Loading required package: MSnbase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: mzR
Loading required package: Rcpp
Loading required package: BiocParallel
Loading required package: ProtGenerics

This is MSnbase version 1.20.7 
  Read '?MSnbase' and references therein for information
  about the package and how to get started.


Attaching package: 'MSnbase'

The following object is masked from 'package:stats':

    smooth

The following object is masked from 'package:base':

    trimws

This is the 'synapter' version 1.14.2.
Read '?synapter' to get started.

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/synapter/synergise.Rd_%03d_medium.png", width=480, height=480)
> ### Name: synergise
> ### Title: Synergise identification and quantitation results
> ### Aliases: synergise synergize
> 
> ### ** Examples
> 
> output <- tempdir() ## a temporary directory
> synapterTinyData()
> synergise(object = synapterTiny, outputdir = output, grid.subset = 0.2)
Keeping unique peptides...
Fasta file: 897 proteins
            21914 out of 22960 tryptic peptides are proteotypic.
Running grid search...
   |                                                                               |                                                                      |   0%   |                                                                               |=                                                                     |   1%   |                                                                               |=                                                                     |   2%   |                                                                               |==                                                                    |   3%   |                                                                               |===                                                                   |   4%   |                                                                               |====                                                                  |   5%   |                                                                               |====                                                                  |   6%   |                                                                               |=====                                                                 |   7%   |                                                                               |======                                                                |   8%   |                                                                               |======                                                                |   9%   |                                                                               |=======                                                               |  10%   |                                                                               |========                                                              |  11%   |                                                                               |========                                                              |  12%   |                                                                               |=========                                                             |  13%   |                                                                               |==========                                                            |  14%   |                                                                               |==========                                                            |  15%   |                                                                               |===========                                                           |  16%   |                                                                               |============                                                          |  17%   |                                                                               |=============                                                         |  18%   |                                                                               |=============                                                         |  19%   |                                                                               |==============                                                        |  20%   |                                                                               |===============                                                       |  21%   |                                                                               |===============                                                       |  22%   |                                                                               |================                                                      |  23%   |                                                                               |=================                                                     |  24%   |                                                                               |==================                                                    |  25%   |                                                                               |==================                                                    |  26%   |                                                                               |===================                                                   |  27%   |                                                                               |====================                                                  |  28%   |                                                                               |====================                                                  |  29%   |                                                                               |=====================                                                 |  30%   |                                                                               |======================                                                |  31%   |                                                                               |======================                                                |  32%   |                                                                               |=======================                                               |  33%   |                                                                               |========================                                              |  34%   |                                                                               |========================                                              |  35%   |                                                                               |=========================                                             |  36%   |                                                                               |==========================                                            |  37%   |                                                                               |===========================                                           |  38%   |                                                                               |===========================                                           |  39%   |                                                                               |============================                                          |  40%   |                                                                               |=============================                                         |  41%   |                                                                               |=============================                                         |  42%   |                                                                               |==============================                                        |  43%   |                                                                               |===============================                                       |  44%   |                                                                               |================================                                      |  45%   |                                                                               |================================                                      |  46%   |                                                                               |=================================                                     |  47%   |                                                                               |==================================                                    |  48%   |                                                                               |==================================                                    |  49%   |                                                                               |===================================                                   |  50%   |                                                                               |====================================                                  |  51%   |                                                                               |====================================                                  |  52%   |                                                                               |=====================================                                 |  53%   |                                                                               |======================================                                |  54%   |                                                                               |======================================                                |  55%   |                                                                               |=======================================                               |  56%   |                                                                               |========================================                              |  57%   |                                                                               |=========================================                             |  58%   |                                                                               |=========================================                             |  59%   |                                                                               |==========================================                            |  60%   |                                                                               |===========================================                           |  61%   |                                                                               |===========================================                           |  62%   |                                                                               |============================================                          |  63%   |                                                                               |=============================================                         |  64%   |                                                                               |==============================================                        |  65%   |                                                                               |==============================================                        |  66%   |                                                                               |===============================================                       |  67%   |                                                                               |================================================                      |  68%   |                                                                               |================================================                      |  69%   |                                                                               |=================================================                     |  70%   |                                                                               |==================================================                    |  71%   |                                                                               |==================================================                    |  72%   |                                                                               |===================================================                   |  73%   |                                                                               |====================================================                  |  74%   |                                                                               |====================================================                  |  75%   |                                                                               |=====================================================                 |  76%   |                                                                               |======================================================                |  77%   |                                                                               |=======================================================               |  78%   |                                                                               |=======================================================               |  79%   |                                                                               |========================================================              |  80%   |                                                                               |=========================================================             |  81%   |                                                                               |=========================================================             |  82%   |                                                                               |==========================================================            |  83%   |                                                                               |===========================================================           |  84%   |                                                                               |============================================================          |  85%   |                                                                               |============================================================          |  86%   |                                                                               |=============================================================         |  87%   |                                                                               |==============================================================        |  88%   |                                                                               |==============================================================        |  89%   |                                                                               |===============================================================       |  90%   |                                                                               |================================================================      |  91%   |                                                                               |================================================================      |  92%   |                                                                               |=================================================================     |  93%   |                                                                               |==================================================================    |  94%   |                                                                               |==================================================================    |  95%   |                                                                               |===================================================================   |  96%   |                                                                               |====================================================================  |  97%   |                                                                               |===================================================================== |  98%   |                                                                               |===================================================================== |  99%   |                                                                               |======================================================================| 100%
Matching EMRTs...
(S) Synapter: 2506 EMRTs uniquely matched.
(I) Ident: 3045 peptides.
(Q) Quant:   1840 peptides.
Enrichment (S/Q): 36.2%
Overlap:
   Q    S   QS 
 433 1097 1407 
Report written to 'RtmpGBi3kB'.
> htmlReport <- paste0("file:///", file.path(output, "index.html")) ## the result report
> ## Not run: 
> ##D browseURL(htmlReport) ## open the report with default browser
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>