本文整理汇总了C++中HMM::IncludeNullModelInHMM方法的典型用法代码示例。如果您正苦于以下问题:C++ HMM::IncludeNullModelInHMM方法的具体用法?C++ HMM::IncludeNullModelInHMM怎么用?C++ HMM::IncludeNullModelInHMM使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HMM
的用法示例。
在下文中一共展示了HMM::IncludeNullModelInHMM方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrepareTemplate
/////////////////////////////////////////////////////////////////////////////////////
// Do precalculations for q and t to prepare comparison
/////////////////////////////////////////////////////////////////////////////////////
void PrepareTemplate(HMM& q, HMM& t, int format)
{
if (format==0) // HHM format
{
// Add transition pseudocounts to template
t.AddTransitionPseudocounts();
// Don't use CS-pseudocounts because of runtime!!!
// Generate an amino acid frequency matrix from f[i][a] with full pseudocount admixture (tau=1) -> g[i][a]
t.PreparePseudocounts();
// Add amino acid pseudocounts to query: p[i][a] = (1-tau)*f[i][a] + tau*g[i][a]
t.AddAminoAcidPseudocounts(par.pcm, par.pca, par.pcb, par.pcc);
t.CalculateAminoAcidBackground();
}
else // HHMER format
{
// Don't add transition pseudocounts to template
// t.AddTransitionPseudocounts(par.gapd, par.gape, par.gapf, par.gapg, par.gaph, par.gapi, 0.0);
// Generate an amino acid frequency matrix from f[i][a] with full pseudocount admixture (tau=1) -> g[i][a]
// t.PreparePseudocounts();
// DON'T ADD amino acid pseudocounts to temlate: pcm=0! t.p[i][a] = t.f[i][a]
t.AddAminoAcidPseudocounts(0, par.pca, par.pcb, par.pcc);
t.CalculateAminoAcidBackground();
}
if (par.forward>=1) t.Log2LinTransitionProbs(1.0);
// Factor Null model into HMM t
// ATTENTION! t.p[i][a] is divided by pnul[a] (for reasons of efficiency) => do not reuse t.p
t.IncludeNullModelInHMM(q,t); // Can go BEFORE the loop if not dependent on template
return;
}