R: Plot spline regression curves of time-course data
splinePlot
R Documentation
Plot spline regression curves of time-course data
Description
Function visualises time dependent behaviour of genes in two compared groups. The natural cubic spline regression curves fitted to discrete, time dependent expression data are plotted. One plot shows two curves - representing the reference group and the compared group, respectively. See also splineDiffExprs function.
ExpressionSet object of class ExpressionSet containing log-ratios or log-values of expression for a series of microarrays
df
number of degrees of freedom
reference
character defining which treatment group should be considered as reference
toPlot
vector of genes to plot; defalut is toPlot = "all"
Details
The input eSetObject must be provided as an object of class ExpressionSet which contains SampleName, Time, Treatment and if applicable Replicates variables (columns) included in the phenotypic data of the eSetObject (pData(eSetObject)). Two types of Treatment defining two groups to compare have to be definied.
Replicates are not required. The time points for compared treatment groups should be identical.
User has to define number of degrees of freedom (df) for the spline regression model. Choosing effective degrees of freedom in range 3-5 is reasonable.
Genes to plot, given as a vector of characters, can be selected by the user. Provided names have to be a part of a row name vector of eSetObject (rownames(exprs(eSetObject))). If genes to plot are not definied, all genes are plotted.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(splineTCDiffExpr)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:BiocGenerics':
normalize, union
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Loading required package: limma
Attaching package: 'limma'
The following object is masked from 'package:BiocGenerics':
plotMA
Loading required package: GSEABase
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following object is masked from 'package:igraph':
compare
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Attaching package: 'IRanges'
The following object is masked from 'package:igraph':
simplify
Loading required package: XML
Loading required package: graph
Attaching package: 'graph'
The following object is masked from 'package:XML':
addNode
The following objects are masked from 'package:igraph':
degree, edges, intersection
Loading required package: gtools
Attaching package: 'gtools'
The following object is masked from 'package:igraph':
permute
Loading required package: splines
Loading required package: GeneNet
Loading required package: corpcor
Loading required package: longitudinal
Loading required package: fdrtool
Loading required package: FIs
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/splineTCDiffExpr/splinePlot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: splinePlot
> ### Title: Plot spline regression curves of time-course data
> ### Aliases: splinePlot
> ### Keywords: spline time-course data
>
> ### ** Examples
>
> ## load "eSetObject" object containing simulated time-course data
> data(TCsimData)
> pData(TCsimData)
SampleName Time Treatment Replicate
1 T1_1_A 1 T1 A
2 T1_4_A 4 T1 A
3 T1_8_A 8 T1 A
4 T1_16_A 16 T1 A
5 T1_24_A 24 T1 A
6 T1_32_A 32 T1 A
7 T1_40_A 40 T1 A
8 T1_48_A 48 T1 A
9 T1_1_B 1 T1 B
10 T1_4_B 4 T1 B
11 T1_8_B 8 T1 B
12 T1_16_B 16 T1 B
13 T1_24_B 24 T1 B
14 T1_32_B 32 T1 B
15 T1_40_B 40 T1 B
16 T1_48_B 48 T1 B
17 T2_1_A 1 T2 A
18 T2_4_A 4 T2 A
19 T2_8_A 8 T2 A
20 T2_16_A 16 T2 A
21 T2_24_A 24 T2 A
22 T2_32_A 32 T2 A
23 T2_40_A 40 T2 A
24 T2_48_A 48 T2 A
25 T2_1_B 1 T2 B
26 T2_4_B 4 T2 B
27 T2_8_B 8 T2 B
28 T2_16_B 16 T2 B
29 T2_24_B 24 T2 B
30 T2_32_B 32 T2 B
31 T2_40_B 40 T2 B
32 T2_48_B 48 T2 B
>
> ## define function parameters
> df <- 3
> reference <- "T1"
> toPlot <- rownames(TCsimData)[1:10]
>
> splinePlot(eSetObject = TCsimData, df, reference, toPlot)
>
>
>
>
>
> dev.off()
null device
1
>