plotTimeCourseII: Multiplot function for RPPA time course datasets

View source: R/plotTimeCourseII.R

plotTimeCourseIIR Documentation

Multiplot function for RPPA time course datasets

Description

plotTimeCourseII creates multiplot rectangular PDF files for time course datasets. Page layout (number of plots per page, arrangement of plots) and plot layout can be customized within the function.

Usage

    plotTimeCourseII(x,plotgroup="",filename="timeseries_multiplot.pdf",numpage=4,
	cols=2,xname="time",yname="signal",legpos="top",legrow=2,legtitle="treatment",
	legtitlepos="top",legtextsize=10,legtextcolor="black",legtitlesize=10,
	legtitlecolor="black",legtitleface="bold",legitemsize=1,plottitlesize=12,
	plottitleface="bold",xaxissize=10,yaxissize=10,xaxisface="bold",
	yaxisface="bold",xaxistextsize=8,xaxistextangle=0,yaxistextsize=8,
	linecolor="Set1")

Arguments

x

RPPA time course dataset preprocessed with the getErrorModel and averageData function

plotgroup

select the feature (eg. treatment) which should be plotted in one plot

filename

enter filename, DIR needs to be defined as your working directory, add .pdf to filename

numpage

number of plots per page

cols

number of plot columns per page

xname

title of the x axis

yname

title of the y axis

legpos

postion of the legend in context of the plot ("top","bottom","right","left"), "none" removes legend from plot

legrow

number of item rows within the legend

legtitle

title of the legend

legtitlepos

position of the legend title

legtextsize

font size of the legend text

legtextcolor

color of the legend text

legtitlesize

font size of the legend title

legtitlecolor

color of the legend title

legtitleface

font face of the legend title (eg. "bold")

legitemsize

size of the legend item pictures

plottitlesize

size of the plot title

plottitleface

font face of the plot title

xaxissize

font size of the x axis title

yaxissize

font size of the y axis title

xaxisface

font face of the x axis title

yaxisface

font face of the y axis title

xaxistextsize

font size of the x axis text

xaxistextangle

angle of the x axis text

yaxistextsize

font size of the y axis text

linecolor

color of the plot lines: either chose a scheme ("Set1","Dark2","Paired") or hand a vector of color names

Details

The plotTimeCourseII function plots RPPA timecourse datasets in multiple line charts. For each cell line and target protein a separate plot is created. The average foldchange values of different replicates and the error bars are visualized. In order to be visualized by the plotTimeCourseII function, the dataset needs to be preprocessed by the getErrorModel and averageData function from the RPPanalyzer package. Additionally the plotgroup needs to be defined if it is not named ?treatment?. The remaining arguments are optional.

Value

Generates a PDF file.

Author(s)

Johannes Bues (j.bues@dkfz-heidelberg.de)

Examples

## Not run: 

# pre-process the data
dataDir <- system.file("extdata", package="RPPanalyzer")
res <- dataPreproc(dataDir=dataDir, blocks=12, spot="aushon", exportNo=2)
# remove arrays
normdat_rm <- remove.arrays(res$normdat, param="target", arrays2rm=c("protein","blank"))
# select samples and export data
sel_sampels_A549 <- select.sample.group(normdat_rm, params=list("cell_line"="A549"), combine= FALSE)
write.Data(sel_sampels_A549, FileNameExtension="HGF_sample_data_A549")
# read selected data
dataexpression_1 <- read.table("HGF_sample_data_A549expression.txt")
# use getErrorModel function
dataexpression_2 <- getErrorModel(dataexpression_1, verbose=FALSE)
# use averageData function
dataexpression_3 <- averageData(dataexpression_2, scaling=c("slide","replicate"), 
distinguish=c("cell_line","treatment"))
# plot time course data
plotTimeCourseII(dataexpression_3, filename="timecourse_HGF_sample_data_A549.pdf", 
legpos="top", xname="time [min]",
yname="signal [a.u.]", linecolor=c("red","green","blue","black","orange","grey"))


## End(Not run)

RPPanalyzer documentation built on Aug. 28, 2023, 5:07 p.m.