plotSelect.GS(expr, gmt, Subject_ID, TimePoint, geneset.names.select, Subject_ID.select, display = "one subject per page", baseline = NULL, group.var = NULL, Group_ID_paired = NULL, ref = NULL, group_of_interest = NULL, FUNcluster = NULL, clustering_metric = "euclidian", clustering_method = "ward", B = 500, max_trends = 4, aggreg.fun = "median", trend.fun = "median", methodOptiClust = "firstSEmax", verbose = TRUE, clustering = TRUE, time_unit = "", title = NULL, y.lab = NULL, desc = TRUE, lab.cex = 1, axis.cex = 1, main.cex = 1, y.lab.angle = 90, x.axis.angle = 45, y.lim = NULL, x.lim = NULL, gg.add = list(theme()))'Estimations' element of TcGSA.LR. See Details.GSA.read.gmt and
definition on www.broadinstitute.org.expr (when it is a dataframe) and that contains the patient
identifier of each sample.TimePoint and the columns of expr (when it is
a dataframe), and that contains the time points at which gene expression was
measured."geneset.names" element of
gmt.Subject_ID vector."one GS per page", "one subject per page", "median over selected patients".
Default is "one subject per page".TimePoint
that can be used as a baseline. Default is NULL, in which case no
timepoint is used as a baseline value for gene expression. Has to be
NULL when comparing two treatment groups.Timepoint,
Subject_ID and the columns of expr. It indicates to which
treatment group each sample belongs to. Default is NULL, which means
that there is only one treatment group.Timepoint, Subject_ID, group.var and the
columns of expr. This argument must not be NULL in the case of
a paired analysis, and must be NULL otherwise. Default is
NULL.NULL, which means that reference is the
first group in alphabetical order of the labels of group.var. See
Details.NULL,
which means that group of interest is the second group in alphabetical order
of the labels of group.var.x and as second argument the number of clusters desired k, and
which returns a list with a component named 'cluster' which is a
vector of length n = nrow(x) of integers in 1:k, determining the clustering
or grouping of the n observations. Default is NULL, in which case a
hierachical clustering is performed via the function
agnes, using the metric clustering_metric
and the method clustering_method. See 'FUNcluster' in
clusGap and Details.FUNcluster is NULL. The currently available
options are "euclidean" and "manhattan". Default is
"euclidean". See agnes. Also, a "sts" option
is available in TcGSA. It implements the 'Short Time Series' distance
[Moller-Levet et al., Fuzzy CLustering of short time series and unevenly distributed
sampling points, Advances in Intelligent Data Analysis V:330-340 Springer, 2003]
designed specifically for clustering time series.FUNcluster is
NULL. The six methods implemented are "average" ([unweighted
pair-]group average method, UPGMA), "single" (single linkage),
"complete" (complete linkage), "ward" (Ward's method),
"weighted" (weighted average linkage). Default is "ward". See
agnes.500. See
clusGap.4."mean", "median"
or the name of any other defined statistics function that returns a single
numeric value. It specifies the function used to aggregate the observations
before the clustering. Default is to median."mean", "median" or
the name of any other function that returns a single numeric value. It
specifies the function used to calculate the trends of the identified
clustered. Default is to median."globalmax", "firstmax",
"Tibs2001SEmax", "firstSEmax" and "globalSEmax".
Default is "firstSEmax". See 'method' in
clusGap, Details and Tibshirani et al.,
2001 in References.TRUE.FALSE, there is no clustering
representation; if TRUE, the lines are colored according to which
cluster they belong to. Default is TRUE. See Details."Y",
"M", "W", "D", "H", etc) next to the values of
TimePoint on the x-axis. Default is "".NULL, a
title is automatically generated, if "", no title appears. Default is
NULL.NULL, an
annotation is automatically generated, if "", no annotation appears. Default is
NULL.TRUE, a line is added to the title of
the plot with the description of the gene set plotted (from the gmt file).
Default is TRUE.1.1.1.90.
See element_text.45.plot.default.xlim.list(theme()), which adds nothing
to the plot.ProbeID which contains the IDs of the probes of the plotted gene set.
Cluster which to which cluster the probe belongs to.
clustering is FALSE, then Cluster is NA for all the probes.
expr is a matrix or a dataframe, then the "original" data are
plotted. On the other hand, if expr is a list returned in the
'Estimations' element of TcGSA.LR, then it is those
"estimations" made by the TcGSA.LR function that are plotted.If indiv is 'genes', then each line of the plot is the median of a
gene expression over the patients. On the other hand, if indiv is
'patients', then each line of the plot is the median of a patient genes
expression in this gene set.
This function uses the Gap statistics to determine the optimal number of
clusters in the plotted gene set. See
clusGap.
ggplot, clusGap
## Not run:
# data(data_simu_TcGSA)
# tcgsa_sim_1grp <- TcGSA.LR(expr=expr_1grp, gmt=gmt_sim, design=design,
# subject_name="Patient_ID", time_name="TimePoint",
# time_func="linear", crossedRandom=FALSE)
# ## End(Not run)
## Not run:
# plotSelect.GS(expr=tcgsa_sim_1grp$Estimations, TimePoint=design$TimePoint,
# Subject_ID=design$Patient_ID, gmt=gmt_sim,
# geneset.names.select=c("Gene set 3", "Gene set 4", "Gene set 5"),
# Subject_ID.select=c("P1", "P2"),
# display="one GS per page",
# time_unit="H",
# lab.cex=0.7
# )
# ## End(Not run)
## Not run:
# plotSelect.GS(expr=tcgsa_sim_1grp$Estimations, TimePoint=design$TimePoint,
# Subject_ID=design$Patient_ID, gmt=gmt_sim,
# geneset.names.select=c("Gene set 3", "Gene set 4", "Gene set 5"),
# Subject_ID.select=c("P1", "P2"),
# display="one subject per page",
# time_unit="H",
# lab.cex=0.7
# )
# ## End(Not run)
Run the code above in your browser using DataLab