tpptrFitSplines {TPP} | R Documentation

## Perform spline fitting

### Description

Fit natural splines to all proteins in a dataset.

### Usage

    tpptrFitSplines(
      data,
      factorsH1,
      factorsH0 = character(0),
      splineDF = 3:7,
      computeAUC = NULL,
      returnModels = TRUE,
      nCores = "max"
    )

### Arguments

`data` | the data to be fitted
`factorsH1` | which factors should be included in the alternative model?
`factorsH0` | which factors should be included in the null model?
`splineDF` | degrees of freedom for natural spline fitting.
`computeAUC` | DEPRECATED
`returnModels` | should the linear models be returned in a column of the result table? Activation increases memory requirements.
`nCores` | either a numerical value given the desired number of CPUs, or 'max' to automatically assign the maximum possible number (default). 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 table containing the fitted models per protein

### See Also

`ns, AICc`

### Examples

    data(hdacTR_smallExample)
    tpptrData <- tpptrImport(configTable = hdacTR_config, data = hdacTR_data)
    normResults <- tpptrNormalize(data = tpptrData,
                   normReqs = tpptrDefaultNormReqs())
    normData_eSets <- normResults$normData
    normData_longTable <- tpptrTidyUpESets(normData_eSets)
    hdacSubset <- subset(normData_longTable, grepl("HDAC", uniqueID))
    hdacSplineFits <- tpptrFitSplines(data = hdacSubset,
                                      factorsH1 = c("condition"),
                                      nCores = 1)

[Package TPP version 3.18.0 Index]