use of com.milaboratory.mixcr.partialassembler.PartialAlignmentsAssembler in project mixcr by milaboratory.
the class ActionAssemblePartialAlignments method go.
@Override
public void go(ActionHelper helper) throws Exception {
if (parameters.writePartial != null)
System.err.println("'-p' option is deprecated and will be removed in 2.2. " + "Use '-d' option to drop not-overlapped partial reads.");
// Saving initial timestamp
long beginTimestamp = System.currentTimeMillis();
PartialAlignmentsAssemblerParameters assemblerParameters = PartialAlignmentsAssemblerParameters.getDefault();
if (!parameters.overrides.isEmpty()) {
assemblerParameters = JsonOverrider.override(assemblerParameters, PartialAlignmentsAssemblerParameters.class, parameters.overrides);
if (assemblerParameters == null) {
System.err.println("Failed to override some parameter.");
return;
}
}
try (PartialAlignmentsAssembler assembler = new PartialAlignmentsAssembler(assemblerParameters, parameters.getOutputFileName(), !parameters.doDropPartial(), parameters.getOverlappedOnly())) {
ReportWrapper report = new ReportWrapper(command(), assembler);
report.setStartMillis(beginTimestamp);
report.setInputFiles(parameters.getInputFileName());
report.setOutputFiles(parameters.getOutputFileName());
report.setCommandLine(helper.getCommandLineArguments());
try (VDJCAlignmentsReader reader = new VDJCAlignmentsReader(parameters.getInputFileName())) {
SmartProgressReporter.startProgressReport("Building index", reader);
assembler.buildLeftPartsIndex(reader);
}
try (VDJCAlignmentsReader reader = new VDJCAlignmentsReader(parameters.getInputFileName())) {
SmartProgressReporter.startProgressReport("Searching for overlaps", reader);
assembler.searchOverlaps(reader);
}
report.setFinishMillis(System.currentTimeMillis());
// Writing report to stout
System.out.println("============= Report ==============");
Util.writeReportToStdout(report);
if (parameters.report != null)
Util.writeReport(parameters.report, report);
if (parameters.jsonReport != null)
Util.writeJsonReport(parameters.jsonReport, report);
}
}
Aggregations