Search in sources :

Example 1 with TissueTypeImpl

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

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

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

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

the class AssayTestDto method to.

public AssayTest to() {
    AssayTest to = new AssayTest();
    setLong(to::setId, getId(), false);
    setString(to::setAlias, getAlias());
    setObject(to::setTissueType, TissueTypeImpl::new, getTissueTypeId());
    setObject(to::setExtractionClass, SampleClassImpl::new, getExtractionClassId());
    setBoolean(to::setNegateTissueType, isNegateTissueType(), false);
    setObject(to::setLibraryDesignCode, LibraryDesignCode::new, getLibraryDesignCodeId());
    setObject(to::setLibraryQualificationMethod, getLibraryQualificationMethod(), LibraryQualificationMethod::valueOf);
    setObject(to::setLibraryQualificationDesignCode, LibraryDesignCode::new, getLibraryQualificationDesignCodeId());
    setBoolean(to::setRepeatPerTimepoint, isRepeatPerTimepoint(), false);
    return to;
}
Also used : LibraryDesignCode(uk.ac.bbsrc.tgac.miso.core.data.LibraryDesignCode) AssayTest(uk.ac.bbsrc.tgac.miso.core.data.impl.AssayTest) SampleClassImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleClassImpl) LibraryQualificationMethod(uk.ac.bbsrc.tgac.miso.core.data.impl.AssayTest.LibraryQualificationMethod) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)

Example 5 with TissueTypeImpl

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

the class HibernateSampleDaoIT method getMatchingGhostTissueTest.

@Test
public void getMatchingGhostTissueTest() throws Exception {
    SampleTissue tissue = new SampleTissueImpl();
    tissue.setParent(new SampleIdentityImpl());
    tissue.getParent().setId(15L);
    tissue.setTissueOrigin(new TissueOriginImpl());
    tissue.getTissueOrigin().setId(1L);
    tissue.setTissueType(new TissueTypeImpl());
    tissue.getTissueType().setId(1L);
    tissue.setTimesReceived(1);
    tissue.setTubeNumber(1);
    SampleTissue match = dao.getMatchingGhostTissue(tissue);
    assertNotNull(match);
    assertEquals(16L, match.getId());
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) SampleIdentityImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleIdentityImpl) 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) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Aggregations

TissueTypeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl)9 TissueType (uk.ac.bbsrc.tgac.miso.core.data.TissueType)6 TissueOriginImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl)5 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)4 TissueOrigin (uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin)3 SampleTissueImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissueImpl)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 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)2 SampleClassImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleClassImpl)2 TissueMaterialImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl)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