splinePlot: Plot spline regression curves of time-course data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/splinePlot.R


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.


splinePlot(eSetObject, df, reference, toPlot="all")



ExpressionSet object of class ExpressionSet containing log-ratios or log-values of expression for a series of microarrays


number of degrees of freedom


character defining which treatment group should be considered as reference


vector of genes to plot; defalut is toPlot = "all"


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.


A .pdf file containing plots for chosen genes.


Agata Michna

See Also



## load "eSetObject" object containing simulated time-course data

## define function parameters 
df <- 3
reference <- "T1"
toPlot <- rownames(TCsimData)[1:10]

splinePlot(eSetObject = TCsimData, df, reference, toPlot)

Example output

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, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, 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,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

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, path, union

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':


Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':


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:base':


Loading required package: XML
Loading required package: graph

Attaching package: 'graph'

The following object is masked from 'package:XML':


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':


Loading required package: splines
Loading required package: GeneNet
Loading required package: corpcor
Loading required package: longitudinal
Loading required package: fdrtool
Loading required package: FIs
   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

splineTimeR documentation built on Nov. 8, 2020, 6:52 p.m.