Search in sources :

Example 1 with InstrumentImpl

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

the class DefaultRunServiceTest method makeSequencer.

private static Instrument makeSequencer() {
    Instrument inst = new InstrumentImpl();
    inst.setId(1L);
    inst.setName(SEQUENCER_NAME);
    inst.setInstrumentModel(makeInstrumentModel());
    return inst;
}
Also used : InstrumentImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.InstrumentImpl) Instrument(uk.ac.bbsrc.tgac.miso.core.data.Instrument)

Example 2 with InstrumentImpl

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

the class Dtos method to.

public static Instrument to(@Nonnull InstrumentDto dto) {
    Instrument to = new InstrumentImpl();
    setLong(to::setId, dto.getId(), false);
    setDate(to::setDateCommissioned, dto.getDateCommissioned());
    setDate(to::setDateDecommissioned, dto.getDateDecommissioned());
    setString(to::setName, dto.getName());
    setObject(to::setInstrumentModel, InstrumentModel::new, dto.getInstrumentModelId());
    setString(to::setSerialNumber, dto.getSerialNumber());
    setObject(to::setUpgradedInstrument, InstrumentImpl::new, dto.getUpgradedInstrumentId());
    setObject(to::setDefaultRunPurpose, RunPurpose::new, dto.getDefaultRunPurposeId());
    setString(to::setIdentificationBarcode, dto.getIdentificationBarcode());
    setObject(to::setWorkstation, Workstation::new, dto.getWorkstationId());
    return to;
}
Also used : Workstation(uk.ac.bbsrc.tgac.miso.core.data.Workstation) RunPurpose(uk.ac.bbsrc.tgac.miso.core.data.impl.RunPurpose) InstrumentImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.InstrumentImpl) Instrument(uk.ac.bbsrc.tgac.miso.core.data.Instrument) InstrumentModel(uk.ac.bbsrc.tgac.miso.core.data.InstrumentModel) 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 3 with InstrumentImpl

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

the class Dtos method to.

public static final ArrayRun to(@Nonnull ArrayRunDto from) {
    ArrayRun run = new ArrayRun();
    if (from.getId() != null) {
        run.setId(from.getId());
    }
    run.setAlias(from.getAlias());
    run.setDescription(nullifyStringIfBlank(from.getDescription()));
    run.setFilePath(nullifyStringIfBlank(from.getFilePath()));
    setObject(run::setInstrument, InstrumentImpl::new, from.getInstrumentId());
    setObject(run::setArray, Array::new, from.getArrayId());
    run.setHealth(HealthType.get(from.getStatus()));
    setDate(run::setStartDate, from.getStartDate());
    setDate(run::setCompletionDate, from.getCompletionDate());
    setDate(run::setLastModified, from.getLastModified());
    return run;
}
Also used : Array(uk.ac.bbsrc.tgac.miso.core.data.Array) InstrumentImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.InstrumentImpl) ArrayRun(uk.ac.bbsrc.tgac.miso.core.data.ArrayRun)

Example 4 with InstrumentImpl

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

the class Dtos method to.

public static Run to(@Nonnull RunDto dto) {
    Run to = getPlatformRun(dto);
    setLong(to::setId, dto.getId(), false);
    setString(to::setName, dto.getName());
    setString(to::setAlias, dto.getAlias());
    setString(to::setDescription, dto.getDescription());
    setObject(to::setHealth, dto.getStatus(), status -> HealthType.get(status));
    setString(to::setAccession, dto.getAccession());
    setObject(to::setSequencer, InstrumentImpl::new, dto.getInstrumentId());
    setDate(to::setStartDate, dto.getStartDate());
    setDate(to::setCompletionDate, dto.getEndDate());
    setObject(to::setSequencingParameters, SequencingParameters::new, dto.getSequencingParametersId());
    setObject(to::setSequencingKit, KitDescriptor::new, dto.getSequencingKitId());
    setString(to::setSequencingKitLot, dto.getSequencingKitLot());
    setString(to::setFilePath, dto.getRunPath());
    setBoolean(to::setQcPassed, dto.getQcPassed(), true);
    setBoolean(to::setDataReview, dto.getDataReview(), true);
    setObject(to::setSop, Sop::new, dto.getSopId());
    setObject(to::setDataManglingPolicy, dto.getDataManglingPolicy(), InstrumentDataManglingPolicy::valueOf);
    return to;
}
Also used : InstrumentDataManglingPolicy(uk.ac.bbsrc.tgac.miso.core.data.InstrumentDataManglingPolicy) KitDescriptor(uk.ac.bbsrc.tgac.miso.core.data.impl.kit.KitDescriptor) InstrumentImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.InstrumentImpl) Sop(uk.ac.bbsrc.tgac.miso.core.data.impl.Sop) SequencingParameters(uk.ac.bbsrc.tgac.miso.core.data.SequencingParameters) OxfordNanoporeRun(uk.ac.bbsrc.tgac.miso.core.data.OxfordNanoporeRun) SolidRun(uk.ac.bbsrc.tgac.miso.core.data.SolidRun) QcControlRun(uk.ac.bbsrc.tgac.miso.core.data.qc.QcControlRun) LibraryQcControlRun(uk.ac.bbsrc.tgac.miso.core.data.qc.LibraryQcControlRun) SampleQcControlRun(uk.ac.bbsrc.tgac.miso.core.data.qc.SampleQcControlRun) IlluminaRun(uk.ac.bbsrc.tgac.miso.core.data.IlluminaRun) ArrayRun(uk.ac.bbsrc.tgac.miso.core.data.ArrayRun) Run(uk.ac.bbsrc.tgac.miso.core.data.Run) LS454Run(uk.ac.bbsrc.tgac.miso.core.data.LS454Run) IonTorrentRun(uk.ac.bbsrc.tgac.miso.core.data.IonTorrentRun) InstrumentStatusPositionRun(uk.ac.bbsrc.tgac.miso.core.data.impl.view.instrumentstatus.InstrumentStatusPositionRun) PoolQcControlRun(uk.ac.bbsrc.tgac.miso.core.data.qc.PoolQcControlRun) PacBioRun(uk.ac.bbsrc.tgac.miso.core.data.PacBioRun) ContainerQcControlRun(uk.ac.bbsrc.tgac.miso.core.data.qc.ContainerQcControlRun) 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 InstrumentImpl

use of uk.ac.bbsrc.tgac.miso.core.data.impl.InstrumentImpl 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

InstrumentImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.InstrumentImpl)9 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)5 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)5 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)5 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)5 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)5 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)5 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)5 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)5 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)5 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)5 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)5 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)5 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)5 Instrument (uk.ac.bbsrc.tgac.miso.core.data.Instrument)3 KitDescriptor (uk.ac.bbsrc.tgac.miso.core.data.impl.kit.KitDescriptor)3 ArrayRun (uk.ac.bbsrc.tgac.miso.core.data.ArrayRun)2 DetailedLibrary (uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary)2 InstrumentModel (uk.ac.bbsrc.tgac.miso.core.data.InstrumentModel)2 Library (uk.ac.bbsrc.tgac.miso.core.data.Library)2