Search in sources :

Example 1 with SampleStockRna

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

the class AbstractBulkSampleIT method assertAllForRnaAliquot.

protected void assertAllForRnaAliquot(Map<String, String> aliquot, Long sampleId, boolean newlyCreated) {
    SampleAliquotRna target = (SampleAliquotRna) getSession().get(SampleAliquotRnaImpl.class, sampleId);
    assertNotNull(target);
    assertPlainSampleAttributes(aliquot, target, newlyCreated);
    assertDetailedSampleAttributes(aliquot, target);
    assertAnalyteAttributes(aliquot, target);
    assertAliquotAttributes(aliquot, target);
    if (newlyCreated) {
        SampleStockRna stockParent = LimsUtils.getParent(SampleStockRna.class, target);
        assertStockAttributes(aliquot, stockParent);
        assertRnaStockSampleAttributes(aliquot, stockParent);
        SampleTissue tissueParent = LimsUtils.getParent(SampleTissue.class, target);
        assertTissueAttributes(aliquot, tissueParent);
    }
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) SampleAliquotRnaImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotRnaImpl) SampleStockRna(uk.ac.bbsrc.tgac.miso.core.data.SampleStockRna) SampleAliquotRna(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotRna)

Example 2 with SampleStockRna

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

the class AbstractBulkSampleIT method assertAllForRnaStock.

protected void assertAllForRnaStock(Map<String, String> stock, Long sampleId, boolean newlyCreated) {
    SampleStockRna target = (SampleStockRna) getSession().get(SampleStockImpl.class, sampleId);
    assertPlainSampleAttributes(stock, target, newlyCreated);
    assertDetailedSampleAttributes(stock, target);
    assertStockAttributes(stock, target);
    assertRnaStockSampleAttributes(stock, target);
    assertAnalyteAttributes(stock, target);
    if (newlyCreated) {
        SampleTissue tissueParent = LimsUtils.getParent(SampleTissue.class, target);
        assertTissueAttributes(stock, tissueParent);
        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) SampleStockRna(uk.ac.bbsrc.tgac.miso.core.data.SampleStockRna) SampleStockImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockImpl)

Example 3 with SampleStockRna

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

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

SampleStockRna (uk.ac.bbsrc.tgac.miso.core.data.SampleStockRna)4 SampleStockSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleStockSingleCell)2 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)2 SampleStockImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockImpl)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 SampleAliquotRna (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotRna)1 SampleIdentity (uk.ac.bbsrc.tgac.miso.core.data.SampleIdentity)1 SampleStock (uk.ac.bbsrc.tgac.miso.core.data.SampleStock)1 SampleAliquotRnaImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotRnaImpl)1 SampleSlideImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleSlideImpl)1 SampleStockRnaImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockRnaImpl)1 SampleStockSingleCellImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockSingleCellImpl)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 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)1