Search in sources :

Example 1 with TissuePieceType

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

the class Dtos method toTissuePieceSample.

private static SampleTissuePiece toTissuePieceSample(@Nonnull SampleTissuePieceDto from) {
    SampleTissuePiece to = new SampleTissuePieceImpl();
    TissuePieceType tissuePieceType = new TissuePieceType();
    tissuePieceType.setId(from.getTissuePieceTypeId());
    to.setTissuePieceType(tissuePieceType);
    to.setSlidesConsumed(from.getSlidesConsumed());
    setObject(to::setReferenceSlide, SampleSlideImpl::new, from.getReferenceSlideId());
    return to;
}
Also used : SampleSlideImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleSlideImpl) TissuePieceType(uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType) 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) SampleTissuePiece(uk.ac.bbsrc.tgac.miso.core.data.SampleTissuePiece) SampleTissuePieceImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissuePieceImpl)

Example 2 with TissuePieceType

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

the class Dtos method to.

public static TissuePieceType to(@Nonnull TissuePieceTypeDto from) {
    TissuePieceType to = new TissuePieceType();
    if (from.getId() != null)
        to.setId(from.getId());
    setString(to::setName, from.getName());
    setString(to::setAbbreviation, from.getAbbreviation());
    setString(to::setV2NamingCode, from.getV2NamingCode());
    setBoolean(to::setArchived, from.isArchived(), false);
    return to;
}
Also used : TissuePieceType(uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType) 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 TissuePieceType

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

the class V2SampleAliasGeneratorTest method makeLcmTube.

private SampleTissuePiece makeLcmTube() {
    SampleTissuePiece lcmTube = new SampleTissuePieceImpl();
    SampleTissue tissue = makeTissue();
    tissue.setAlias("PROJ_0001_01");
    lcmTube.setParent(tissue);
    lcmTube.setSiblingNumber(2);
    SampleClass sc = new SampleClassImpl();
    sc.setSampleCategory(SampleTissueProcessing.CATEGORY_NAME);
    lcmTube.setSampleClass(sc);
    TissuePieceType pieceType = new TissuePieceType();
    pieceType.setV2NamingCode("TL");
    lcmTube.setTissuePieceType(pieceType);
    return lcmTube;
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) SampleClass(uk.ac.bbsrc.tgac.miso.core.data.SampleClass) SampleClassImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleClassImpl) TissuePieceType(uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType) SampleTissuePiece(uk.ac.bbsrc.tgac.miso.core.data.SampleTissuePiece) SampleTissuePieceImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissuePieceImpl)

Example 4 with TissuePieceType

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

the class HibernateTissuePieceTypeDaoIT method testGetUsageByTissuePieces.

@Test
public void testGetUsageByTissuePieces() throws IOException {
    TissuePieceType type = (TissuePieceType) getSessionFactory().getCurrentSession().get(TissuePieceType.class, 1L);
    assertEquals("LCM Tube", type.getName());
    assertEquals(0L, sut.getUsage(type));
}
Also used : TissuePieceType(uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 5 with TissuePieceType

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

the class HibernateTissuePieceTypeDaoIT method testGet.

@Test
public void testGet() throws IOException {
    long id = 1L;
    TissuePieceType type = sut.get(id);
    assertNotNull(type);
    assertEquals(id, type.getId());
}
Also used : TissuePieceType(uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Aggregations

TissuePieceType (uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType)7 Test (org.junit.Test)4 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)4 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 SampleTissuePiece (uk.ac.bbsrc.tgac.miso.core.data.SampleTissuePiece)2 SampleTissuePieceImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissuePieceImpl)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 SampleClass (uk.ac.bbsrc.tgac.miso.core.data.SampleClass)1 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)1