plotPat.TcGSA(x, threshold = 0.05, myproc = "BY", nbsimu_pval = 1e+06, expr, Subject_ID, TimePoint, baseline = NULL, only.signif = TRUE, 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", methodOptiClust = "firstSEmax", verbose = TRUE, clust_trends = NULL, N_clusters = NULL, myclusters = NULL, label.clusters = NULL, prev_rowCL = NULL, descript = TRUE, plotAll = TRUE, color.vec = c("darkred", "#D73027", "#FC8D59", "snow", "#91BFDB", "#4575B4", "darkblue"), legend.breaks = NULL, label.column = NULL, time_unit = "", cex.label.row = 1, cex.label.column = 1, margins = c(5, 25), heatKey.size = 1, dendrogram.size = 1, heatmap.height = 1, heatmap.width = 1, cex.clusterKey = 1, cex.main = 1, horiz.clusterKey = TRUE, main = NULL, subtitle = NULL, ...)Bonferroni",
"Holm", "Hochberg", "SidakSS", "SidakSD",
"BH", "BY", "ABH", "TSBH" or "none".
"none" indicates no adjustement for multiple testing. See
mt.rawp2adjp for details. Default is
"BY", the Benjamini & Yekutieli (2001) step-up FDR-controlling
procedure (general dependency structures). In order to control the FWER(in
case of an analysis that is more a hypothesis confirmation than an
exploration of the expression data), we recommand to use "Holm", the
Holm (1979) step-down adjusted p-values for strong control of the FWER.1e+06.'Estimations' element of TcGSA.LR. See Details.expr (when it is a dataframe) and that contains the patient
identifier of each sample.Subject_ID and the columns of expr (when it
is a dataframe), and that contains the time points at which gene expression
was measured.TimePoint
used as baseline.FALSE, all the gene sets from the gmt object contained in
x are plotted. Default is TRUE.Timepoint,
Subject_ID, sample_name 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. See
Details.Timepoint, Subject_ID, sample_name,
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.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 statistics function defined that returns a single
numeric value. It specifies the function used to aggregate the observations
before the clustering. Default is to median. Default is
"median"."globalmax", "firstmax",
"Tibs2001SEmax", "firstSEmax" and "globalSEmax".
Default is "firstSEmax". See 'method' in
clusGap, Details and Tibshirani et al.,
2001 in References.TRUE.NULL.NULL, in which case
the dendrogram is not cut and no clusters are identified.N_clusters.
Default is NULL, in which case the clusters are automatically
identified and colored via the cutree function and the
N_clusters argument only.N_clusters is not NULL, a character
vector of length N_clusterss. Default is NULL, in which case
if N_clusters is not NULL, clusters are simply labelled with
numbers.NULL, no
clustering is calculated by the present plotting function and this tree is
used to represent the gene sets dynamics. Default is NULL.TRUE.
Default is TRUE. See Details.TRUE.c("#D73027", "#FC8D59","lightyellow", "#91BFDB", "#4575B4").NULL, in which case the break points will be
spaced equally and symetrically about 0.NULL."Y",
"M", "W", "D", "H", etc) next to the values of
TimePoint in the columns labels when label.column is
NULL. Default is "".1.1.par(mar= *)) for column and row names, respectively. Default
is c(15, 100). See Details.1.1111,
when N_clusters is not NULL.1.TRUE, set the legend for
clusters horizontally rather than vertically. Only used if the
N_clusters argument is not NULL. Default is TRUE.NULL.NULL.merge describes the merging of clusters at step i of the clustering.
If an element $j$ in the row is negative, then observation -$j$ was
merged at this stage. If $j$ is positive then the merge was with the
cluster formed at the (earlier) stage $j$ of the algorithm. Thus
negative entries in merge indicate agglomerations of singletons, and positive
entries indicate agglomerations of non-singletons.
hclust(d = dist(map2heat, method = "euclidean"), method = "ward.D2")
plot is FALSE, then it is
NULL.
N_clusters.
If no clusters were represented, than this is NULL.
heatmap.2.
GeneSet: the gene sets
clustered. Cluster: the cluster they belong to. Cluster.
First a heatmap is computed on all the patients (see plot.TcGSA
and clustTrend) to define the clustering. Then, the clustering
and coloring thus defined on all the patients are consistently used in the
separate heatmaps that are plotted by patient.
If 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 descript is FALSE, the second element of margins can
be reduced (for instance use margins = c(5, 10)), as there is not so
much need for space in order to display only the gene set names, without
their description.
The median shown in the heatmap uses the respectively standardized (reduced and centered) expression of the genes over the patients.
plot.TcGSA, heatmap.2,
TcGSA.LR, hclust
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)
plotPat.TcGSA(x=tcgsa_sim_1grp, expr=expr_1grp,
Subject_ID=design$Patient_ID, TimePoint=design$TimePoint,
B=100,
time_unit="H"
)
plotPat.TcGSA(x=tcgsa_sim_1grp, expr=tcgsa_sim_1grp$Estimations,
Subject_ID=design$Patient_ID, TimePoint=design$TimePoint,
baseline=1,
B=100,
time_unit="H"
)
Run the code above in your browser using DataLab