saveERCCPlots: Save erccdashboard plots to a pdf file

Description Usage Arguments Examples

Description

The function savePlots will save selected figures to a pdf file. The default is the 4 manuscript figures to a single page (plotsPerPg = "manuscript"). If plotsPerPg = "single" then each plot is placed on an individual page. If plotlist is not defined (plotlist = NULL) or if plotlist = exDat$Figures then all plots in exDat$Figures are printed to a PDF file.

Usage

1
2
saveERCCPlots(exDat, plotsPerPg = "main", saveas = "pdf", outName, plotlist,
  res)

Arguments

exDat

list, contains input data and stores analysis results

plotsPerPg

string, if "main" then the 4 main plots are printed to one page, if "single" then a single plot is printed per page from the plotlist argument

saveas

Choose file format from "pdf", "jpeg" or "png"

outName

Choose output file name, default will be fileName from exDat

plotlist

list, contains plots to print

res

Choose the file resolution

Examples

 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
data(SEQC.Example)
 
exDat <- initDat(datType="count", isNorm=FALSE, exTable=MET.CTL.countDat, 
                 filenameRoot="testRun", sample1Name="MET",
                 sample2Name="CTL", erccmix="RatioPair", 
                 erccdilution=1/100, spikeVol=1, totalRNAmass=0.500,
                 choseFDR=0.1)
                 
exDat <- est_r_m(exDat)
                  
exDat <- dynRangePlot(exDat)

exDat <- geneExprTest(exDat)

exDat <- erccROC(exDat)

exDat <- estLODR(exDat, kind="ERCC", prob=0.9)

exDat <- annotLODR(exDat)

#to print 4 main plots to a single page pdf file
saveERCCPlots(exDat, plotsPerPg = "manuscript",saveas = "pdf")

#to print 4 plots to a jpeg file
saveERCCPlots(exDat, plotsPerPg = "manuscript",saveas = "jpeg")

# or to create a multiple page pdf of all plots produced
saveERCCPlots(exDat, plotsPerPg = "single", plotlist = exDat$Figures)

# or to create a multiple page pdf of just 2 plots
saveERCCPlots(exDat, plotsPerPg = "single", 
              plotlist = list(exDat$Figures$lodrPlot, exDat$Figures$maPlot))

arcolombo/Rccdashboard documentation built on May 10, 2019, 12:49 p.m.