R: Function to estimate a regulatory time-varying network from...
ARTIVAsubnetAnalysis
R Documentation
Function to estimate a regulatory time-varying network from the
output of function ARTIVAsubnet.
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.
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.
# 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)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ARTIVA)
Loading required package: MASS
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Loading required package: gplots
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ARTIVA/ARTIVAsubnetAnalysis.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ARTIVAsubnetAnalysis
> ### Title: Function to estimate a regulatory time-varying network from the
> ### output of function ARTIVAsubnet.
> ### Aliases: ARTIVAsubnetAnalysis
> ### Keywords: DBN inference network inference graphical model time series
>
> ### ** Examples
>
> # 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:
> ##D ARTIVAtest = ARTIVAsubnet(targetData = simulatedProfiles[targetGene,],
> ##D parentData = simulatedProfiles[parentGenes,],
> ##D targetName = targetGene,
> ##D parentNames = parentGenes,
> ##D segMinLength = 2,
> ##D edgesThreshold = 0.6,
> ##D niter= 20000,
> ##D savePictures=FALSE)
> ##D
> ##D # Re-compute a time-varying network from the output of function
> ##D # ARTIVAsubnet with new analysis parameters
> ##D analysis2 = ARTIVAsubnetAnalysis(ARTIVAsubnet=ARTIVAtest,
> ##D segMinLength = 3,
> ##D edgesThreshold = 0.5,
> ##D outputPath="ARTIVAsubnet2",
> ##D savePictures=FALSE)
> ##D
> ##D # Trace the obtained network.
> ##D traceNetworks(analysis2$network, edgesThreshold = 0.3)
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>