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:    License: MIT License 5 votes vote down vote up
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
public void writeHistograms() {
    for (final String sample : samples) {
        final MetricsFile<?, Integer> refMetricsFile = new MetricsFile<>();
        refMetricsFile.addHeader(new StringHeader(sample));
        refMetricsFile.write(new File(tmpDir,IOUtils.urlEncode(sample) + REF_HIST_EXTENSION));

        final MetricsFile<?, Integer> altMetricsFile = new MetricsFile<>();
        altMetricsFile.addHeader(new StringHeader(sample));
        altMetricsFile.write(new File(tmpDir, IOUtils.urlEncode(sample) + ALT_HIST_EXTENSION));