本文整理了Java中htsjdk.samtools.util.Histogram.setValueLabel()
方法的一些代码示例,展示了Histogram.setValueLabel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.setValueLabel()
方法的具体详情如下:
包路径:htsjdk.samtools.util.Histogram
类名称:Histogram
方法名:setValueLabel
暂无
代码示例来源:origin: com.github.samtools/htsjdk
/**
* Outputs validation summary report to out.
*
* @param samReader records to validate
* @param reference if null, NM tag validation is skipped
* @return boolean true if there are no validation errors, otherwise false
*/
public boolean validateSamFileSummary(final SamReader samReader, final ReferenceSequenceFile reference) {
init(reference, samReader.getFileHeader());
validateSamFile(samReader, out);
boolean result = errorsByType.isEmpty();
if (errorsByType.getCount() > 0) {
// Convert to a histogram with String IDs so that WARNING: or ERROR: can be prepended to the error type.
final Histogram<String> errorsAndWarningsByType = new Histogram<>("Error Type", "Count");
for (final Histogram.Bin<Type> bin : errorsByType.values()) {
errorsAndWarningsByType.increment(bin.getId().getHistogramString(), bin.getValue());
}
final MetricsFile<ValidationMetrics, String> metricsFile = new MetricsFile<>();
errorsByType.setBinLabel("Error Type");
errorsByType.setValueLabel("Count");
metricsFile.setHistogram(errorsAndWarningsByType);
metricsFile.write(out);
}
cleanup();
return result;
}
代码示例来源:origin: samtools/htsjdk
/**
* Outputs validation summary report to out.
*
* @param samReader records to validate
* @param reference if null, NM tag validation is skipped
* @return boolean true if there are no validation errors, otherwise false
*/
public boolean validateSamFileSummary(final SamReader samReader, final ReferenceSequenceFile reference) {
init(reference, samReader.getFileHeader());
validateSamFile(samReader, out);
boolean result = errorsByType.isEmpty();
if (errorsByType.getCount() > 0) {
// Convert to a histogram with String IDs so that WARNING: or ERROR: can be prepended to the error type.
final Histogram<String> errorsAndWarningsByType = new Histogram<>("Error Type", "Count");
for (final Histogram.Bin<Type> bin : errorsByType.values()) {
errorsAndWarningsByType.increment(bin.getId().getHistogramString(), bin.getValue());
}
final MetricsFile<ValidationMetrics, String> metricsFile = new MetricsFile<>();
errorsByType.setBinLabel("Error Type");
errorsByType.setValueLabel("Count");
metricsFile.setHistogram(errorsAndWarningsByType);
metricsFile.write(out);
}
cleanup();
return result;
}
代码示例来源:origin: org.seqdoop/htsjdk
/**
* Outputs validation summary report to out.
*
* @param samReader records to validate
* @param reference if null, NM tag validation is skipped
* @return boolean true if there are no validation errors, otherwise false
*/
public boolean validateSamFileSummary(final SAMFileReader samReader, final ReferenceSequenceFile reference) {
init(reference, samReader.getFileHeader());
validateSamFile(samReader, out);
boolean result = errorsByType.isEmpty();
if (errorsByType.getCount() > 0) {
// Convert to a histogram with String IDs so that WARNING: or ERROR: can be prepended to the error type.
final Histogram<String> errorsAndWarningsByType = new Histogram<String>("Error Type", "Count");
for (final Histogram<SAMValidationError.Type>.Bin bin : errorsByType.values()) {
errorsAndWarningsByType.increment(bin.getId().getHistogramString(), bin.getValue());
}
final MetricsFile<ValidationMetrics, String> metricsFile = new MetricsFile<ValidationMetrics, String>();
errorsByType.setBinLabel("Error Type");
errorsByType.setValueLabel("Count");
metricsFile.setHistogram(errorsAndWarningsByType);
metricsFile.write(out);
}
cleanup();
return result;
}
代码示例来源:origin: samtools/htsjdk
histo.setValueLabel("big_number");
histo.increment(1, 101);
histo.increment(2, 202);
内容来源于网络,如有侵权,请联系作者删除!