analyzeTPPTR: Analyze TPP-TR experiment

Description Usage Arguments Details Value References See Also Examples

View source: R/analyzeTPPTR.R

Description

Performs analysis of a TPP-TR experiment by invoking routines for data import, data processing, normalization, curve fitting, and production of the result table.

Usage

 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
analyzeTPPTR(
  configTable,
  data = NULL,
  resultPath = NULL,
  methods = c("meltcurvefit", "splinefit"),
  idVar = "gene_name",
  fcStr = "rel_fc_",
  ciStr = NULL,
  naStrs = c("NA", "n/d", "NaN", "<NA>"),
  qualColName = "qupm",
  normalize = TRUE,
  normReqs = tpptrDefaultNormReqs(),
  ggplotTheme = tppDefaultTheme(),
  nCores = "max",
  startPars = c(Pl = 0, a = 550, b = 10),
  splineDF = c(3:7),
  maxAttempts = 500,
  plotCurves = TRUE,
  fixedReference = NULL,
  pValMethod = "robustZ",
  pValFilter = list(minR2 = 0.8, maxPlateau = 0.3),
  pValParams = list(binWidth = 300),
  verbose = FALSE,
  xlsxExport = TRUE
)

Arguments

configTable

dataframe, or character object with the path to a file, that specifies important details of the TPP-TR experiment. See Section details for instructions how to create this object.

data

single dataframe, or list of dataframes, containing fold change measurements and additional annotation columns to be imported. Can be used instead of specifying the file path in the configTable argument.

resultPath

location where to store melting curve plots, intermediate results, and the final results table.

methods

statistical methods for modeling melting behavior and detecting significant differences between experimental conditions. Ich more than one method are specified, results will be computed for each and concatenated in the result table (default: meltcurvefit).

idVar

character string indicating which data column provides the unique identifiers for each protein.

fcStr

character string indicating which columns contain the actual fold change values. Those column names containing the suffix fcStr will be regarded as containing fold change values.

ciStr

character string indicating which columns contain confidence intervals for the fold change measurements. If specified, confidence intervals will be plotted around the melting curves.

naStrs

character vector indicating missing values in the data table. When reading data from file, this value will be passed on to the argument na.strings in function read.delim.

qualColName

character string indicating which column can be used for additional quality criteria when deciding between different non-unique protein identifiers.

normalize

perform normalization (default: TRUE).

normReqs

list of filtering criteria for construction of the normalization set.

ggplotTheme

ggplot theme for melting curve plots.

nCores

either a numerical value given the desired number of CPUs, or 'max' to automatically assign the maximum possible number (default).

startPars

start values for the melting curve parameters. Will be passed to function nls for curve fitting.

splineDF

degrees of freedom for natural spline fitting.

maxAttempts

maximal number of curve fitting attempts if model does not converge.

plotCurves

boolean value indicating whether melting curves should be plotted. Deactivating plotting decreases runtime.

fixedReference

name of a fixed reference experiment for normalization. If NULL (default), the experiment with the best R2 when fitting a melting curve through the median fold changes is chosen as the reference.

pValMethod

Method for p-value computation. Currently restricted to 'robustZ' (see Cox & Mann (2008)).

pValFilter

optional list of filtering criteria to be applied before p-value computation.

pValParams

optional list of parameters for p-value computation.

verbose

print name of each fitted protein to the command lin as a means of progress report.

xlsxExport

boolean value indicating whether to produce result table in .xlsx format (requires package openxlsx and a zip application to be installed).

Details

Invokes the following steps:

  1. Import data using the tpptrImport function.

  2. Perform normalization (optional) using the tpptrNormalize function. To perform normalization, set argument normalize=TRUE. The normalization will be filtered according to the criteria specified in the normReqs argument (also see the documentation of tpptrNormalize and tpptrDefaultNormReqs for further information).

  3. Fit melting curves using the function tpptrCurveFit.

  4. Produce result table using the function tpptrAnalyzeMeltingCurves.

  5. Export results to Excel using the function tppExport.

The default settings are tailored towards the output of the python package isobarQuant, but can be customized to your own dataset by the arguments idVar, fcStr, naStrs, qualColName.

If resultPath is not specified, the location of the first input file specified in configTable will be used. If the input data are not specified in configTable, no result path will be set. This means that no output files or melting curve plots are produced and analyzeTPPTR just returns the results as a data frame.

The function analyzeTPPTR reports intermediate results to the command line. To suppress this, use suppressMessages.

The configTable argument is a dataframe, or the path to a spreadsheet (tab-delimited text-file or xlsx format). Information about each experiment is stored row-wise. It contains the following columns:

The argument methods can be one of the following: More than one method can be specified. For example, parametric testing of melting points and nonparametric spline-based goodness-of-fit tests can be performed sequentially in the same analysis. The results are then written to separate columns of the output table.

If methods contains "meltcurvefit", melting curve plots will be stored in a subfolder with name Melting_Curves at the location specified by resultPath. If methods contains "splinefit", plots of the natural spline fits will be stored in a subfolder with name Spline_Fits at the location specified by resultPath.

The argument nCores could be either 'max' (use all available cores) or an upper limit of CPUs to be used.

If doPlot = TRUE, melting curve plots are generated separately for each protein and stored in separate pdfs. Each file is named by the unique protein identifier. Filenames are truncated to 255 characters (requirement by most operation systems). Truncated filenames are indicated by the suffix "_truncated[d]", where [d] is a unique number to avoid redundancies. All melting curve plots are stored in a subfolder with name Melting_Curves at the location specified by resultPath.

If the melting curve fitting procedure does not converge, it will be repeatedly started from perturbed starting parameters (maximum iterations defined by argument maxAttempts).

Argument splineDF specifies the degrees of freedom for natural spline fitting. As a single numeric value, it is directly passed on to the splineDF argument of splines::ns. Experience shows that splineDF = 4 yields good results for TPP data sets with 10 temperature points. It is also possible to provide a numeric vector. In this case, splines are fitted for each entry and the optimal value is chosen per protein using Akaike's Information criterion.

Value

A data frame in which the fit results are stored row-wise for each protein.

References

Savitski, M. M., Reinhard, F. B., Franken, H., Werner, T., Savitski, M. F., Eberhard, D., ... & Drewes, G. (2014). Tracking cancer drugs in living cells by thermal profiling of the proteome. Science, 346(6205), 1255784.

Franken, H, Mathieson, T, Childs, D. Sweetman, G. Werner, T. Huber, W. & Savitski, M. M. (2015), Thermal proteome profiling for unbiased identification of drug targets and detection of downstream effectors. Nature protocols 10(10), 1567-1593.

See Also

tppDefaultTheme, tpptrImport, tpptrNormalize, tpptrCurveFit, tpptrAnalyzeMeltingCurves

Examples

1
2
3
data(hdacTR_smallExample)
tpptrResults <- analyzeTPPTR(configTable = hdacTR_config, data = hdacTR_data, 
                methods = "meltcurvefit", nCores = 1)

TPP documentation built on Nov. 8, 2020, 5:55 p.m.