htsjdk.samtools.util.Histogram.getMode()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中htsjdk.samtools.util.Histogram.getMode()方法的一些代码示例,展示了Histogram.getMode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.getMode()方法的具体详情如下:
包路径:htsjdk.samtools.util.Histogram
类名称:Histogram
方法名:getMode

Histogram.getMode介绍

[英]Returns id of the Bin that's the mode of the distribution (i.e. the largest bin).
[中]返回作为分发模式的存储箱的id(即最大的存储箱)。

代码示例

代码示例来源:origin: samtools/htsjdk

@Test
public void testMode() {
  final int[] is = {4,4,5,5,5,6};
  final Histogram<Integer> histo = new Histogram<>();
  for (final int i : is) histo.increment(i);
  Assert.assertEquals(histo.getMode(), 5.0);
}

代码示例来源:origin: samtools/htsjdk

@Test(expectedExceptions = UnsupportedOperationException.class)
public void testModeBlowup() {
  final String[] is = {"foo"};
  final Histogram<String> histo = new Histogram<>();
  for (final String i : is) histo.increment(i);
  histo.getMode();//blowup
}

代码示例来源:origin: broadinstitute/picard

return histo.size() > 0 ? histo.getMode() : 0;

代码示例来源:origin: com.github.broadinstitute/picard

return histo.size() > 0 ? histo.getMode() : 0;

代码示例来源:origin: broadinstitute/picard

metrics.MIN_INSERT_SIZE = (int) histogram.getMin();
metrics.MEDIAN_INSERT_SIZE = histogram.getMedian();
metrics.MODE_INSERT_SIZE = histogram.getMode();
metrics.MEDIAN_ABSOLUTE_DEVIATION = histogram.getMedianAbsoluteDeviation();

代码示例来源:origin: com.github.broadinstitute/picard

metrics.MIN_INSERT_SIZE = (int) histogram.getMin();
metrics.MEDIAN_INSERT_SIZE = histogram.getMedian();
metrics.MODE_INSERT_SIZE = histogram.getMode();
metrics.MEDIAN_ABSOLUTE_DEVIATION = histogram.getMedianAbsoluteDeviation();

相关文章