generateNetwork(nem)
generateNetwork()所属R语言包:nem
Random networks and data sampling
随机网络和数据采样
译者:生物统计家园网 机器人LoveR
描述----------Description----------
1. Random network generation; 2. sampling of data from a given network topology
1。随机网络生成2。从一个给定的网络拓扑结构的数据采集
用法----------Usage----------
sampleRndNetwork(Sgenes, scaleFree=TRUE, gamma=2.5, maxOutDegree=length(Sgenes), maxInDegree=length(Sgenes), trans.close=TRUE, DAG=FALSE)
sampleData(Phi, m, prob=NULL, uninformative=0, type="binary", replicates=4, typeI.err=0.05, typeII.err=0.2, alpha=sample(seq(0.1,0.9,by=0.1),ncol(Phi),replace=TRUE), beta=sample(5:50,ncol(Phi),replace=TRUE), lambda=matrix(sample(seq(0.01,0.49,by=0.01),ncol(Phi)*2,replace=TRUE),ncol=2), meansH1=rep(0.5, ncol(Phi)), meansH0=rep(-0.5, ncol(Phi)), sdsH1=sample(seq(0.1,1,by=0.1),ncol(Phi),replace=TRUE), sdsH0=sample(seq(0.1,1,by=0.1),ncol(Phi),replace=TRUE))
参数----------Arguments----------
参数:Sgenes
character vector of S-genes
特征向量的S基因
参数:scaleFree
should the network topology be scale free?
网络拓扑是无尺度?
参数:gamma
for scale free networks: out-degrees of nodes are sampled from \frac{1}{Z} * (0:maxOutDegree)^{-γ}, where Z is a normalization factor
无标度网络节点的出度采样\frac{1}{Z} * (0:maxOutDegree)^{-γ},其中Z是一个标准化的因素
参数:maxOutDegree
maximal out-degree of nodes
节点的最大出度
参数:maxInDegree
maximal in-degree of nodes prior to transitive closure
最大程度在节点之前的传递闭包
参数:trans.close
Should the transitive closure of the graph be returned? Default: TRUE
应图的传递闭包回来了吗?默认:true
参数:DAG
Should only DAGs be sampled? Default: FALSE
应进行采样唯一的DAG?默认值:FALSE
参数:Phi
adjacency matrix
邻接矩阵
参数:m
number of E-genes to sample
电子商务基因样本数
参数:prob
probability for each S-gene to get an E-gene attached
每个S基因的概率获得附加一个E基因
参数:uninformative
additional number of uninformative E-genes, i.e. E-genes carrying no information about the nested structure
额外电子的无意义的基因,即E基因携带没有嵌套结构的信息
参数:type
"binary" = binary data; "density" = log 'p-value' densities sampled from beta-uniform mixture model; "lodds" = log odds sampled from two normal distributions
“二进制”=二进制数据,“密度”=logp值β-均匀混合模型采样密度;“lodds”=log赔率从两个正态分布抽样
参数:replicates
number of replicate measurements to simulate for binary data
重复测量的数字模拟二进制数据
参数:typeI.err
simulated type I error for binary data
模拟I类错误的二进制数据
参数:typeII.err
simulated type II error for binary data
二进制数据的模拟II型错误
参数:alpha
parameter for Beta(α,1) distribution: one parameter per S-gene
Beta(α,1)分布的参数:每一个基因的S-参数
参数:beta
parameter for Beta(1,β) distribution: one parameter per S-gene
Beta(1,β)分布的参数:每一个基因的S-参数
参数:lambda
mixing coefficients for beta-uniform mixture model of the form: λ_1 + λ_2*Beta(α,1) + λ_3*Beta(1,β). There is a vector of 3 mixing coefficients per model and one model per S-gene.
混合系数β-均匀混合模型的形式为:λ_1 + λ_2*Beta(α,1) + λ_3*Beta(1,β)。有一个3%混合模型系数向量和每一个基因的S-模式。
参数:meansH1
normal distribution means of log odds ratios under the hypothesis of expecting an effect: one mean per S-gene
正态分布是指log胜算比预期效果的假设下:一,平均每S基因
参数:meansH0
normal distribution means of log odds ratios under the null hypothesis: one mean per S-gene
零假设下的log赔率比率正态分布是指:一,平均每S基因
参数:sdsH1
normal distribution standard deviations of log odds values under the hypothesis of expecting an effect: one sd per S-gene
正态分布log赔率下预期效果的假设值的标准偏差:每一个S基因SD
参数:sdsH0
normal distribution standard deviations of log odds values under the null hypothesis: one sd per S-gene
正态分布的零假设下的log赔率值的标准偏差:每一个S基因SD
Details
详情----------Details----------
Random networks are generated as follows: For each S-gene S_{k} we randomly choose the number o of outgoing edges between 0 and maxOutDegree. This is either done uniform randomly or, if scale free networks are created, according to a power law distribution specified by gamma. We then select o S-genes having at most maxInDegree ingoing edge and connected S_{k} to them.
随机网络生成如下:对于每个S-基因S_{k}我们随机选择的数字o的0和maxOutDegree之间传出边缘。这要么是均匀的随机,或如果创建了无标度网络,根据伽玛指定幂律分布。然后,我们选择oS基因在最maxInDegree迁入边缘有连接S_{k}他们。
The function sampleData samples data from a given network topology as follows: We first attach E-genes to S-genes according to the probabilities prob (default: uniform). We then simulate knock-downs of the individual S-genes. For those E-genes, where no effects are expected, values are sampled from a null distribution, otherwise from an alternative distribution. In the simplest case we only sample binary data, where 1 indicates an effect an 0 no effect. Alternatively, we can sample log "p-value" densities according to a beta-uniform mixture model, where the null distribution is uniform and the alternative a mixture of two beta distributions. A third possibility is to sample log odds ratios, where alternative and null distribution are both normal.
函数sampleData样品从给定的网络拓扑结构如下数据:首先,我们重视电子基因到S基因的概率概率(默认是:统一)。然后,我们模拟个别的S-基因敲落。对于这些电子的基因,没有预期效果,值从一个空分布采样,否则从其他分销。在最简单的情况下,我们只品尝二进制数据,其中1表示0没有效果的影响。另外,我们也可以抽样登录“p值”的密度,根据统一的β-混合模型,空分布均匀和两个β分布的混合物替代。第三种可能性是品尝log胜算比,替代品和空分布均正常。
值----------Value----------
For sampleRndNetwork an adjacency matrix, for sampleData a data matrix, for sampleData.BN a data matrix and a linking of effects to signals.
对于sampleRndNetwork邻接矩阵的sampleData一个数据矩阵,数据矩阵为sampleData.BN和连接信号的影响。
作者(S)----------Author(s)----------
Holger Froehlich <a href="http:/www.dkfz.de/mga2/people/froehlich">http:/www.dkfz.de/mga2/people/froehlich</a>, Cordula Zeller
参见----------See Also----------
getDensityMatrix
getDensityMatrix
举例----------Examples----------
Phi = sampleRndNetwork(paste("S",1:5,sep=""))
D = sampleData(Phi, 100, type="density")$D
plot(as(transitive.reduction(Phi),"graphNEL"), main="original graph")
x11()
plot.nem(nem(D, control=set.default.parameters(unique(colnames(D)), type="CONTmLLBayes")), transitiveReduction=TRUE, SCC=FALSE, main="inferred graph")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|