本文整理汇总了Java中beast.evolution.alignment.Alignment.getTaxonCount方法的典型用法代码示例。如果您正苦于以下问题:Java Alignment.getTaxonCount方法的具体用法?Java Alignment.getTaxonCount怎么用?Java Alignment.getTaxonCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类beast.evolution.alignment.Alignment
的用法示例。
在下文中一共展示了Alignment.getTaxonCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPatterns
import beast.evolution.alignment.Alignment; //导入方法依赖的package包/类
/**
* set the pattern source
*/
public void setPatterns(Alignment patterns) {
this.taxa = new TaxonSet();
try {
this.taxa.alignmentInput.setValue(patterns, this.taxa);
} catch (Exception e) {
e.printStackTrace();
}
this.patterns = patterns;
dimension = patterns.getTaxonCount();
dataType = patterns.getDataType();
distancesKnown = false;
}
示例2: testUncertainAlignment
import beast.evolution.alignment.Alignment; //导入方法依赖的package包/类
@Test
public void testUncertainAlignment() throws Exception {
Alignment data = getUncertainAlignment();
DataType dataType = data.getDataType();
System.out.println("Tip likelihoods:");
int sites = data.getCounts().get(0).size();
for (int taxon=0; taxon<data.getTaxonCount(); taxon++) {
for (int i=0; i<sites; i++) {
double[] probs = data.getTipLikelihoods(taxon,i);
for (int j=0; j<probs.length; j++) {
System.out.print(probs[j]+" ");
}
System.out.print("; ");
}
System.out.println();
}
System.out.println("Most likely sequences:");
for (List<Integer> seq : data.getCounts()) {
System.out.println(dataType.state2string(seq));
}
Alignment data2 = getAlignment();
for (int taxon=0; taxon<data.getTaxonCount(); taxon++) {
assertEquals(data.getCounts().get(taxon),data2.getCounts().get(taxon));
}
}