plotFit.GS {TcGSA} | R Documentation |
Plotting function for exploring the fitness of the mixed modeling used in TcGSA
Description
This function plots graphs informing on the fit of the mixed modeling of the gene expression performed in TcGSA, for 1 or several gene sets.
Usage
plotFit.GS(
x,
expr,
design,
subject_name = "Patient_ID",
time_name = "TimePoint",
colnames_ID,
plot_type = c("Fit", "Residuals Obs", "Residuals Est", "Histogram Obs"),
GeneSetsList,
color = c("genes", "time", "subjects"),
marginal_hist = TRUE,
gg.add = list(theme())
)
Arguments
x |
a tcgsa object for |
expr |
a matrix or dataframe of gene expression. Its dimension are
|
design |
a matrix or dataframe containing the experimental variables that used in the model,
namely |
subject_name |
the name of the factor variable from |
time_name |
the name of a numeric variable from |
colnames_ID |
the name of the variable from |
plot_type |
a character string indicating the type of plot to be drawn. The options are
|
GeneSetsList |
a character string containing the names of the gene set whose fit is being checked. If several gene sets are being checked, can be a character list or vector of the names of those gene sets. |
color |
a character string indicating which color scale should be used. One of the 3 :
|
marginal_hist |
a logical flag indicating whether marginal histograms should be drawn.
Only used for |
gg.add |
A list of instructions to add to the |
Author(s)
Boris P. Hejblum
References
Hejblum BP, Skinner J, Thiebaut R, (2015) Time-Course Gene Set Analysis for Longitudinal Gene Expression Data. PLOS Comput. Biol. 11(6):e1004310. doi: 10.1371/journal.pcbi.1004310
See Also
Examples
if(interactive()){
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)
plotFit.GS(x=tcgsa_sim_1grp, expr=expr_1grp, design=design,
subject_name="Patient_ID", time_name="TimePoint",
colnames_ID="Sample_name",
plot_type="Residuals Obs",
GeneSetsList=c("Gene set 1", "Gene set 2", "Gene set 3",
"Gene set 4", "Gene set 5"),
color="genes", gg.add=list(guides(color=FALSE))
)
plotFit.GS(x=tcgsa_sim_1grp, expr=expr_1grp, design=design,
subject_name="Patient_ID", time_name="TimePoint",
colnames_ID="Sample_name",
plot_type="Histogram Obs",
GeneSetsList=c("Gene set 1", "Gene set 5"),
color="genes", gg.add=list(guides(fill=FALSE))
)
plotFit.GS(x=tcgsa_sim_1grp, expr=expr_1grp, design=design,
subject_name="Patient_ID", time_name="TimePoint",
colnames_ID="Sample_name",
plot_type="Histogram Obs",
GeneSetsList=c("Gene set 1", "Gene set 2", "Gene set 3",
"Gene set 4", "Gene set 5"),
color="genes")
}