getMCI | R Documentation |
This function calculates a module critical index (MCI) score for
each module per state within a dataset. Each module is a cluster of
transcripts generated from the function getCluster_methods
.
Note that a dataset should contains three or more states (samples in
groups).
getMCI(
groups,
countsL,
adjust.size = FALSE,
fun = c("cor", "BioTIP"),
df = NULL
)
groups |
A list of elements whose length is the member of states. The
elements could be either be vectors or |
countsL |
A list of x numeric count matrices or x data frame, where x is the number of states. |
adjust.size |
A Boolean value indicating if MCI score should be adjusted by module size (the number of transcripts in the module) or not. Default FALSE. This parameter is not recommended for fun=BioTIP. |
fun |
A character chosen between ("cor", "BioTIP"), indicating where an adjusted correlation matrix will be used to calculate the MCI score. |
df |
NULL or a numeric matrix or data frame, where rows and columns represent
unique transcript IDs (geneID) and sample names, respectively.
Used only when |
A list of five elements (members, MCI, Sd, PCC, and PCCo). Each of
element is a two-layer nested list whose length is the length of the input
object groups
. Each internal nested list is structured according to
the number of modules identified in that state.
members: vectors of unique ids
MCI: the MCI score
sd: standard deviation
PCC: Mean of pairwise Pearson Correlation Coefficient calculated among the loci in a module.
PCCo: Mean of pairwise Pearson Correlation Coefficient calculated between the loci in a module and the loci outside that module but inside the same state.
Zhezhen Wang zhezhen@uchicago.edu; Xinan H Yang xyang2@uchicago.edu
test = list('state1' = matrix(sample(1:10, 6), 4, 3), 'state2' =
matrix(sample(1:10, 6), 4, 3), 'state3' = matrix(sample(1:10, 6), 4, 3))
## Assign colnames and rownames to the matrix
for(i in names(test)){
colnames(test[[i]]) = 1:3
row.names(test[[i]]) = c('g1', 'g2', 'g3', 'g4')}
cluster = list(c(1, 2, 2, 1), c(1, 2, 3, 1), c(2, 2, 1, 1))
names(cluster) = names(test)
for(i in names(cluster)){
names(cluster[[i]]) = c('g1', 'g2', 'g3', 'g4')}
membersL_noweight <- getMCI(cluster, test, fun='cor')
names(membersL_noweight)
## [1] "members" "MCI" "sd" "PCC" "PCCo"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.