tpptrPlotSplines {TPP} | R Documentation

## Plot spline fits per protein

### Description

Plot spline fits per protein

### Usage

    tpptrPlotSplines(
      data,
      factorsH1 = NULL,
      factorsH0 = NULL,
      fittedModels,
      testResults,
      resultPath = NULL,
      individual = TRUE,
      overview = FALSE,
      returnPlots = FALSE,
      control = list(nCores = "max", maxRank = 500, highlightBelow = 0.05),
      maxRank = NULL,
      highlightBelow = NULL,
      plotIndividual = NULL,
      plotAlphabetical = NULL
    )

### Arguments

`data` | long table of proteins measurements that were used for spline fitting.
`factorsH1` | DEPRECATED
`factorsH0` | DEPRECATED
`fittedModels` | long table of fitted models. Output of `tpptrFitSplines`.
`testResults` | long table of p-values per protein. Output of `tpptrFTest`.
`resultPath` | an optional character vector with the name of the path where the plots should be saved.
`individual` | logical. Export each plot to individual files?
`overview` | logical. Generate summary pdfs?
`returnPlots` | logical. Should the ggplot objects be returned as well?
`control` | a list of general settings.
`maxRank` | DEPRECATED
`highlightBelow` | DEPRECATED
`plotIndividual` | DEPRECATED
`plotAlphabetical` | DEPRECATED Contains the following fields: `nCores`: number of CPUs for parallel production of plots per protein if `individual = TRUE` (default: "max") `maxRank`: how many of the top hits should be plotted if `overview = TRUE` (default: 500) `highlightBelow`: maximum adjusted p-value for which a protein is highlighted by a different background color if `overview = TRUE` (default: 0.05)

### Details

Plots of the natural spline fits will be stored in a subfolder with name `Spline_Fits` at the location specified by `resultPath`.

Exporting each plot to individual files (individual = TRUE) can cost runtime and the resulting files can be tedious to browse. If you just want to browse the results, use `overview = TRUE` instead.

If `overview = TRUE`, two summary PDFs are created that enable quick browsing through all results. They contain the plots in alphacetical order (`splineFit_alphabetical.pdf`), or ranked by p-values (`splineFit_top_xx.pdf`, where xx is the maximum rank defined by `overviewSettings$maxRank`).

### Value

None

### See Also

`ns, AICc, tpptrFitSplines, tpptrFTest`

### Examples

    data(hdacTR_smallExample)
    tpptrData <- tpptrImport(configTable = hdacTR_config, data = hdacTR_data)
    tidyData <- tpptrTidyUpESets(tpptrData)
    splineFits <- tpptrFitSplines(data = tidyData, nCores = 1, splineDF = 4:5,
                                  factorsH1 = "condition", returnModels = TRUE)
    testResults <- tpptrFTest(fittedModels = splineFits, doPlot = FALSE)
    tpptrPlotSplines(data = tidyData, fittedModels = splineFits,
                     individual = FALSE,
                     testResults = testResults, resultPath = getwd())

[Package TPP version 3.20.1 Index]