Search in sources :

Example 1 with TissueOrigin

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

the class OicrSampleAliasGeneratorTest method makeTissueFromTissue.

private SampleTissue makeTissueFromTissue() throws Exception {
    SampleTissue parent = (SampleTissue) makeFullTissue();
    parent.setAlias("PROJ_0001_Bn_P_nn_1-1");
    parent.setParent(makeIdentity());
    SampleTissue child = new SampleTissueImpl();
    SampleClass sc = new SampleClassImpl();
    sc.setSampleCategory(SampleTissue.CATEGORY_NAME);
    child.setSampleClass(sc);
    child.setParent(parent);
    child.setTimesReceived(1);
    child.setTubeNumber(1);
    TissueOrigin to = new TissueOriginImpl();
    to.setAlias("Bn");
    child.setTissueOrigin(to);
    TissueType tt = new TissueTypeImpl();
    tt.setAlias("O");
    child.setTissueType(tt);
    return child;
}
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) TissueOrigin(uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin) TissueType(uk.ac.bbsrc.tgac.miso.core.data.TissueType) TissueOriginImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl) SampleTissueImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissueImpl) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)

Example 2 with TissueOrigin

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

the class OicrSampleAliasGeneratorTest method makeFullTissue.

private Sample makeFullTissue() {
    SampleTissue tissue = makeMinimalTissue();
    TissueOrigin to = new TissueOriginImpl();
    to.setAlias("Bn");
    tissue.setTissueOrigin(to);
    TissueType tt = new TissueTypeImpl();
    tt.setAlias("P");
    tissue.setTissueType(tt);
    tissue.setPassageNumber(32);
    tissue.setTimesReceived(2);
    tissue.setTubeNumber(3);
    return tissue;
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) TissueOrigin(uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin) TissueType(uk.ac.bbsrc.tgac.miso.core.data.TissueType) TissueOriginImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)

Example 3 with TissueOrigin

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

the class Dtos method to.

public static TissueOrigin to(TissueOriginDto from) {
    TissueOrigin to = new TissueOriginImpl();
    if (from.getId() != null)
        to.setId(from.getId());
    setString(to::setAlias, from.getAlias());
    setString(to::setDescription, from.getDescription());
    return to;
}
Also used : TissueOrigin(uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin) TissueOriginImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl) 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 4 with TissueOrigin

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

the class HibernateTissueOriginDaoIT method testGetByAlias.

@Test
public void testGetByAlias() throws Exception {
    String alias = "Test Origin";
    TissueOrigin origin = getTestSubject().getByAlias(alias);
    assertNotNull(origin);
    assertEquals(alias, origin.getAlias());
}
Also used : TissueOrigin(uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin) AbstractHibernateSaveDaoTest(uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest) Test(org.junit.Test)

Example 5 with TissueOrigin

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

the class Dtos method toTissueSample.

private static SampleTissue toTissueSample(@Nonnull SampleTissueDto from) {
    SampleTissue to = new SampleTissueImpl();
    to.setPassageNumber(from.getPassageNumber());
    to.setTimesReceived(from.getTimesReceived());
    to.setTubeNumber(from.getTubeNumber());
    to.setRegion(nullifyStringIfBlank(from.getRegion()));
    to.setSecondaryIdentifier(from.getSecondaryIdentifier());
    if (from.getTissueOriginId() != null) {
        TissueOrigin tissueOrigin = new TissueOriginImpl();
        tissueOrigin.setId(from.getTissueOriginId());
        to.setTissueOrigin(tissueOrigin);
    }
    if (from.getTissueTypeId() != null) {
        TissueType tissueType = new TissueTypeImpl();
        tissueType.setId(from.getTissueTypeId());
        to.setTissueType(tissueType);
    }
    if (from.getTissueMaterialId() != null) {
        TissueMaterial tissueMaterial = new TissueMaterialImpl();
        tissueMaterial.setId(from.getTissueMaterialId());
        to.setTissueMaterial(tissueMaterial);
    }
    if (from.getLabId() != null) {
        Lab lab = new LabImpl();
        lab.setId(from.getLabId());
        to.setLab(lab);
    }
    setString(to::setTimepoint, from.getTimepoint());
    return to;
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) TissueMaterialImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl) TissueOrigin(uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin) TissueType(uk.ac.bbsrc.tgac.miso.core.data.TissueType) TissueMaterial(uk.ac.bbsrc.tgac.miso.core.data.TissueMaterial) TissueOriginImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl) LabImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.LabImpl) 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) SampleTissueImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissueImpl) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl) Lab(uk.ac.bbsrc.tgac.miso.core.data.Lab)

Aggregations

TissueOrigin (uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin)8 TissueOriginImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl)7 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)3 TissueType (uk.ac.bbsrc.tgac.miso.core.data.TissueType)3 TissueTypeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)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 Test (org.junit.Test)2 AbstractHibernateSaveDaoTest (uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest)2 SampleTissueImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissueImpl)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