use of gridss.analysis.CollectGridssMetrics in project gridss by PapenfussLab.
the class SAMEvidenceSource method ensureMetrics.
public void ensureMetrics() {
if (metrics == null) {
File idsvFile = getContext().getFileSystemContext().getIdsvMetrics(getFile());
File cigarFile = getContext().getFileSystemContext().getCigarMetrics(getFile());
File mapqFile = getContext().getFileSystemContext().getMapqMetrics(getFile());
if (!idsvFile.exists() || !cigarFile.exists() || !mapqFile.exists()) {
log.info("Calculating metrics for " + getFile().getAbsolutePath());
List<String> args = Lists.newArrayList("INPUT=" + getFile().getAbsolutePath(), "OUTPUT=" + getContext().getFileSystemContext().getMetricsPrefix(getFile()).getAbsolutePath(), "THRESHOLD_COVERAGE=" + getContext().getConfig().maxCoverage, "FILE_EXTENSION=null", "GRIDSS_PROGRAM=null", "GRIDSS_PROGRAM=CollectCigarMetrics", "GRIDSS_PROGRAM=CollectMapqMetrics", "GRIDSS_PROGRAM=CollectTagMetrics", "GRIDSS_PROGRAM=CollectIdsvMetrics", "GRIDSS_PROGRAM=ReportThresholdCoverage", // use yet
"PROGRAM=null", "PROGRAM=CollectAlignmentSummaryMetrics", "PROGRAM=QualityScoreDistribution");
if (!knownSingleEnded()) {
// Don't run CollectInsertSizeMetrics
args.add("PROGRAM=CollectInsertSizeMetrics");
}
if (getContext().getCalculateMetricsRecordCount() < Integer.MAX_VALUE) {
args.add("STOP_AFTER=" + getContext().getCalculateMetricsRecordCount());
}
execute(new CollectGridssMetrics(), args);
}
metrics = new IdsvSamFileMetrics(getContext(), getFile(), knownSingleEnded());
}
}
Aggregations