CalculateTPI builds a TPI database for the TDCOR main function to prune triangle motifs
CalculateTPI(dataset,l_genes, l_prior, times, time_step, N, ks_int, kd_int,
delta_int, noise, delay)l_prior vector, the user defines which genes should be regarded as positive regulators, which others as negative regulators and which can only be targets. The prior code is defined as follow: -1 for negative regulator; 0 for non-regulator (target only); 1 for positive regulator; 2 for both positive and negative regulator. The i-th element of the vector is the prior to associate to the i-th gene in l_genes.
N should be >5000.
noise should not be too high (for instance below 0.2).
CalculateTPI returns a list object.
l_genes; The element named gene i contains 0 if no probability distribution has been
calculated for this gene (because its prior is 0) or a positive integer if this has been done. This positive integer then correponds to the number of the element in the list
prob_TPI that stores the spline functions of the calculated conditional probability distributions associated with this particular regulator.prob_TPI is stored in the prob_TPI_ind vector.CalculateTPI models three 3-genes networks showing slightly different topologies. Each network topology is modelled using a specific system of delay differential equations. For all genes listed in l_genes whose corresponding prior in l_prior is not null (i.e. the genes that are regarded as transcriptional regulators), the three systems of differential equations are solved N times with N different sets of random parameters. The Triangle Pruning Index (TPI) is calculated for all of
these 3N networks. From these in silico data the conditional probability distribution of the TPI index given the regulator and the topology can be estimated. The probability distribution of the topology given TPI and the regulator is next calculated using Bayes' theorem and returned by the function. These shall be used when reconstructing the network to prune the "triangle" motifs.
CalculateTPI returns a list object which works as a database. It not only stores the calculated probability distributions but also information on how to access the data, and the input parameters. The latter are read by the UpdateTPI function to update the database.
UpdateTPI, TDCor-package.
## Not run:
# # Load the lateral root transcriptomic dataset
# data(LR_dataset)
#
# # Load the vectors of gene codes, gene names and prior
# data(l_genes)
# data(l_names)
# data(l_prior)
#
# # Load the vector of time points for the the lateral root dataset
# data(times)
#
# # Generate a small TPI database (3 genes)
#
# TPI_example=CalculateTPI(dataset=LR_dataset,l_genes=l_genes[4:6],
# l_prior=l_prior[4:6],times=times,time_step=1,N=5000,ks_int=c(0.5,3),
# kd_int=c(0.5,3),delta_int=c(0.5,3),noise=0.1,delay=3)
# ## End(Not run)
Run the code above in your browser using DataLab