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

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

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

Histogram.addHistogram介绍

[英]Mutable method that allows the addition of a Histogram into the current one.
[中]可变方法,允许在当前直方图中添加直方图。

代码示例

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

public void addIlluminaMetricCounts(final IlluminaMetricCounts counts) {
    this.tileToClusterHistogram.addHistogram(counts.tileToClusterHistogram);
    this.tileToPfClusterHistogram.addHistogram(counts.tileToPfClusterHistogram);
  }
}

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

public void addIlluminaMetricCounts(final IlluminaMetricCounts counts) {
    this.tileToClusterHistogram.addHistogram(counts.tileToClusterHistogram);
    this.tileToPfClusterHistogram.addHistogram(counts.tileToPfClusterHistogram);
  }
}

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

highQualityDepthHistogram.addHistogram(otherMetric.highQualityDepthHistogram);
unfilteredDepthHistogram.addHistogram(otherMetric.unfilteredDepthHistogram);
if (unfilteredBaseQHistogram != null && otherMetric.unfilteredBaseQHistogram != null)
  unfilteredBaseQHistogram.addHistogram(otherMetric.unfilteredBaseQHistogram);
return this;

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

highQualityDepthHistogram.addHistogram(otherMetric.highQualityDepthHistogram);
unfilteredDepthHistogram.addHistogram(otherMetric.unfilteredDepthHistogram);
if (unfilteredBaseQHistogram != null && otherMetric.unfilteredBaseQHistogram != null)
  unfilteredBaseQHistogram.addHistogram(otherMetric.unfilteredBaseQHistogram);
return this;

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

@Test
public void testAddHistogram() {
  final int[] is1 = {4,4,5,5,5};
  final Histogram<Integer> histo1 = new Histogram<>();
  Assert.assertTrue(histo1.isEmpty());
  for (final int i : is1) histo1.increment(i);
  Assert.assertFalse(histo1.isEmpty());
  final int[] is2 = {5,5, 6,6,6,6};
  final Histogram<Integer> histo2 = new Histogram<>();
  for (final int i : is2) histo2.increment(i);
  Assert.assertEquals(histo1.get(4).getValue(), 2.0);
  Assert.assertEquals(histo1.get(5).getValue(), 3.0);
  Assert.assertEquals(histo1.get(6), null);
  histo1.addHistogram(histo2);
  Assert.assertEquals(histo1.get(4).getValue(), 2.0);
  Assert.assertEquals(histo1.get(5).getValue(), 5.0);
  Assert.assertEquals(histo1.get(6).getValue(), 4.0);
}

相关文章