tpptrPlotSplines: Plot spline fits per protein

Description Usage Arguments Details Value See Also Examples

View source: R/tpptrPlotSplines.R

Description

Plot spline fits per protein

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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

1
2
3
4
5
6
7
8
9
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())

DoroChilds/TPP documentation built on Oct. 31, 2021, 4:38 a.m.