getIc {BioTIP} | R Documentation |
retreive Ic scores (Pearson correlation of genes / Pearson correlation of samples) for the identified BioTiP
getIc(counts, sampleL, genes, output = c("Ic", "PCCg", "PCCs"))
counts |
A numeric matrix or data frame. The rows and columns represent unique transcript IDs (geneID) and sample names, respectively. |
sampleL |
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'. |
genes |
A character vector consisting of unique BioTiP ids. This can be obtained from |
output |
A string. Please select from 'Ic', 'PCCg', or 'PCCs'. Uses 'Ic' by default. 'PCCg' is the PCC between genes (numerator) and 'PCCs' is PCC between samples (denominator) |
A list of numeric values, whose length and names are inherited from sampleL
Zhezhen Wang zhezhen@uchicago.edu
counts = matrix(sample(1:100,27),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']) BioTiP = c('loci1','loci2') Ic = getIc(counts,samplesL,BioTiP)