Skip to content
Merged
3 changes: 2 additions & 1 deletion labcontrol/db/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,8 @@ def create(cls, process, container, volume, norm_gdna_composition,
The container with the composition
volume: float
The initial volume
norm_gdna_composition: labcontrol.db.composition.NormalizedGDNAComposition
norm_gdna_composition:
labcontrol.db.composition.NormalizedGDNAComposition
The source normalized gDNA composition
i5_composition: labcontrol.db.composition.PrimerComposition
The i5 composition
Expand Down
513 changes: 451 additions & 62 deletions labcontrol/db/process.py

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions labcontrol/db/support_files/patches/1.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- April 2, 2019
-- Implicitly track the date and time of plate creation
ALTER TABLE labman.plate ADD COLUMN creation_timestamp timestamp NOT NULL default now();

-- May 9, 2019
-- Add constraints to existing columns for wells.
ALTER TABLE labman.well ADD CONSTRAINT rowchk CHECK (row_num > 0);
ALTER TABLE labman.well ADD CONSTRAINT colchk CHECK (col_num > 0);
4 changes: 2 additions & 2 deletions labcontrol/db/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def reset_test_db():
client_secret = ('J7FfQ7CQdOxuKhQAf1eoGgBAE81Ns8Gu3EKaWFm3IO2JKh'
'AmmCWZuabe0O5Mp28s1')
qclient = QiitaClient(
"https://localhost:8383", client_id, client_secret,
server_cert=labcontrol.db.settings.labcontrol_settings.qiita_server_cert)
"https://localhost:8383", client_id, client_secret,
server_cert=labcontrol.db.settings.labcontrol_settings.qiita_server_cert)
qclient.post("/apitest/reset/")
# The above call resets the qiita schema. Qiita does not create the
# LabControl structures, so create them here
Expand Down

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions labcontrol/db/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ def load_data(filename):

NORM_PROCESS_PICKLIST = load_data('norm-process-picklist.txt')
NORM_PROCESS_PICKLIST_SID = load_data('norm-process-picklist-specimen-id.txt')
COMBINED_SAMPLES_PREP_EXAMPLE = load_data(
'experimental-plus-samples-prep-example.txt')
COMBINED_SAMPLES_AMPLICON_PREP_EXAMPLE = load_data(
'experimental-plus-samples-amplicon-prep-example.txt')
COMBINED_SAMPLES_METAGENOMICS_PREP_EXAMPLE = load_data(
'experimental-plus-samples-metagenomics-prep-example.txt')
SHOTGUN_SAMPLE_SHEET = load_data("shotgun_sample_sheet.txt")
POOLING_PROCESS_ECHO_PICKLIST = load_data("pooling-process-echo-picklist.txt")

Expand Down Expand Up @@ -1935,20 +1937,19 @@ def test_generate_amplicon_prep_information(self):
tester = SequencingProcess(1)
obs = tester.generate_prep_information()
exp_key = 'Test Run.1'
exp = {exp_key: COMBINED_SAMPLES_PREP_EXAMPLE}
exp = {exp_key: COMBINED_SAMPLES_AMPLICON_PREP_EXAMPLE}
self.assertEqual(len(obs), len(exp))
self.assertEqual(obs[exp_key], exp[exp_key])

def test_generate_metagenomics_prep_information(self):
# Shotgun run--prep not implemented
exp_err = "Prep file generation is not implemented for " \
"Metagenomics assays."
tester = SequencingProcess(2)
with self.assertRaisesRegex(ValueError, exp_err):
tester.generate_prep_information()
obs = tester.generate_prep_information()
exp_key = 'TestShotgunRun1'
exp = {exp_key: COMBINED_SAMPLES_METAGENOMICS_PREP_EXAMPLE}
self.assertEqual(len(obs), len(exp))
self.assertEqual(obs[exp_key], exp[exp_key])

def test_generate_prep_information_error(self):
# Shotgun run--prep not implemented
exp_err = "Prep file generation is not implemented for this assay " \
"type."
tester = SequencingProcess(3)
Expand Down
6 changes: 1 addition & 5 deletions labcontrol/gui/templates/sequence_run_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@
"<span class='glyphicon glyphicon-download'></span> " +
"Download Sample Sheet</a>";

// ToDo: #327
var preparationSheets = '';
if (row[assay_type] == 'Amplicon') {
preparationSheets = "<a href='/process/sequencing/" +
var preparationSheets = "<a href='/process/sequencing/" +
row[sequencing_process_id] +
"/preparation_sheets' class='btn btn-success'>" +
"<span class='glyphicon glyphicon-download'></span> " +
"Download Preparation Sheets</a>";
}
newData.push([row[process_id], row[run_name], row[experiment_name],
row[assay_type], row[pi_name], sampleSheet, preparationSheets]);
}
Expand Down