R: Data-wise or PC-wise decomposition of gene set scores for all...
decompose.gs.group
R Documentation
Data-wise or PC-wise decomposition of gene set scores for all observations.
Description
Data-wise or PC-wise decomposition of gene set scores (GSS) across all observations. The predefined group/cluster information should be given so that the mean decomposed GSSs for each group are returned and plotted.
An vector or factor to indicate the group of observations, such as clusters.
See examples.
decomp
A charater string either "data" or "pc" to indicate how the gene set scores
should be decomposed (with respect to data or PC.
nf
The number of axes/PCs to be calculated and plotted.
x.legend
Used to control the position of legends.
y.legend
Used to control the position of legends.
plot
A logical indicates if a plot should be drawn.
main
The main title of plot.
...
Other arguments passed to barplot.
Details
This function could be used when the number of observation is large and there
are cluster/group information is available. In this case, the means of
decomposed gene set scores over each group is calculated. The vertical bar
on the end of each bar indicates the 95% confident interval of the means.
Value
Return nothing or a matrix depends on how argument plot is set.
Author(s)
Chen Meng
References
TBA
See Also
See Also decompose.gs.ind
Examples
# library(mogsa)
# loading gene expression data and supplementary data
data(NCI60_4array_supdata)
data(NCI60_4arrays)
# using a list of data.frame as input
mgsa <- mogsa(x = NCI60_4arrays, sup=NCI60_4array_supdata, nf=9,
proc.row = "center_ssq1", w.data = "inertia", statis = TRUE)
colcode <- as.factor(sapply(strsplit(colnames(NCI60_4arrays$agilent), split="\."), "[", 1))
decompose.gs.group(x = mgsa, gs = 2, group = colcode, decomp = "data", plot = TRUE)
decompose.gs.group(x = mgsa, gs = 2, group = colcode, decomp = "pc", nf = 3, plot = TRUE)
Results
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(mogsa)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/mogsa/decompose.gs.group.Rd_%03d_medium.png", width=480, height=480)
> ### Name: decompose.gs.group
> ### Title: Data-wise or PC-wise decomposition of gene set scores for all
> ### observations.
> ### Aliases: decompose.gs.group
>
> ### ** Examples
>
> # library(mogsa)
> # loading gene expression data and supplementary data
> data(NCI60_4array_supdata)
> data(NCI60_4arrays)
>
> # using a list of data.frame as input
> mgsa <- mogsa(x = NCI60_4arrays, sup=NCI60_4array_supdata, nf=9,
+ proc.row = "center_ssq1", w.data = "inertia", statis = TRUE)
>
> colcode <- as.factor(sapply(strsplit(colnames(NCI60_4arrays$agilent), split="\."), "[", 1))
> decompose.gs.group(x = mgsa, gs = 2, group = colcode, decomp = "data", plot = TRUE)
> decompose.gs.group(x = mgsa, gs = 2, group = colcode, decomp = "pc", nf = 3, plot = TRUE)
>
>
>
>
>
> dev.off()
null device
1
>