use of com.milaboratory.mixcr.cli.CloneAssemblerReport in project mixcr by milaboratory.
the class RunMiXCR method assemble.
public static AssembleResult assemble(final AlignResult align, boolean close) {
CloneAssembler assembler = null;
try {
RunMiXCRAnalysis parameters = align.parameters;
assembler = new CloneAssembler(parameters.cloneAssemblerParameters, false, align.usedGenes, align.parameters.alignerParameters);
CloneAssemblerReport report = new CloneAssemblerReport();
assembler.setListener(report);
CloneAssemblerRunner assemblerRunner = new CloneAssemblerRunner(new AlignmentsProvider() {
@Override
public OutputPortCloseable<VDJCAlignments> create() {
return opCloseable(CUtils.asOutputPort(align.alignments));
}
@Override
public long getTotalNumberOfReads() {
return align.alignments.size();
}
}, assembler, parameters.threads);
// start progress reporting
SmartProgressReporter.startProgressReport(assemblerRunner);
assemblerRunner.run();
CloneSet cloneSet = assemblerRunner.getCloneSet(align.parameters.alignerParameters);
return new AssembleResult(cloneSet, report, assembler);
} finally {
if (close)
assembler.close();
}
}
Aggregations