use of uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto in project miso-lims by miso-lims.
the class Dtos method getPlatformRunDto.
private static RunDto getPlatformRunDto(@Nonnull Run from) {
if (from instanceof IlluminaRun) {
IlluminaRunDto dto = new IlluminaRunDto();
IlluminaRun illuminaRun = (IlluminaRun) from;
setString(dto::setWorkflowType, maybeGetProperty(illuminaRun.getWorkflowType(), IlluminaWorkflowType::getRawValue));
dto.setNumCycles(illuminaRun.getNumCycles());
dto.setCalledCycles(illuminaRun.getCallCycle());
dto.setImagedCycles(illuminaRun.getImgCycle());
dto.setScoredCycles(illuminaRun.getScoreCycle());
dto.setPairedEnd(illuminaRun.getPairedEnd());
setString(dto::setBasesMask, illuminaRun.getRunBasesMask());
return dto;
} else if (from instanceof IonTorrentRun) {
return new IonTorrentRunDto();
} else if (from instanceof LS454Run) {
Ls454RunDto dto = new Ls454RunDto();
LS454Run ls454Run = (LS454Run) from;
dto.setCycles(ls454Run.getCycles());
dto.setPairedEnd(ls454Run.getPairedEnd());
return dto;
} else if (from instanceof SolidRun) {
SolidRunDto dto = new SolidRunDto();
SolidRun solidRun = (SolidRun) from;
dto.setPairedEnd(solidRun.getPairedEnd());
return dto;
} else if (from instanceof OxfordNanoporeRun) {
OxfordNanoporeRunDto dto = new OxfordNanoporeRunDto();
OxfordNanoporeRun ontRun = (OxfordNanoporeRun) from;
setString(dto::setMinKnowVersion, ontRun.getMinKnowVersion());
setString(dto::setProtocolVersion, ontRun.getProtocolVersion());
return dto;
} else if (from instanceof PacBioRun) {
return new PacBioRunDto();
} else {
throw new IllegalArgumentException("Unknown run type");
}
}
use of uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto in project miso-lims by miso-lims.
the class Dtos method getPlatformRun.
private static Run getPlatformRun(RunDto from) {
if (from instanceof IlluminaRunDto) {
IlluminaRun run = new IlluminaRun();
IlluminaRunDto illuminaDto = (IlluminaRunDto) from;
setObject(run::setWorkflowType, illuminaDto.getWorkflowType(), wf -> IlluminaWorkflowType.get(wf));
run.setNumCycles(illuminaDto.getNumCycles());
run.setCallCycle(illuminaDto.getCalledCycles());
run.setImgCycle(illuminaDto.getImagedCycles());
run.setScoreCycle(illuminaDto.getScoredCycles());
run.setPairedEnd(illuminaDto.getPairedEnd());
setString(run::setRunBasesMask, illuminaDto.getBasesMask());
return run;
} else if (from instanceof IonTorrentRunDto) {
return new IonTorrentRun();
} else if (from instanceof Ls454RunDto) {
LS454Run run = new LS454Run();
Ls454RunDto ls454Dto = (Ls454RunDto) from;
run.setCycles(ls454Dto.getCycles());
run.setPairedEnd(ls454Dto.getPairedEnd());
return run;
} else if (from instanceof SolidRunDto) {
SolidRun run = new SolidRun();
SolidRunDto solidDto = (SolidRunDto) from;
run.setPairedEnd(solidDto.getPairedEnd());
return run;
} else if (from instanceof OxfordNanoporeRunDto) {
OxfordNanoporeRun run = new OxfordNanoporeRun();
OxfordNanoporeRunDto ontDto = (OxfordNanoporeRunDto) from;
setString(run::setMinKnowVersion, ontDto.getMinKnowVersion());
setString(run::setProtocolVersion, ontDto.getProtocolVersion());
return run;
} else if (from instanceof PacBioRunDto) {
return new PacBioRun();
} else {
throw new IllegalArgumentException("Unknown run type");
}
}
Aggregations