Search in sources :

Example 1 with SampleStockSingleCell

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

the class AbstractBulkSampleIT method assertAllForSingleCellAliquot.

protected void assertAllForSingleCellAliquot(Map<String, String> aliquot, Long sampleId, boolean newlyCreated) {
    SampleAliquotSingleCell target = (SampleAliquotSingleCell) getSession().get(SampleAliquotSingleCellImpl.class, sampleId);
    assertPlainSampleAttributes(aliquot, target, newlyCreated);
    assertDetailedSampleAttributes(aliquot, target);
    assertAnalyteAttributes(aliquot, target);
    assertAliquotAttributes(aliquot, target);
    assertSingleCellAliquotAttributes(aliquot, target);
    if (newlyCreated) {
        SampleStockSingleCell stockParent = LimsUtils.getParent(SampleStockSingleCell.class, target);
        assertSingleCellStockAttributes(aliquot, stockParent);
        SampleSingleCell singleCellParent = LimsUtils.getParent(SampleSingleCell.class, target);
        assertSingleCellAttributes(aliquot, singleCellParent);
        SampleTissue tissueParent = LimsUtils.getParent(SampleTissue.class, target);
        assertTissueAttributes(aliquot, tissueParent);
    }
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) SampleAliquotSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell) SampleAliquotSingleCellImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl) SampleStockSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleStockSingleCell) SampleSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleSingleCell)

Example 2 with SampleStockSingleCell

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

the class AbstractBulkSampleIT method assertAllForSingleCellStock.

protected void assertAllForSingleCellStock(Map<String, String> stock, Long sampleId, boolean newlyCreated) {
    SampleStockSingleCell target = (SampleStockSingleCell) getSession().get(SampleStockSingleCellImpl.class, sampleId);
    assertPlainSampleAttributes(stock, target, newlyCreated);
    assertDetailedSampleAttributes(stock, target);
    assertStockAttributes(stock, target);
    assertAnalyteAttributes(stock, target);
    assertSingleCellStockAttributes(stock, target);
    if (newlyCreated) {
        SampleTissue tissueParent = LimsUtils.getParent(SampleTissue.class, target);
        assertTissueAttributes(stock, tissueParent);
        SampleSingleCell singleCellParent = LimsUtils.getParent(SampleSingleCell.class, target);
        assertSingleCellAttributes(stock, singleCellParent);
        SampleIdentity identityAncestor = LimsUtils.getParent(SampleIdentity.class, target);
        assertIdentityAttributes(stock, identityAncestor);
    }
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) SampleIdentity(uk.ac.bbsrc.tgac.miso.core.data.SampleIdentity) SampleStockSingleCellImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockSingleCellImpl) SampleStockSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleStockSingleCell) SampleSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleSingleCell)

Example 3 with SampleStockSingleCell

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

the class Dtos method toStockSample.

private static SampleStock toStockSample(@Nonnull SampleStockDto from) {
    SampleStock to = null;
    if (from instanceof SampleStockSingleCellRelative) {
        SampleStockSingleCellRelative scFrom = (SampleStockSingleCellRelative) from;
        SampleStockSingleCell sc = new SampleStockSingleCellImpl();
        setBigDecimal(sc::setTargetCellRecovery, scFrom.getTargetCellRecovery());
        setBigDecimal(sc::setCellViability, scFrom.getCellViability());
        setBigDecimal(sc::setLoadingCellConcentration, scFrom.getLoadingCellConcentration());
        to = sc;
    } else if (from instanceof SampleStockRnaRelative) {
        SampleStockRnaRelative rnaFrom = (SampleStockRnaRelative) from;
        SampleStockRna rna = new SampleStockRnaImpl();
        setBoolean(rna::setDnaseTreated, rnaFrom.getDnaseTreated(), true);
        to = rna;
    } else {
        to = new SampleStockImpl();
    }
    if (from.getStrStatus() != null) {
        to.setStrStatus(from.getStrStatus());
    }
    setInteger(to::setSlidesConsumed, from.getSlidesConsumed(), true);
    setObject(to::setReferenceSlide, SampleSlideImpl::new, from.getReferenceSlideId());
    return to;
}
Also used : SampleSlideImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleSlideImpl) SampleStockRnaImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockRnaImpl) SampleStockRna(uk.ac.bbsrc.tgac.miso.core.data.SampleStockRna) SampleStockImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockImpl) SampleStockSingleCellImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockSingleCellImpl) 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) SampleStock(uk.ac.bbsrc.tgac.miso.core.data.SampleStock) SampleStockSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleStockSingleCell)

Example 4 with SampleStockSingleCell

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

the class Dtos method asStockSampleDto.

private static SampleStockDto asStockSampleDto(@Nonnull SampleStock from) {
    SampleStockDto dto = null;
    if (isStockSingleCellSample(from)) {
        SampleStockSingleCell scFrom = (SampleStockSingleCell) from;
        SampleStockSingleCellDto sc = new SampleStockSingleCellDto();
        setString(sc::setTargetCellRecovery, scFrom.getTargetCellRecovery());
        setString(sc::setCellViability, scFrom.getCellViability());
        setString(sc::setLoadingCellConcentration, scFrom.getLoadingCellConcentration());
        dto = sc;
    } else if (isStockRnaSample(from)) {
        SampleStockRna rnaFrom = (SampleStockRna) from;
        SampleStockRnaDto rna = new SampleStockRnaDto();
        setBoolean(rna::setDnaseTreated, rnaFrom.getDnaseTreated(), true);
        dto = rna;
    } else {
        dto = new SampleStockDto();
    }
    dto.setStrStatus(from.getStrStatus().getLabel());
    setInteger(dto::setSlidesConsumed, from.getSlidesConsumed(), true);
    setId(dto::setReferenceSlideId, from.getReferenceSlide());
    return dto;
}
Also used : SampleStockRna(uk.ac.bbsrc.tgac.miso.core.data.SampleStockRna) SampleStockSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleStockSingleCell)

Aggregations

SampleStockSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleStockSingleCell)4 SampleSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleSingleCell)2 SampleStockRna (uk.ac.bbsrc.tgac.miso.core.data.SampleStockRna)2 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)2 SampleStockSingleCellImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockSingleCellImpl)2 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)1 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)1 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)1 SampleAliquotSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell)1 SampleIdentity (uk.ac.bbsrc.tgac.miso.core.data.SampleIdentity)1 SampleStock (uk.ac.bbsrc.tgac.miso.core.data.SampleStock)1 SampleAliquotSingleCellImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl)1 SampleSlideImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleSlideImpl)1 SampleStockImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockImpl)1 SampleStockRnaImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockRnaImpl)1 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)1 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)1 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)1 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)1 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)1