Search in sources :

Example 1 with TissueType

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

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

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

the class OicrLibraryAliasValidatorTest method makeTissueTypes.

private static List<TissueType> makeTissueTypes() {
    return makeList(new String[] { "P", "R" }, alias -> {
        TissueType tt = new TissueTypeImpl();
        tt.setAlias(alias);
        return tt;
    });
}
Also used : TissueType(uk.ac.bbsrc.tgac.miso.core.data.TissueType) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)

Example 4 with TissueType

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

the class HibernateAssayTestDaoIT method getCreateItem.

@Override
public AssayTest getCreateItem() {
    AssayTest test = new AssayTest();
    test.setAlias("Test test");
    TissueType tissueType = (TissueType) currentSession().get(TissueTypeImpl.class, 1L);
    test.setTissueType(tissueType);
    SampleClass extractionClass = (SampleClass) currentSession().get(SampleClassImpl.class, 3L);
    test.setExtractionClass(extractionClass);
    LibraryDesignCode code = (LibraryDesignCode) currentSession().get(LibraryDesignCode.class, 2L);
    test.setLibraryDesignCode(code);
    test.setLibraryQualificationMethod(AssayTest.LibraryQualificationMethod.LOW_DEPTH_SEQUENCING);
    return test;
}
Also used : LibraryDesignCode(uk.ac.bbsrc.tgac.miso.core.data.LibraryDesignCode) AssayTest(uk.ac.bbsrc.tgac.miso.core.data.impl.AssayTest) TissueType(uk.ac.bbsrc.tgac.miso.core.data.TissueType) SampleClass(uk.ac.bbsrc.tgac.miso.core.data.SampleClass) SampleClassImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleClassImpl) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)

Example 5 with TissueType

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

the class HibernateTissueTypeDaoIT method testUpdate.

@Test
public void testUpdate() throws IOException {
    long id = 1L;
    String alias = "New Name";
    TissueType tt = (TissueType) getSessionFactory().getCurrentSession().get(TissueTypeImpl.class, id);
    assertNotEquals(alias, tt.getAlias());
    tt.setAlias(alias);
    sut.update(tt);
    clearSession();
    TissueType saved = (TissueType) getSessionFactory().getCurrentSession().get(TissueTypeImpl.class, id);
    assertEquals(alias, saved.getAlias());
}
Also used : TissueType(uk.ac.bbsrc.tgac.miso.core.data.TissueType) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Aggregations

TissueType (uk.ac.bbsrc.tgac.miso.core.data.TissueType)11 TissueTypeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)9 Test (org.junit.Test)5 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)5 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)3 TissueOrigin (uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin)3 TissueOriginImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl)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 SampleClass (uk.ac.bbsrc.tgac.miso.core.data.SampleClass)2 SampleClassImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleClassImpl)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