public static ContainerModelDto asDto(@Nonnull SequencingContainerModel from) { ContainerModelDto dto = new ContainerModelDto(); dto.setId(from.getId()); dto.setAlias(from.getAlias()); dto.setIdentificationBarcode(from.getIdentificationBarcode()); dto.setPlatformType(from.getPlatformType().name()); dto.setInstrumentModelIds(from.getInstrumentModels().stream().map(InstrumentModel::getId).collect(Collectors.toList())); dto.setPartitionCount(from.getPartitionCount()); dto.setArchived(from.isArchived()); return dto; }
private void resetPartitionSteps(SequencingContainerModel model) { partitionSteps = new ArrayList<>(); for (int i = 0; i < model.getPartitionCount(); ++i) { partitionSteps.add(new PartitionStep(i, model.getPlatformType())); } }
@Override public String getLogMessage() { return String.format("Selected %s Model '%s'", modelStep.getInput().getPlatformType().getContainerName(), modelStep.getInput().getAlias()); }
private boolean updateContainerFromNotification(final Run target, User user, SequencingContainerModel containerModel, String containerSerialNumber, final GetLaneContents getLaneContents, String positionName) throws IOException { final Collection<SequencerPartitionContainer> containers = containerService.listByBarcode(containerSerialNumber); int laneCount = containerModel.getPartitionCount(); InstrumentPosition position = null; if (!isStringEmptyOrNull(positionName)) {
@Override public String getDeleteType() { return getModel().getPlatformType().getContainerName(); }
@Override public String getLabelText() { return getAlias(); }
container.setModel(containerModelService.get(container.getModel().getId())); if (container.getClusteringKit() != null) { KitDescriptor descriptor = kitService.getKitDescriptorById(container.getClusteringKit().getId());
"Could not find container or fallback for parameters: model=" + containerModel + ", lanes=" + laneCount); if (model.isFallback() && isNew) { log.info("Could not find container model with model=" + containerModel + " and lanes=" + laneCount + " for run " + source.getAlias() + "; used fallback container model instead.");
@Override public void execute(WorkflowExecutor workflowExecutor) throws IOException { if (!isComplete()) throw new IllegalStateException("Workflow is not complete"); SequencerPartitionContainer spc; if (containerStep.isExistingContainer()) { spc = containerStep.getContainer(); } else { spc = new SequencerPartitionContainerImpl(); SequencingContainerModel model = containerModelStep.getModel(); spc.setModel(model); spc.setIdentificationBarcode(containerStep.getBarcode()); spc.setPartitionLimit(model.getPartitionCount()); } for (int i = 0; i < partitionSteps.size(); ++i) { spc.getPartitionAt(i + 1).setPool(partitionSteps.get(i).getPool()); } workflowExecutor.save(spc); }
@Override public String getBarcodeSizeInfo() { return String.format("%s: %d", getModel().getPlatformType().getPluralPartitionName(), getPartitions().size()); }
@Override public String getBarcodeExtraInfo() { return getModel().getAlias(); }
private String getContainerName() { if (containerStep == null) { return "Sequencing Container"; } else { return containerStep.getInput().getModel().getPlatformType().getContainerName(); } }
@Override public String getDeleteDescription() { return getIdentificationBarcode() + " (" + getModel().getAlias() + ")"; }
private String getContainerName() { if (containerModelStep.getProgressStep() != null) { return containerModelStep.getModel().getPlatformType().getContainerName(); } else if (containerStep.getProgressStep() != null && containerStep.isExistingContainer()) { return containerStep.getContainer().getModel().getPlatformType().getContainerName(); } else { return "Sequencing Container"; } }
@Override public String getLabelText() { return getIdentificationBarcode() + " (" + getModel().getAlias() + ")"; }