Usage Arguments Details Value Author(s) See Also Examples
1 2 | cohesiveness(mx, cl, comb.p.val = "fisher",
method = "complete", trim = 0.01)
|
mx |
a numeric matrix containing the omic dataset, where rows are features and columns are samples. |
cl |
a character vector describing which samples are belonging to each category. |
comb.p.val |
a character indicating if "fisher" or "stouffer" method must be applied to summarize p-values. |
method |
a character indicating if "complete" or "trimmed" mean must be computed. |
trim |
fraction of quantile to be discarded from each tail of omic distributions, if "trimmed" mean is applied to. |
R function to perform a cohesiveness analysis.
This function returns a 'data.frame', including the cohesiveness statistics per feature associated to each category of samples.
FJ Campos-Laborie (fjcamlab@gmail.com)
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Example of omic dataset based on normal distribution data
mx <- t(sapply(seq_len(1000), function(x) rnorm(n = 200, mean = 5, sd = 1)))
## Formatting the example matrix
rownames(mx) <- paste("g", seq_len(1000), sep = "")
colnames(mx) <- paste("s", seq_len(200), sep = "")
## Naming a vector of sample categories
classes <- rep(LETTERS[1:8], c(20, 40, 15, 40, 65, 5, 5, 10))
names(classes) <- colnames(mx)
## Running cohesiveness
resultsCohesiveness <- cohesiveness(mx, classes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.