score.hmm(rphast)
score.hmm()所属R语言包:rphast
Score an alignment using a general phylo-HMM
对齐使用一般phylo-HMM得分
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Produce likelihood of an alignment given a phylo-HMM, posterior probabilities of phylo-HMM states across an alignment,
生产的可能性对准给定的一个phylo-HMM,跨比对后验概率phylo-HMM状态,
用法----------Usage----------
reflect.strand=NULL, features=NULL, quiet=(!is.null(features)))
参数----------Arguments----------
参数:msa
An object of type msa
的对象类型msa,
参数:mod
A list of tree model objects, corresponding to each state in the phylo-HMM
树模型对象的列表,将phylo-HMM的每个状态对应
参数:hmm
An object of type hmm describing transitions between states, equilbrium frequencies, initial frequencies, and optionally end frequencies
对象的类型hmm描述之间的过渡的状态,equilbrium频率,初始频率,和可选的结束频率
参数:states
A vector of characters naming the states of interest in the phylo-HMM, or a vector of integers corresponding to states in the transition matrix. The post.probs will give the probability of any of these states, and the viterbi regions reflect regions where the state is predicted to be any of these states. If NULL, the post.probs will be a data frame with probabilities of each state at each site, and the viterbi algorithm will give the predicted state at every site.
的矢量字符命名的兴趣将phylo-HMM的状态,或相应的过渡矩阵的状态向量的整数。 post.probs会给这些国家的概率,,和维特比区域的反映区域国家预计将是这些国家。如果为NULL,post.probs将是一个数据框的每一个状态的概率在每个站点,在每个站点和维特比算法的预测状态。
参数:viterbi
A logical value indicating whether to predict a path through the phylo-HMM using the Viterbi algorithm.
一个逻辑值,该值指示是否使用维特比算法通过将phylo-HMM预测的路径。
参数:ref.idx
An integer value. Use the coordinate frame of the given sequence. Default is 1, indicating the first sequence in the alignment. A value of 0 indicates the coordinate frame of the entire alignment.
一个整数值。使用的给定序列的坐标框架。默认值是1,表示第一个序列的对齐。值为0表示坐标系的整个路线。
参数:reflect.strand
Given an hmm describing the forward strand, create a larger HMM that allows for features on both strands by "reflecting" the original HMM about the specified states. States can be described as a vector of integers or characters in the same manner as states argument (above). The new hmm will be used for prediction on both strands. NOTE: if reflect.strand is provided, the first state is treated as a "default" state and is implicitly included in the reflect.strand list! Also, reflection is done assuming a reversible model.
给定的HMM描述的正链,创建一个更大的HMM,允许在两条链上的功能“,反映了”原来的指定状态的HMM。状态可以被描述为一个矢量的整数或字符作为状态参数(上述)中相同的方式。在两条链上,将被用于新的HMM的预测。注意:提供,如果reflect.strand的,第一个国家被视为一个“默认”状态,并隐含地包含在reflect.strand列表!另外,反思是一个可逆的模型假设。
参数:features
If non-NULL, compute the likelihood of each feature under the phylo-HMM.
如果非NULL,计算出每个功能的可能性将phylo-HMM。
参数:quiet
If TRUE, suppress printing of progress information.
如果TRUE,抑制打印进度信息。
值----------Value----------
If features is not NULL, returns a numeric vector with one value per feature, giving the likelihood of the feature under the phylo-HMM.
如果features是不是NULL,则返回一个数值向量,每一个值功能,提供的可能性下将phylo-HMM的功能。
Otherwise, returns a list with some or all of the following arguments (depending on options): <table summary="R valueblock"> <tr valign="top"><td>in.states</td> <td> An object of type feat which describes regions which fall within the interesting states specified in the states parameter, as determined by the Viterbi algorithm.</td></tr> <tr valign="top"><td>post.prob.wig</td> <td> A data frame giving a coordinate and posterior probibility that each site falls within an interesting state.</td></tr> <tr valign="top"><td>likelihood</td> <td> The likelihood of the data under the estimated model.</td></tr></table>
否则,返回一个列表的部分或全部以下参数(根据选项):<table summary="R valueblock"> <tr valign="top"> <TD> in.states</ TD> <TD一个对象的类型feat它描述了有趣的状态的状态参数,如确定维特比算法在指定范围之内的区域。</ TD> </ TR> <tr valign="top"> <TD >post.prob.wig</ TD> <td>一个数据框提供一个坐标和后probibility的每个站点属于一个有趣的状态。</ TD> </ TR> <tr valign="top"> <TD> likelihood</ TD> <TD>下的数据估计模型的可能性。</ TD> </ TR> </ TABLE>
(作者)----------Author(s)----------
Melissa J. Hubisz and Adam Siepel
实例----------Examples----------
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
files <- c("ENr334.maf", "rev.mod", "gencode.ENr334.gff")
unzip(exampleArchive, files)
# make "conserved" and "neutral" models and a phylo-HMM that describes[“保守”和“中性”的模型和phylo-HMM来描述]
# transitions between them, and predict conserved elements (this[它们之间的转换,和预测中保留下来的元素(这]
# is the same thing that phastCons does, but can be extended to general[同样的事情,phastCons,但可以推广到一般]
# phylo-HMMs)[phylo的HMM)]
align <- read.msa("ENr334.maf")
neutralMod <- read.tm("rev.mod")
# create a conserved model[创建一个保守的模型]
conservedMod <- neutralMod
conservedMod$tree <- rescale.tree(neutralMod$tree, 0.3)
# create a simple phylo-HMM[创建一个简单的phylo-HMM]
state.names <- c("neutral", "conserved")
h <- hmm(matrix(c(0.99, 0.01, 0.01, 0.99), nrow=2,
dimnames=list(state.names, state.names)),
eq.freq=c(neutral=0.9, conserved=0.1))
scores <- score.hmm(align, mod=list(neutral=neutralMod,
conserved=conservedMod),
hmm=h, states="conserved")
# try an alternate approach of comparing likelihoods of genes [尝试了另一种方式的比较基因似然]
feats <- read.feat("gencode.ENr334.gff")
# plot in a region with some genes[图与某些基因区域]
plot.track(list(as.track.feat(scores$in.states, name="hmmScores"),
as.track.feat(feats[feats$feature=="CDS",], name="genes")),
xlim=c(41650000, 41680000))
unlink(files)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|