getMCI {BioTIP} | R Documentation

## Calculating MCI Scores

### Description

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).

### Usage

    getMCI(groups, countsL, adjust.size = FALSE)

### Arguments

`groups` | A list of elements whose length is the member of states. The elements could be either be vectors or `communities` object of the R package `igraph`. If a vector, it is the output of the function `getCluster_methods`. The names of each vector are the pre-selected transcript IDs generated by the function `sd_selection`. Each vector, whose length is the number of pre-selected transcripts in a state, contains the module IDs. If a `communities` object, it can be obtained by `getCluster_methods` using the "rw" method. It is also an output of the function `sd_selection`.
`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.

### Value

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 pairwised Pearson Correlation Coefficient calculated among the loci in a module.

- PCCo: Mean of pairwised Pearson Correlation Coefficient calculated between the loci in a module and the loci outside that module but inside the same state.

### Author(s)

Zhezhen Wang zhezhen@uchicago.edu

### Examples

    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)

[Package BioTIP version 1.0.0 Index]