本文整理汇总了Java中beast.evolution.alignment.TaxonSet.initAndValidate方法的典型用法代码示例。如果您正苦于以下问题:Java TaxonSet.initAndValidate方法的具体用法?Java TaxonSet.initAndValidate怎么用?Java TaxonSet.initAndValidate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类beast.evolution.alignment.TaxonSet
的用法示例。
在下文中一共展示了TaxonSet.initAndValidate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTaxonCandidates
import beast.evolution.alignment.TaxonSet; //导入方法依赖的package包/类
Set<Taxon> getTaxonCandidates(MRCAPrior prior) {
Set<Taxon> candidates = new HashSet<>();
Tree tree = prior.treeInput.get();
String [] taxa = null;
if (tree.m_taxonset.get() != null) {
try {
TaxonSet set = tree.m_taxonset.get();
set.initAndValidate();
taxa = set.asStringList().toArray(new String[0]);
} catch (Exception e) {
taxa = prior.treeInput.get().getTaxaNames();
}
} else {
taxa = prior.treeInput.get().getTaxaNames();
}
for (String taxon : taxa) {
candidates.add(doc.getTaxon(taxon));
}
return candidates;
}
示例2: enableTipSampling
import beast.evolution.alignment.TaxonSet; //导入方法依赖的package包/类
private void enableTipSampling() {
// First, create/find the operator
TipDatesRandomWalker operator = null;
MRCAPrior prior = (MRCAPrior) m_beastObject;
TaxonSet taxonset = prior.taxonsetInput.get();
taxonset.initAndValidate();
// see if an old operator still hangs around -- happens when toggling the TipsOnly checkbox a few times
for (BEASTInterface o : taxonset.getOutputs()) {
if (o instanceof TipDatesRandomWalker) {
operator = (TipDatesRandomWalker) o;
}
}
if (operator == null) {
operator = new TipDatesRandomWalker();
operator.initByName("tree", prior.treeInput.get(), "taxonset", taxonset, "windowSize", 1.0, "weight", 1.0);
}
operator.setID("tipDatesSampler." + taxonset.getID());
doc.mcmc.get().setInputValue("operator", operator);
}
示例3: createTaxonSet
import beast.evolution.alignment.TaxonSet; //导入方法依赖的package包/类
/** create taxonset, one taxon for each sequence in the alignment
* and assign taxonset to the alignment
* **/
static void createTaxonSet(Alignment a, BeautiDoc doc) {
List<String> taxaNames = a.getTaxaNames();
TaxonSet taxonset = new TaxonSet();
for (final String taxaName : taxaNames) {
taxonset.taxonsetInput.get().add(doc.getTaxon(taxaName));
}
taxonset.setID("TaxonSet0." + a.getID());
try {
taxonset.initAndValidate();
} catch (Exception e) {
e.printStackTrace();
}
doc.registerPlugin(taxonset);
}