use of uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary in project miso-lims by miso-lims.
the class BulkLibraryIT method testPropagate.
@Test
public void testPropagate() {
BulkLibraryPage page = BulkLibraryPage.getForPropagate(getDriver(), getBaseUrl(), Arrays.asList(100004L), Arrays.asList(1));
HandsOnTable table = page.getTable();
Map<String, String> attrs = Maps.newLinkedHashMap();
attrs.put(LibColumns.ID_BARCODE, "LIBT_PROP1");
attrs.put(LibColumns.DESCRIPTION, "LIBT propagate test");
attrs.put(LibColumns.SOP, "Library SOP 1 v.2.0");
attrs.put(LibColumns.DESIGN, "WG");
attrs.put(LibColumns.PLATFORM, "Illumina");
attrs.put(LibColumns.LIBRARY_TYPE, "Paired End");
attrs.put(LibColumns.INDEX_FAMILY, "Dual Index 6bp");
attrs.put(LibColumns.INDEX_1, "A01 (AAACCC)");
attrs.put(LibColumns.INDEX_2, "B01 (AAATTT)");
attrs.put(LibColumns.KIT_DESCRIPTOR, "Test Kit");
attrs.put(LibColumns.KIT_LOT, "20200728");
attrs.put(LibColumns.QC_STATUS, "Ready");
attrs.put(LibColumns.SIZE, "123");
attrs.put(LibColumns.VOLUME, "6.66");
attrs.put(LibColumns.CONCENTRATION, "12.57");
fillRow(table, 0, attrs);
// should be set by selecting Design
attrs.put(LibColumns.CODE, "WG (Whole Genome)");
attrs.put(LibColumns.SELECTION, "PCR");
attrs.put(LibColumns.STRATEGY, "WGS");
assertColumnValues(table, 0, attrs, "pre-save");
assertTrue(page.save(false));
HandsOnTable savedTable = page.getTable();
Long newId = getSavedId(savedTable, 0);
DetailedLibrary saved = (DetailedLibrary) getSession().get(LibraryImpl.class, newId);
assertDetailedLibraryAttributes(attrs, saved);
}
use of uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary in project miso-lims by miso-lims.
the class BulkLibraryIT method testRemoveFromBox.
@Test
public void testRemoveFromBox() {
Long libId = 100006L;
DetailedLibrary before = (DetailedLibrary) getSession().get(LibraryImpl.class, libId);
assertNotNull(before.getBox());
assertEquals("BOX100001", before.getBox().getName());
assertEquals("A02", before.getBoxPosition());
BulkLibraryPage page = BulkLibraryPage.getForEdit(getDriver(), getBaseUrl(), Sets.newHashSet(libId));
HandsOnTable table = page.getTable();
table.clearField(LibColumns.BOX_ALIAS, 0);
assertTrue(page.save(false));
DetailedLibrary after = (DetailedLibrary) getSession().get(LibraryImpl.class, libId);
assertNull(after.getBox());
assertNull(after.getBoxPosition());
}
use of uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary in project miso-lims by miso-lims.
the class BulkLibraryIT method testEditChangeValues.
@Test
public void testEditChangeValues() {
BulkLibraryPage page = BulkLibraryPage.getForEdit(getDriver(), getBaseUrl(), Sets.newHashSet(100001L));
HandsOnTable table = page.getTable();
// test initial values
Map<String, String> attrs = Maps.newLinkedHashMap();
attrs.put(LibColumns.NAME, "LIB100001");
attrs.put(LibColumns.ALIAS, "LIBT_0001_Ly_P_PE_251_WG");
attrs.put(LibColumns.ID_BARCODE, "libbar100001");
attrs.put(LibColumns.DESCRIPTION, "libdesc100001");
attrs.put(LibColumns.DESIGN, "");
attrs.put(LibColumns.CODE, "WG (Whole Genome)");
attrs.put(LibColumns.PLATFORM, "Illumina");
attrs.put(LibColumns.LIBRARY_TYPE, "Paired End");
attrs.put(LibColumns.SELECTION, "PCR");
attrs.put(LibColumns.STRATEGY, "WGS");
attrs.put(LibColumns.INDEX_FAMILY, "Dual Index 6bp");
attrs.put(LibColumns.INDEX_1, "A01 (AAACCC)");
attrs.put(LibColumns.INDEX_2, "B01 (AAATTT)");
attrs.put(LibColumns.KIT_DESCRIPTOR, "Test Kit");
attrs.put(LibColumns.QC_STATUS, "Failed: QC");
attrs.put(LibColumns.SIZE, "251");
attrs.put(LibColumns.VOLUME, "2.5");
attrs.put(LibColumns.CONCENTRATION, "10.0");
attrs.put(LibColumns.SPIKE_IN, "Spike-In One");
attrs.put(LibColumns.SPIKE_IN_DILUTION, "1:10");
attrs.put(LibColumns.SPIKE_IN_VOL, "12.34");
assertColumnValues(table, 0, attrs, "loaded");
Map<String, String> changes = Maps.newLinkedHashMap();
changes.put(LibColumns.ALIAS, "LIBT_0001_Ly_P_PE_241_WG");
changes.put(LibColumns.ID_BARCODE, "changed100001");
changes.put(LibColumns.DESCRIPTION, "changed100001");
changes.put(LibColumns.DESIGN, "EX");
changes.put(LibColumns.LIBRARY_TYPE, "Single End");
changes.put(LibColumns.INDEX_FAMILY, "Single Index 6bp");
changes.put(LibColumns.INDEX_1, "Index 01 (AAAAAA)");
changes.put(LibColumns.KIT_DESCRIPTOR, "Test Kit Two");
changes.put(LibColumns.QC_STATUS, "Ready");
changes.put(LibColumns.SIZE, "241");
changes.put(LibColumns.VOLUME, "1.88");
changes.put(LibColumns.CONCENTRATION, "12.34");
fillRow(table, 0, changes);
// unchanged
changes.put(LibColumns.NAME, "LIB100001");
changes.put(LibColumns.PLATFORM, "Illumina");
// set based on other changes
changes.put(LibColumns.CODE, "EX (Exome)");
changes.put(LibColumns.SELECTION, "Hybrid Selection");
changes.put(LibColumns.STRATEGY, "WXS");
changes.put(LibColumns.INDEX_2, "");
assertColumnValues(table, 0, changes, "changes pre-save");
assertTrue(page.save(false));
DetailedLibrary lib = (DetailedLibrary) getSession().get(LibraryImpl.class, 100001L);
assertDetailedLibraryAttributes(changes, lib);
}
use of uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary in project miso-lims by miso-lims.
the class BulkLibraryIT method testReceipt.
@Test
public void testReceipt() {
BulkLibraryPage page = BulkLibraryPage.getForReceive(getDriver(), getBaseUrl(), 1, null, 15L);
HandsOnTable table = page.getTable();
Map<String, String> attrs = Maps.newLinkedHashMap();
attrs.put(SamColumns.SAMPLE_TYPE, "GENOMIC");
attrs.put(SamColumns.SCIENTIFIC_NAME, "Homo sapiens");
attrs.put(SamColumns.PROJECT, "LIBT");
attrs.put(SamColumns.EXTERNAL_NAME, "lkjh");
attrs.put(SamColumns.DONOR_SEX, "Unknown");
attrs.put(SamColumns.TISSUE_ORIGIN, "Bn (Brain)");
attrs.put(SamColumns.TISSUE_TYPE, "P (Primary tumour)");
attrs.put(SamColumns.TIMES_RECEIVED, "3");
attrs.put(SamColumns.TUBE_NUMBER, "4");
attrs.put(LibColumns.ID_BARCODE, "LIBT_RCV1");
attrs.put(LibColumns.DESCRIPTION, "LIBT receive test");
attrs.put(LibColumns.RECEIVE_DATE, "2017-10-12");
attrs.put(LibColumns.RECEIVE_TIME, "3:00 pm");
attrs.put(LibColumns.RECEIVED_FROM, "University Health Network - BioBank");
attrs.put(LibColumns.RECEIVED_BY, "TestGroupOne");
attrs.put(LibColumns.RECEIPT_CONFIRMED, "True");
attrs.put(LibColumns.RECEIPT_QC_PASSED, "True");
attrs.put(LibColumns.RECEIPT_QC_NOTE, "");
attrs.put(LibColumns.DESIGN, "WG");
attrs.put(LibColumns.PLATFORM, "Illumina");
attrs.put(LibColumns.LIBRARY_TYPE, "Paired End");
attrs.put(LibColumns.INDEX_FAMILY, "Dual Index 6bp");
attrs.put(LibColumns.INDEX_1, "A01 (AAACCC)");
attrs.put(LibColumns.INDEX_2, "B01 (AAATTT)");
attrs.put(LibColumns.KIT_DESCRIPTOR, "Test Kit");
attrs.put(LibColumns.QC_STATUS, "Ready");
attrs.put(LibColumns.SIZE, "123");
attrs.put(LibColumns.VOLUME, "6.66");
attrs.put(LibColumns.CONCENTRATION, "12.57");
fillRow(table, 0, attrs);
// should be set by selecting Design
attrs.put(LibColumns.CODE, "WG (Whole Genome)");
attrs.put(LibColumns.SELECTION, "PCR");
attrs.put(LibColumns.STRATEGY, "WGS");
assertColumnValues(table, 0, attrs, "pre-save");
assertTrue(page.save(false));
HandsOnTable savedTable = page.getTable();
Long newId = getSavedId(savedTable, 0);
DetailedLibrary saved = (DetailedLibrary) getSession().get(LibraryImpl.class, newId);
assertDetailedLibraryAttributes(attrs, saved);
assertParentSampleAttributes(attrs, saved);
}
use of uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary in project miso-lims by miso-lims.
the class BulkLibraryIT method testEditValueAdditions.
@Test
public void testEditValueAdditions() {
BulkLibraryPage page = BulkLibraryPage.getForEdit(getDriver(), getBaseUrl(), Sets.newHashSet(100003L));
HandsOnTable table = page.getTable();
Map<String, String> attrs = Maps.newLinkedHashMap();
attrs.put(LibColumns.NAME, "LIB100003");
attrs.put(LibColumns.ALIAS, "LIBT_0001_Ly_P_PE_253_WG");
attrs.put(LibColumns.ID_BARCODE, null);
attrs.put(LibColumns.DESCRIPTION, null);
attrs.put(LibColumns.DESIGN, "");
attrs.put(LibColumns.CODE, "WG (Whole Genome)");
attrs.put(LibColumns.PLATFORM, "Illumina");
attrs.put(LibColumns.LIBRARY_TYPE, "Paired End");
attrs.put(LibColumns.SELECTION, "PCR");
attrs.put(LibColumns.STRATEGY, "WGS");
attrs.put(LibColumns.INDEX_FAMILY, NO_INDEX_FAMILY);
attrs.put(LibColumns.INDEX_1, "");
attrs.put(LibColumns.INDEX_2, "");
attrs.put(LibColumns.KIT_DESCRIPTOR, "Test Kit");
attrs.put(LibColumns.QC_STATUS, "Not Ready");
attrs.put(LibColumns.SIZE, null);
attrs.put(LibColumns.VOLUME, null);
attrs.put(LibColumns.CONCENTRATION, null);
attrs.put(LibColumns.SPIKE_IN, null);
attrs.put(LibColumns.SPIKE_IN_DILUTION, null);
attrs.put(LibColumns.SPIKE_IN_VOL, null);
assertColumnValues(table, 0, attrs, "loaded");
Map<String, String> changes = Maps.newLinkedHashMap();
changes.put(LibColumns.ID_BARCODE, "changed_bar_100003");
changes.put(LibColumns.DESCRIPTION, "changed_desc_100003");
changes.put(LibColumns.DESIGN, "TS (PCR)");
changes.put(LibColumns.INDEX_FAMILY, "Dual Index 6bp");
changes.put(LibColumns.INDEX_1, "A04 (TTTGGG)");
changes.put(LibColumns.INDEX_2, "B04 (TTTAAA)");
changes.put(LibColumns.QC_STATUS, "Ready");
changes.put(LibColumns.SIZE, "253");
changes.put(LibColumns.VOLUME, "18.0");
changes.put(LibColumns.CONCENTRATION, "7.6");
fillRow(table, 0, changes);
// changed because of design
changes.put(LibColumns.CODE, "TS (Targeted Sequencing)");
changes.put(LibColumns.SELECTION, "PCR");
changes.put(LibColumns.STRATEGY, "AMPLICON");
// unchanged
attrs.forEach((key, val) -> {
if (!changes.containsKey(key)) {
changes.put(key, val);
}
});
assertColumnValues(table, 0, changes, "changes pre-save");
assertTrue(page.save(false));
DetailedLibrary lib = (DetailedLibrary) getSession().get(LibraryImpl.class, 100003L);
assertDetailedLibraryAttributes(changes, lib);
}
Aggregations