htsjdk.samtools.metrics.StringHeader Java Examples
The following examples show how to use
htsjdk.samtools.metrics.StringHeader.
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 File: MetricsUtils.java From Drop-seq with 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 File: F1R2CountsCollector.java From gatk with 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)); } }