Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the EXT argument to CollectSamErrorMetrics. #1478

Merged
merged 4 commits into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ public class CollectSamErrorMetrics extends CommandLineProgram {
)
public boolean INTERVAL_ITERATOR = false;

@Argument(shortName = "EXT",
doc = "Append the given file extension to all metric file names (ex. OUTPUT.insert_size_metrics.EXT). No extension by default.",
optional = true)
public String FILE_EXTENSION = "";

// =====================================================================

/** Random object from which to pull pseudo-random numbers. Initialized in {@link #initializeAggregationState()}.*/
Expand Down Expand Up @@ -450,7 +455,7 @@ private SamLocusAndReferenceIterator createSamLocusAndReferenceIterator(final Sa
log.info("Using " + aggregatorList.size() + " aggregators.");

aggregatorList.forEach(la ->
IOUtil.assertFileIsWritable(new File(OUTPUT + la.getSuffix())));
IOUtil.assertFileIsWritable(new File(OUTPUT + la.getSuffix() + FILE_EXTENSION)));

// iterate over loci
log.info("Starting iteration over loci");
Expand Down Expand Up @@ -540,7 +545,7 @@ private void writeMetricsFileForAggregator(final BaseErrorAggregation locusAggre
}
}

file.write(new File(OUTPUT + "." + locusAggregator.getSuffix()));
file.write(new File(OUTPUT + "." + locusAggregator.getSuffix() + FILE_EXTENSION));
}

/**
Expand Down