simulationMCI {BioTIP} | R Documentation

## Get MCI Scores for randomly selected genes

### Description

This function gets the MCI scores for randomly selected features (e.g. transcript ids),

### Usage

    simulationMCI(
      len,
      samplesL,
      df,
      adjust.size = FALSE,
      B = 1000,
      fun = c("cor", "BioTIP")
    )

### Arguments

`len` | An integer that is the length of genes in the CTS (critical transition signal).
`samplesL` | A list of vectors, whose length is the number of states. Each vector gives the sample names in a state. Note that the vector s (sample names) has to be among the column names of the R object 'df'.
`df` | A numeric matrix or dataframe of numerics, factor or character. The rows and columns represent unique transcript IDs (geneID) and sample names, respectively
`adjust.size` | A boolean value indicating if MCI score should be adjust by module size (the number of transcripts in the module) or not. Default FALSE.
`B` | An integer, setting the permutation with `B` runs. Default is 1000.
`fun` | A character chosen between ("cor", "BioTIP"), indicating where an adjusted correlation matrix will be used to calculated the MCI score.

### Value

A numeric matrix indicating the MCI scores of permutation. The dimension (row X column) of this matrix is the length of `samplesL` * `B`.

### Author(s)

Zhezhen Wang zhezhen@uchicago.edu; Xinan H Yang xyang2@uchicago.edu

### Examples

    counts = matrix(sample(1:100, 18), 3, 9)
    colnames(counts) = 1:9
    row.names(counts) = c('loci1', 'loci2', 'loci3')
    cli = cbind(1:9, rep(c('state1', 'state2', 'state3'), each = 3))
    colnames(cli) = c('samples', 'group')
    samplesL <- split(cli[, 1], f = cli[, 'group'])
    simMCI = simulationMCI(2, samplesL, counts, B=2)
    simMCI
    #            [,1]      [,2]
    #state1  2.924194  2.924194
    #state2 20.877138 20.877138
    #state3  2.924194  2.924194

[Package BioTIP version 1.6.0 Index]