simulationMCI {BioTIP} | R Documentation |
This function gets the MCI scores for randomly selected features (e.g. transcript ids)
simulationMCI(len, samplesL, df, adjust.size = FALSE, B = 1000)
len |
A integer that is the length of BioTiP. |
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 |
A integer, setting the permutation with |
A numeric matrix indicating the MCI scores of permutation. The dimemsion (row * column) of this matrix is the length of samplesL
* B
.
Zhezhen Wang zhezhen@uchicago.edu
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)