当前位置: 首页>>代码示例>>Java>>正文


Java TaxonSet.initAndValidate方法代码示例

本文整理汇总了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;
 }
 
开发者ID:CompEvol,项目名称:beast2,代码行数:22,代码来源:PriorListInputEditor.java

示例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);
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:23,代码来源:MRCAPriorInputEditor.java

示例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);
}
 
开发者ID:CompEvol,项目名称:beast2,代码行数:18,代码来源:BeautiDoc.java


注:本文中的beast.evolution.alignment.TaxonSet.initAndValidate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。