ARTIVAsubnetAnalysis: Function to estimate a regulatory time-varying network from...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/ARTIVAsubnetAnalysis.R

Description

This function estimates a regulatory time-varying network from the output of function ARTIVAsubnet. A graphical representation in a pdf file and estimated values are provided in text files. This function is used in function ARTIVAsubnet when parameter segmentAnalysis=TRUE. This function can be used separately for re-computing a time-varying network from the output of function ARTIVAsubnet with new analysis parameters segMinLength, edgesThreshold, CPpos, layout, ... see detail below.

Usage

1
2
3
4
5
6
ARTIVAsubnetAnalysis(ARTIVAsubnet=NULL, CPpostDist=NULL, CPsamples=NULL,
coefSamples=NULL, TFnumber=NULL, segMinLength=2, edgesThreshold=0.5,
burn_in=NULL, CPpos=NULL,targetData=NULL, parentData=NULL,
targetName=NULL,parentNames=NULL, savePictures=TRUE,saveEstimations=TRUE,
outputPath=NULL,layout="fruchterman.reingold", silent=FALSE,
inARTIVAsubnet=FALSE , onepage= FALSE)

Arguments

ARTIVAsubnet

Ouput of function ARTIVAsubnet, a list containing Samples, Counters, CPpostDist, nbSegs, SegmentPostDist, network, ... (optional, default: ARTIVAsubnet=NULL, if ARTIVAsubnet=NULL then parameters CPpostDist, CPsamples, coefSamples, TFnumber must be not null.

CPpostDist

A list of 2 tables : 1)CPpostDist$CPnumberPostDist: A table containing the distribution for the number of CPs approximated with ARTIVAsubnet. 2)CPpostDist$CPpositionPostDist: A table containing the distribution for the position of the CPs approximated with ARTIVAsubnet. (optional, default: CPpostDist=NULL, but CPpostDist must be given when parameter ARTIVAsubnet=NULL)

CPsamples

A matrix with the different iterations (in row) performed with the ARTIVAsubnet function and in column the identified positions for CPs. (optional, default: CPsamples=NULL, but CPsamples must be given when parameter ARTIVAsubnet=NULL)

coefSamples

A matrix with the different (in row)performed with the ARTIVAsubnet function and in column the coefficient values corresponding to the identified regulatory interactions. (optional, default: coefSamples=NULL, but coefSamples must be given when parameter ARTIVAsubnet=NULL)

TFnumber

Number of parent genes in the data parentData used in the ARTIVAsubnet function. (optional, default: TFnumber=NULL, but TFnumber must be given when parameter ARTIVAsubnet=NULL)

segMinLength

Minimal length (number of time points) to define a temporal segment. Must be - strictly - greater than 1 if there is no repeated measurements for each time point in arguments targetData and parentData (optional, default: segMinLength=2).

edgesThreshold

Probability threshold for the selection of the edges of the time-varying regulatory network when segmentAnalysis=TRUE (optional, default: edgesThreshold=0.5).

burn_in

Number of initial iterations that are discarded for the estimation of the model distribution (posterior distribution). The ARTIVAsubnet function is a RJ-MCMC algorithm which, at each iteration, randomly samples a new configuration of the time-varying regulatory network from probability distributions based on constructing a Markov chain that has the network model distribution as its equilibrium distribution (The equilibrium distribution is obtained when the Markov Chain converges, which requires a large number of iterations). Typically, initial iterations are notconfident because the Markov Chain has not stabilized. The burn-in samples allow to not consider these initial iterations in the final analysis (optional, default: burn_in=NULL, if burn_in=NULL then the first 25% of the iterations is left for burn_in).

CPpos

A table containing the desired most significant CP positions (optional, default: CPpos=NULL, if CPpos=NULL then CPpos is evaluated as in CP.postDist function. )

targetData

A vector with the temporal gene expression measurements for the target gene (i.e. the gene whose regulation factors are looked for). (optional, default: targetData=NULL, if not null then the target data is plotted).

parentData

A matrix (or a vector if only 1 parent gene) with the temporal gene expression measurements for the proposed parent genes (i.e. potential regulation factors). Parent genes are shown in row and expression values in column. (optional, default: parentData=NULL, if not null then the parent data is plotted).

targetName

Name of the target gene (optional, default: targetName="Target").

parentNames

A vector with the names for parent gene(s) (optional, default: parentNames=NULL).

savePictures

Boolean, if TRUE all estimated posterior distributions and networks are plotted in a pdf file either in a new sub folder named "ARTIVA_Results" created by default in the current folder or in a folder specified with argument outputPath (see below) (optional, default: savePictures=TRUE).

saveEstimations

Boolean, if TRUE all estimated posterior distributions are saved as text files either in a new sub folder named "ARTIVA_Results" created by default in the current folder or in a folder specified with argument outputPath (see below) (optional, default: saveEstimations=TRUE).

outputPath

File path to a folder in which the output results have to be saved, either a complete path or the name of a folder to be created in the current directory (optional, default: outputPath=NULL).

layout

Name of the function determining the placement of the vertices for drawing a graph, possible values among others: "random", "circle", "sphere",

"fruchterman.reingold", "kamada.kawai", "spring",

"reingold.tilford", "fruchterman.reingold.grid", see package igraph0 for more details (default: layout="fruchterman.reingold").

silent

Boolean, if TRUE messages are printed along the ARTIVA procedure (optional, default: silent=FALSE).

inARTIVAsubnet

Boolean, if TRUE, general information already printed in function ARTIVAsubnet are not printed a second time (optional, default: inARTIVAsubnet=FALSE).

onepage

Boolean, if TRUE, all output pictures are plotted on one page only (optional, default: onepage=FALSE.

Value

nbSegs

An integer equal to the number of temporal segments with the largest value observed in the CP number posterior distribution (from CPpostDist$CPnumberPostDist).

CPposition

A table containing the most significant CP positions that delimit nbSegs temporal segments, according to CPnumber, CPposition and segMinLength (if parameter dyn=1, first CP is 2 and final CP is n+1, where n is the number of time points).

SegmentPostDist

Output of function segmentModel.postDist. A list of tables:

1) SegmentPostDist$CPpos: A table containing the most significant CP positions that delimit nbSegs temporal segments, according to CPpostDist$CPnumber, CPpostDist$CPposition and segMinLength (if parameter dyn=1, first CP is 2 and final CP is n+1, where n is the number of time points).

2) SegmentPostDist$edgesPostDist: A table containing the approximate posterior distribution for the incoming edges (regulatory interaction between parent and target genes) for each temporal segment delimited by the CP given in SegmentPostDist$CPpos (see previously). Each raw corresponds to a segment, ordered by time.

3) SegmentPostDist$edgesCoeff A table containing the estimated coefficients for the incoming edges (regulatory interaction between parent and target genes) for each temporal segment delimited by the CP given in SegmentPostDist$CPpos (see previously). Each raw corresponds to a segment, ordered by time.

network

A table containing the information to plot (see function traceNetworks) the network estimated with the ARTIVAsubnet procedure.

Author(s)

S. Lebre and G. Lelandais

References

S. Lebre, J. Becq, F. Devaux, M. P. H. Stumpf, G. Lelandais (2010) Statistical inference of the time-varying structure of gene-regulation networks BMC Systems Biology, 4:130.

See Also

ARTIVAsubnet, ARTIVAnet, traceNetworks, traceGeneProfiles, CP.postDist, plotCP.postDist.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Load the ARTIVA R package
library(ARTIVA)

# Load the dataset with simulated gene expression profiles
data(simulatedProfiles)

# Name of the target gene to be analyzed with ARTIVA 
targetGene = 1

# Names of the parent genes (typically transcription factors) 
parentGenes = c("TF1", "TF2", "TF3", "TF4", "TF5")


# Note that the number of iterations in the RJ-MCMC sampling is reduced 
# to 'niter=20000' in this example, but it should be increased (e.g. up to
# 50000) for a better estimation.

# Run the ARTIVAsubnet function
## Not run: 
ARTIVAtest = ARTIVAsubnet(targetData = simulatedProfiles[targetGene,],
  parentData = simulatedProfiles[parentGenes,],
  targetName = targetGene,
  parentNames = parentGenes,
  segMinLength = 2,
  edgesThreshold = 0.6, 
  niter= 20000,
  savePictures=FALSE)

# Re-compute a time-varying network from the output of function 
# ARTIVAsubnet with new analysis parameters
analysis2 = ARTIVAsubnetAnalysis(ARTIVAsubnet=ARTIVAtest,
  segMinLength = 3,
  edgesThreshold = 0.5,
  outputPath="ARTIVAsubnet2",
  savePictures=FALSE)

# Trace the obtained network.
traceNetworks(analysis2$network, edgesThreshold = 0.3)

## End(Not run)

ARTIVA documentation built on May 1, 2019, 6:31 p.m.