Search in sources :

Example 1 with SequencerPartitionContainerImpl

use of uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl in project miso-lims by miso-lims.

the class LoadSequencerWorkflow method execute.

@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);
}
Also used : SequencerPartitionContainer(uk.ac.bbsrc.tgac.miso.core.data.SequencerPartitionContainer) SequencingContainerModel(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencingContainerModel) SequencerPartitionContainerImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl)

Example 2 with SequencerPartitionContainerImpl

use of uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl in project miso-lims by miso-lims.

the class LoadSequencerWorkflowTest method makeContainerStep.

private SequencerPartitionContainerProgressStep makeContainerStep(String serialNumber, String modelAlias, int partitionCount, PlatformType platformType) {
    SequencerPartitionContainer container = new SequencerPartitionContainerImpl();
    container.setIdentificationBarcode(serialNumber);
    container.setModel(makeModel(modelAlias, partitionCount, platformType));
    container.setPartitionLimit(partitionCount);
    SequencerPartitionContainerProgressStep step = new SequencerPartitionContainerProgressStep();
    step.setInput(container);
    return step;
}
Also used : SequencerPartitionContainer(uk.ac.bbsrc.tgac.miso.core.data.SequencerPartitionContainer) SequencerPartitionContainerImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl)

Example 3 with SequencerPartitionContainerImpl

use of uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl in project miso-lims by miso-lims.

the class DefaultRunServiceTest method makeContainer.

private static SequencerPartitionContainer makeContainer() {
    SequencerPartitionContainer container = new SequencerPartitionContainerImpl();
    container.setPartitionLimit(1);
    container.setIdentificationBarcode(CONTAINER_SERIAL_NO);
    container.setModel(makeContainerModel());
    return container;
}
Also used : SequencerPartitionContainer(uk.ac.bbsrc.tgac.miso.core.data.SequencerPartitionContainer) SequencerPartitionContainerImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl)

Example 4 with SequencerPartitionContainerImpl

use of uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl in project miso-lims by miso-lims.

the class Dtos method to.

public static SequencerPartitionContainer to(@Nonnull ContainerDto from) {
    SequencerPartitionContainer to = null;
    if (from instanceof OxfordNanoporeContainerDto) {
        OxfordNanoporeContainerDto ontFrom = (OxfordNanoporeContainerDto) from;
        OxfordNanoporeContainer ontTo = new OxfordNanoporeContainer();
        setObject(ontTo::setPoreVersion, PoreVersion::new, ontFrom.getPoreVersionId());
        setDate(ontTo::setReceivedDate, ontFrom.getReceivedDate());
        setDate(ontTo::setReturnedDate, ontFrom.getReturnedDate());
        to = ontTo;
    } else {
        to = new SequencerPartitionContainerImpl();
    }
    setLong(to::setId, from.getId(), false);
    setString(to::setIdentificationBarcode, from.getIdentificationBarcode());
    setObject(to::setModel, SequencingContainerModel::new, maybeGetProperty(from.getModel(), SequencingContainerModelDto::getId));
    setString(to::setDescription, from.getDescription());
    setObject(to::setClusteringKit, KitDescriptor::new, from.getClusteringKitId());
    setString(to::setClusteringKitLot, from.getClusteringKitLot());
    setObject(to::setMultiplexingKit, KitDescriptor::new, from.getMultiplexingKitId());
    setString(to::setMultiplexingKitLot, from.getMultiplexingKitLot());
    return to;
}
Also used : SequencerPartitionContainer(uk.ac.bbsrc.tgac.miso.core.data.SequencerPartitionContainer) SequencingContainerModel(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencingContainerModel) KitDescriptor(uk.ac.bbsrc.tgac.miso.core.data.impl.kit.KitDescriptor) OxfordNanoporeContainer(uk.ac.bbsrc.tgac.miso.core.data.impl.OxfordNanoporeContainer) SequencerPartitionContainerImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl) PoreVersion(uk.ac.bbsrc.tgac.miso.core.data.impl.PoreVersion) IonTorrentRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto) QcHierarchyNodeDto(uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto) RunPositionDto(uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto) PacBioRunDto(uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto) Ls454RunDto(uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto) IlluminaNotificationDto(ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto) OxfordNanoporeRunDto(uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto) IlluminaRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto) NotificationDto(ca.on.oicr.gsi.runscanner.dto.NotificationDto) OxfordNanoporeNotificationDto(ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto) RunDto(uk.ac.bbsrc.tgac.miso.dto.run.RunDto) SolidRunDto(uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto) OrderAliquotDto(uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)

Example 5 with SequencerPartitionContainerImpl

use of uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl in project miso-lims by miso-lims.

the class Dtos method to.

public static QC to(@Nonnull QcDto dto) {
    QC to;
    switch(dto.getQcTarget()) {
        case "Library":
            LibraryQC newLibraryQc = new LibraryQC();
            Library ownerLibrary = new LibraryImpl();
            ownerLibrary.setId(dto.getEntityId());
            newLibraryQc.setLibrary(ownerLibrary);
            to = newLibraryQc;
            break;
        case "Sample":
            SampleQC newSampleQc = new SampleQC();
            Sample ownerSample = new SampleImpl();
            ownerSample.setId(dto.getEntityId());
            newSampleQc.setSample(ownerSample);
            to = newSampleQc;
            break;
        case "Pool":
            PoolQC newPoolQc = new PoolQC();
            Pool ownerPool = new PoolImpl();
            ownerPool.setId(dto.getEntityId());
            newPoolQc.setPool(ownerPool);
            to = newPoolQc;
            break;
        case "Container":
            ContainerQC newContainerQc = new ContainerQC();
            SequencerPartitionContainer ownerContainer = new SequencerPartitionContainerImpl();
            ownerContainer.setId(dto.getEntityId());
            newContainerQc.setContainer(ownerContainer);
            to = newContainerQc;
            break;
        case "Requisition":
            RequisitionQC newRequisitionQc = new RequisitionQC();
            Requisition ownerRequisition = new Requisition();
            ownerRequisition.setId(dto.getEntityId());
            newRequisitionQc.setRequisition(ownerRequisition);
            to = newRequisitionQc;
            break;
        default:
            throw new IllegalArgumentException("No such QC target: " + dto.getQcTarget());
    }
    if (dto.getId() != null) {
        to.setId(dto.getId());
    }
    to.setDate(parseDate(dto.getDate()));
    setBigDecimal(to::setResults, dto.getResults());
    setObject(to::setType, QcType::new, dto.getQcTypeId());
    to.setDescription(dto.getDescription());
    setObject(to::setInstrument, InstrumentImpl::new, dto.getInstrumentId());
    setObject(to::setKit, KitDescriptor::new, dto.getKitDescriptorId());
    setString(to::setKitLot, dto.getKitLot());
    addQcControlRuns(dto.getControls(), to, QcTarget.valueOf(dto.getQcTarget()));
    return to;
}
Also used : SequencerPartitionContainer(uk.ac.bbsrc.tgac.miso.core.data.SequencerPartitionContainer) InstrumentImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.InstrumentImpl) ParentSample(uk.ac.bbsrc.tgac.miso.core.data.impl.view.ParentSample) DetailedSample(uk.ac.bbsrc.tgac.miso.core.data.DetailedSample) Sample(uk.ac.bbsrc.tgac.miso.core.data.Sample) WorksetSample(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetSample) GrandparentSample(uk.ac.bbsrc.tgac.miso.core.data.impl.view.GrandparentSample) TransferSample(uk.ac.bbsrc.tgac.miso.core.data.impl.transfer.TransferSample) SampleQC(uk.ac.bbsrc.tgac.miso.core.data.qc.SampleQC) RequisitionQC(uk.ac.bbsrc.tgac.miso.core.data.qc.RequisitionQC) LibraryQC(uk.ac.bbsrc.tgac.miso.core.data.qc.LibraryQC) PoolImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl) LibraryQC(uk.ac.bbsrc.tgac.miso.core.data.qc.LibraryQC) PoolQC(uk.ac.bbsrc.tgac.miso.core.data.qc.PoolQC) QC(uk.ac.bbsrc.tgac.miso.core.data.qc.QC) SampleQC(uk.ac.bbsrc.tgac.miso.core.data.qc.SampleQC) ContainerQC(uk.ac.bbsrc.tgac.miso.core.data.qc.ContainerQC) RequisitionQC(uk.ac.bbsrc.tgac.miso.core.data.qc.RequisitionQC) KitDescriptor(uk.ac.bbsrc.tgac.miso.core.data.impl.kit.KitDescriptor) LibraryImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.LibraryImpl) DetailedLibraryImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryImpl) SequencerPartitionContainerImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl) TransferPool(uk.ac.bbsrc.tgac.miso.core.data.impl.transfer.TransferPool) Pool(uk.ac.bbsrc.tgac.miso.core.data.Pool) InstrumentStatusPositionRunPool(uk.ac.bbsrc.tgac.miso.core.data.impl.view.instrumentstatus.InstrumentStatusPositionRunPool) ContainerQC(uk.ac.bbsrc.tgac.miso.core.data.qc.ContainerQC) TransferLibrary(uk.ac.bbsrc.tgac.miso.core.data.impl.transfer.TransferLibrary) ParentLibrary(uk.ac.bbsrc.tgac.miso.core.data.impl.view.ParentLibrary) DetailedLibrary(uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary) WorksetLibrary(uk.ac.bbsrc.tgac.miso.core.data.impl.workset.WorksetLibrary) Library(uk.ac.bbsrc.tgac.miso.core.data.Library) IonTorrentRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto) QcHierarchyNodeDto(uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto) RunPositionDto(uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto) PacBioRunDto(uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto) Ls454RunDto(uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto) IlluminaNotificationDto(ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto) OxfordNanoporeRunDto(uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto) IlluminaRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto) NotificationDto(ca.on.oicr.gsi.runscanner.dto.NotificationDto) OxfordNanoporeNotificationDto(ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto) RunDto(uk.ac.bbsrc.tgac.miso.dto.run.RunDto) SolidRunDto(uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto) OrderAliquotDto(uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto) PoolQC(uk.ac.bbsrc.tgac.miso.core.data.qc.PoolQC) Requisition(uk.ac.bbsrc.tgac.miso.core.data.impl.Requisition) SampleImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleImpl) DetailedSampleImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedSampleImpl) QcType(uk.ac.bbsrc.tgac.miso.core.data.type.QcType)

Aggregations

SequencerPartitionContainer (uk.ac.bbsrc.tgac.miso.core.data.SequencerPartitionContainer)6 SequencerPartitionContainerImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SequencerPartitionContainerImpl)6 SequencingContainerModel (uk.ac.bbsrc.tgac.miso.core.data.impl.SequencingContainerModel)3 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)2 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)2 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)2 KitDescriptor (uk.ac.bbsrc.tgac.miso.core.data.impl.kit.KitDescriptor)2 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)2 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)2 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)2 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)2 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)2 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)2 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)2 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)2 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)2 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)2 Date (java.util.Date)1 DetailedLibrary (uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary)1 DetailedSample (uk.ac.bbsrc.tgac.miso.core.data.DetailedSample)1