Description Usage Arguments Details Value Author(s) Examples
View source: R/pipeline.final.R
Compares the distribution of genes in each pathway for two groups of samples that you define.
1 | pathVarTwoSamplesDisc(dat.mat,pways,groups,perc=c(1/3,2/3), test=c("chisq", "exact"),varStat=c("sd", "mean", "mad","cv"))
|
dat.mat |
|
pways |
|
groups |
|
perc |
numeric |
test |
a string, either "exact" or "chisq" which are tests to see if clusters in the 2 samples are sig. different from each other |
varStat |
a string specifying the type of variability summary statistic to perform. The options are "sd", "mean", "mad", or "cv". |
This function splits the samples into two groups that you define. It computes the variability (sd, mad, cv, or mean) for each gene in each group. Then it classifies the genes with respect to the variability in at most 4 clusters. For each pathway, we extract the gene in our dataset and in which cluster they belong. Then for each pathway we look at the gene counts in each category and compare the 2 samples to each other with all the genes from the data set with the Chi-Squared or exact test.
A geneDistributionSet3
object is returned.
Laurence de Torrente, Samuel Zimmerman, Jessica Mar
1 2 3 | # we run the 2 samples analysis on the first 10 pathways from kegg
pways.kegg.10pways <- lapply(pways.kegg, function(x) x[1:10])
results_2samples=pathVarTwoSamplesDisc(bock,pways.kegg.10pways,groups=as.factor(c(rep(1,10),rep(2,10))),perc=c(1/3,2/3),test="exact",varStat="sd")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.