simulation_Ic {BioTIP}R Documentation

calculating Ic scores based on simulated loci

Description

simulate x loci B to calculate the Ic score, where x should be the same as the length of identified BioTiP and B is self-defined.

Usage

simulation_Ic(obs.x, sampleL, counts, B = 1000)

Arguments

obs.x

A integer, length of identified BioTiP

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

counts

A numeric matrix or dataframe in which columns are samples and rows are transcripts. Each row needs to have a unique row name (i.e. transcript ID)

B

A integer, setting the permutation with B runs. Default is 1000.

Value

A matrix of y rows and B columns where y is the length of sampleL and B is self-defined. Each column is a set of Ic scores calculated for each state

Author(s)

Zhezhen Wang zhezhen@uchicago.edu

Examples

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'])
simulation_Ic(2,samplesL,counts,B =3)

[Package BioTIP version 1.0.0 Index]