use of uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryImpl in project miso-lims by miso-lims.
the class V2LibraryAliasGeneratorTest method constructHierarchy.
private static Library constructHierarchy(String identityNumber, String tissueNumber) {
SampleIdentity identity = new SampleIdentityImpl();
identity.setAlias("TEST_" + identityNumber);
SampleTissue tissue = new SampleTissueImpl();
tissue.setParent(identity);
tissue.setAlias("TEST_" + identityNumber + "_" + tissueNumber);
SampleStock stock = new SampleStockImpl();
stock.setParent(tissue);
stock.setAlias("TEST_" + identityNumber + "_" + tissueNumber + "_SG01");
SampleAliquot aliquot = new SampleAliquotImpl();
aliquot.setParent(stock);
aliquot.setAlias("TEST_" + identityNumber + "_" + tissueNumber + "_SG01-02");
DetailedLibrary lib = new DetailedLibraryImpl();
lib.setSample(aliquot);
return lib;
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryImpl in project miso-lims by miso-lims.
the class OicrLibraryAliasGeneratorTest method testGenerateOxfordNanoporeAlias.
@Test
public void testGenerateOxfordNanoporeAlias() throws Exception {
DetailedLibrary library = new DetailedLibraryImpl();
library.setPlatformType(PlatformType.OXFORDNANOPORE);
DetailedSample sample = new DetailedSampleImpl();
sample.setAlias("LALA_1234567_Ly_R_nn_1-1_D_1");
library.setSample(sample);
LibraryType libraryType = new LibraryType();
libraryType.setAbbreviation("RPD");
library.setLibraryType(libraryType);
library.setDnaSize(300);
LibraryDesignCode code = new LibraryDesignCode();
code.setCode("WG");
library.setLibraryDesignCode(code);
Mockito.when(siblingNumberGenerator.getNextSiblingNumber(Mockito.any(), Mockito.any())).thenReturn(5);
assertEquals("LALA_1234567_Ly_R_RPD_WG_5", sut.generate(library));
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryImpl in project miso-lims by miso-lims.
the class Dtos method toDetailed.
private static DetailedLibraryAliquot toDetailed(DetailedLibraryAliquotDto from) {
DetailedLibraryAliquot to = new DetailedLibraryAliquot();
setBoolean(to::setNonStandardAlias, from.isNonStandardAlias(), false);
setObject(to::setLibraryDesignCode, LibraryDesignCode::new, from.getLibraryDesignCodeId());
setString(to::setGroupId, from.getGroupId());
setString(to::setGroupDescription, from.getGroupDescription());
setObject(to::setLibrary, DetailedLibraryImpl::new, from.getLibraryId());
setObject(to::setParentAliquot, DetailedLibraryAliquot::new, from.getParentAliquotId());
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryImpl in project miso-lims by miso-lims.
the class OicrLibraryAliasGeneratorTest method testGeneratePacBioLibraryAlias.
@Test
public void testGeneratePacBioLibraryAlias() throws Exception {
DetailedLibrary library = new DetailedLibraryImpl();
library.setPlatformType(PlatformType.PACBIO);
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
library.setCreationDate(df.parse("2017-09-13"));
DetailedSample parent = new DetailedSampleImpl();
parent.setAlias("PROJ_1234_Pa_P_nn_1-1_D_8");
library.setSample(parent);
Mockito.when(siblingNumberGenerator.getNextSiblingNumber(Mockito.any(), Mockito.any())).thenReturn(2);
assertEquals("PROJ_1234_20170913_2", sut.generate(library));
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedLibraryImpl in project miso-lims by miso-lims.
the class OicrLibraryAliasGeneratorTest method testGenerateIlluminaLibraryAlias.
@Test
public void testGenerateIlluminaLibraryAlias() throws Exception {
DetailedLibrary library = new DetailedLibraryImpl();
library.setPlatformType(PlatformType.ILLUMINA);
DetailedSample sample = new DetailedSampleImpl();
sample.setAlias("BART_1273_Br_P_nn_1-1_D_1");
library.setSample(sample);
LibraryType libraryType = new LibraryType();
libraryType.setAbbreviation("PE");
library.setLibraryType(libraryType);
library.setDnaSize(300);
LibraryDesignCode code = new LibraryDesignCode();
code.setCode("WG");
library.setLibraryDesignCode(code);
assertEquals("BART_1273_Br_P_PE_300_WG", sut.generate(library));
}
Aggregations