本文整理了Java中htsjdk.samtools.util.Histogram.getMax()
方法的一些代码示例,展示了Histogram.getMax()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.getMax()
方法的具体详情如下:
包路径:htsjdk.samtools.util.Histogram
类名称:Histogram
方法名:getMax
[英]Returns the key with the highest count.
[中]返回计数最高的键。
代码示例来源:origin: samtools/htsjdk
@Test(expectedExceptions = UnsupportedOperationException.class)
public void testGetMaxBlowup() {
final String[] is = {"foo", "bar", "bar"};
final Histogram<String> histo = new Histogram<>();
for (final String i : is) histo.increment(i);
histo.getMax();//blow up
}
代码示例来源:origin: samtools/htsjdk
@Test
public void testGetMinMax() {
final int[] is = {4,4,5,5,5,6,6,6,6};
final Histogram<Integer> histo = new Histogram<>();
for (final int i : is) histo.increment(i);
Assert.assertEquals(histo.getMin(), 4.0);
Assert.assertEquals(histo.getMax(), 6.0);
}
代码示例来源:origin: broadinstitute/picard
if (!histogram.isEmpty()) {
metrics.READ_PAIRS = (long) total;
metrics.MAX_INSERT_SIZE = (int) histogram.getMax();
metrics.MIN_INSERT_SIZE = (int) histogram.getMin();
metrics.MEDIAN_INSERT_SIZE = histogram.getMedian();
double high = median;
while (low >= histogram.getMin()-1 || high <= histogram.getMax()+1) {
final Histogram.Bin<Integer> lowBin = histogram.get((int) low);
if (lowBin != null) covered += lowBin.getValue();
代码示例来源:origin: com.github.broadinstitute/picard
if (!histogram.isEmpty()) {
metrics.READ_PAIRS = (long) total;
metrics.MAX_INSERT_SIZE = (int) histogram.getMax();
metrics.MIN_INSERT_SIZE = (int) histogram.getMin();
metrics.MEDIAN_INSERT_SIZE = histogram.getMedian();
double high = median;
while (low >= histogram.getMin()-1 || high <= histogram.getMax()+1) {
final Histogram.Bin<Integer> lowBin = histogram.get((int) low);
if (lowBin != null) covered += lowBin.getValue();
内容来源于网络,如有侵权,请联系作者删除!