Java Code Examples for htsjdk.samtools.metrics.StringHeader
The following examples show how to use
htsjdk.samtools.metrics.StringHeader. These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Drop-seq Source File: MetricsUtils.java License: MIT License | 5 votes |
public static Header getMergedMetricsHeader(List<File> inputMetricsList, File outputMetrics) { List<String> header = new ArrayList<>(); for (File file : inputMetricsList) header.add("INPUT="+ file.getAbsolutePath()); header.add("OUTPUT="+ outputMetrics.getAbsolutePath()); return new StringHeader(StringUtils.join(header, "\t")); }
Example 2
Source Project: gatk Source File: F1R2CountsCollector.java License: BSD 3-Clause "New" or "Revised" License | 5 votes |
public void writeHistograms() { for (final String sample : samples) { final MetricsFile<?, Integer> refMetricsFile = new MetricsFile<>(); refMetricsFile.addHeader(new StringHeader(sample)); refSiteHistograms.get(sample).values().forEach(refMetricsFile::addHistogram); refMetricsFile.write(new File(tmpDir,IOUtils.urlEncode(sample) + REF_HIST_EXTENSION)); final MetricsFile<?, Integer> altMetricsFile = new MetricsFile<>(); altMetricsFile.addHeader(new StringHeader(sample)); depthOneAltHistograms.get(sample).getHistograms().forEach(altMetricsFile::addHistogram); altMetricsFile.write(new File(tmpDir, IOUtils.urlEncode(sample) + ALT_HIST_EXTENSION)); } }