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

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

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

Histogram.getStandardDeviation介绍

[英]Calculates the standard deviation of the bin size
[中]计算料仓尺寸的标准偏差

代码示例

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

final double standardDeviationQuality = qualityHistogram.getStandardDeviation();

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

final double standardDeviationQuality = qualityHistogram.getStandardDeviation();

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

@Test(dataProvider = "sumOfGaussiansDataProvider")
public void testDrawSumOfQScores(final File metricsFile, final int altDepth, final double tolerance) throws Exception {
  final MetricsFile<TheoreticalSensitivityMetrics, Integer> metrics = new MetricsFile<>();
  try (final FileReader metricsFileReader = new FileReader(metricsFile)) {
    metrics.read(metricsFileReader);
  }
  final List<Histogram<Integer>> histograms = metrics.getAllHistograms();
  final Histogram<Integer> qualityHistogram = histograms.get(1);
  final TheoreticalSensitivity.RouletteWheel qualityRW = new TheoreticalSensitivity.RouletteWheel(TheoreticalSensitivity.trimDistribution(TheoreticalSensitivity.normalizeHistogram(qualityHistogram)));
  final Random randomNumberGenerator = new Random(51);
  // Calculate mean and deviation of quality score distribution to enable Gaussian sampling below
  final double averageQuality = qualityHistogram.getMean();
  final double standardDeviationQuality = qualityHistogram.getStandardDeviation();
  for (int k = 0; k < 1; k++) {
    int sumOfQualitiesFull = IntStream.range(0, altDepth).map(n -> qualityRW.draw()).sum();
    int sumOfQualities = TheoreticalSensitivity.drawSumOfQScores(altDepth, averageQuality, standardDeviationQuality, randomNumberGenerator.nextGaussian());
    Assert.assertEquals(sumOfQualitiesFull, sumOfQualities, sumOfQualitiesFull * tolerance);
  }
}

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

@Test(dataProvider = "histogramData")
public void testHistogramFunctions(final int[] values, final double mean, final double stdev, final Integer trimByWidth) {
  final Histogram<Integer> histo = new Histogram<>();
  for (int value : values) {
    histo.increment(value);
  }
  if (trimByWidth != null) histo.trimByWidth(trimByWidth);
  final double m = histo.getMean();
  final double sd = histo.getStandardDeviation();
  Assert.assertEquals(round(mean), round(m), "Means are not equal");
  Assert.assertEquals(round(stdev), round(sd), "Stdevs are not equal");
}

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

metrics.STANDARD_DEVIATION = trimmedHistogram.getStandardDeviation();

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

metrics.STANDARD_DEVIATION = trimmedHistogram.getStandardDeviation();

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

outieHistogram.trimByTailLimit(TAIL_LIMIT);
metrics.JUMP_MEAN_INSERT_SIZE = outieHistogram.getMean();
metrics.JUMP_STDEV_INSERT_SIZE = outieHistogram.getStandardDeviation();
metrics.NONJUMP_PAIRS = innies;
metrics.NONJUMP_DUPLICATE_PAIRS = innieDupes;
innieHistogram.trimByTailLimit(TAIL_LIMIT);
metrics.NONJUMP_MEAN_INSERT_SIZE = innieHistogram.getMean();
metrics.NONJUMP_STDEV_INSERT_SIZE = innieHistogram.getStandardDeviation();
metrics.CHIMERIC_PAIRS = crossChromPairs + superSized + tandemPairs;
metrics.FRAGMENTS = fragments;

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

outieHistogram.trimByTailLimit(TAIL_LIMIT);
metrics.JUMP_MEAN_INSERT_SIZE = outieHistogram.getMean();
metrics.JUMP_STDEV_INSERT_SIZE = outieHistogram.getStandardDeviation();
metrics.NONJUMP_PAIRS = innies;
metrics.NONJUMP_DUPLICATE_PAIRS = innieDupes;
innieHistogram.trimByTailLimit(TAIL_LIMIT);
metrics.NONJUMP_MEAN_INSERT_SIZE = innieHistogram.getMean();
metrics.NONJUMP_STDEV_INSERT_SIZE = innieHistogram.getStandardDeviation();
metrics.CHIMERIC_PAIRS = crossChromPairs + superSized + tandemPairs;
metrics.FRAGMENTS = fragments;

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

SD_COVERAGE      = highQualityDepthHistogram.getStandardDeviation();
MEDIAN_COVERAGE  = highQualityDepthHistogram.getMedian();
MAD_COVERAGE     = highQualityDepthHistogram.getMedianAbsoluteDeviation();

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

SD_COVERAGE      = highQualityDepthHistogram.getStandardDeviation();
MEDIAN_COVERAGE  = highQualityDepthHistogram.getMedian();
MAD_COVERAGE     = highQualityDepthHistogram.getMedianAbsoluteDeviation();

相关文章