From e10385301e2a5333b054b05a5699711950ad56ce Mon Sep 17 00:00:00 2001 From: Andrew Sparkes Date: Fri, 26 Jul 2024 13:11:22 +0100 Subject: [PATCH 1/2] fixed typo --- app/sequencescape_excel/sequencescape_excel/validation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/sequencescape_excel/sequencescape_excel/validation.rb b/app/sequencescape_excel/sequencescape_excel/validation.rb index 346526ddd8..ad0b7e0843 100644 --- a/app/sequencescape_excel/sequencescape_excel/validation.rb +++ b/app/sequencescape_excel/sequencescape_excel/validation.rb @@ -68,7 +68,7 @@ def inspect ## # formula1 is defined within the options, however it needs to be updated # with: - # 1) A provided rage in the case of lists + # 1) A provided range in the case of lists # 2) Proper cell names in the case of custom formulas # 3) AXLSX doesn't escape text fields for us, so we do that ourselves def formula1 From c125c64ba33b4befc8280ead59b7aeaa698773cc Mon Sep 17 00:00:00 2001 From: Andrew Sparkes Date: Fri, 26 Jul 2024 13:14:03 +0100 Subject: [PATCH 2/2] added version of specimen barcode column with mandatory text length range for anospp pipeline --- config/sample_manifest_excel/columns.yml | 20 +++++++++++++++++++ .../sample_manifest_excel/manifest_types.yml | 2 +- spec/data/sample_manifest_excel/columns.yml | 20 +++++++++++++++++++ .../sample_manifest_excel/manifest_types.yml | 2 +- 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/config/sample_manifest_excel/columns.yml b/config/sample_manifest_excel/columns.yml index 54f8febbcf..6bd16407f1 100644 --- a/config/sample_manifest_excel/columns.yml +++ b/config/sample_manifest_excel/columns.yml @@ -731,6 +731,26 @@ sample_description_specimen_plate_barcode: operator: ">" operand: 20 is_number: +sample_description_specimen_plate_barcode_mandatory: + heading: SAMPLE DESCRIPTION + updates: sample_description + unlocked: true + validation: + options: + type: :custom + operator: :between + formula1: "=AND(LEN(A1)>=7,LEN(A1)<=11)" + allowBlank: false + showInputMessage: true + promptTitle: "Sample Description - Specimen Plate Barcode" + prompt: "Please enter the specimen plate barcode (NB. should be the same for all wells on the input plate, and between 7 and 11 characters in length)." + showErrorMessage: true + errorStyle: :stop + errorTitle: "Sample Description - Specimen Plate Barcode" + error: "The barcode length must be between 7 and 11 characters in length." + conditional_formattings: + empty_mandatory_cell: + is_number: sample_strain_att: heading: STRAIN unlocked: true diff --git a/config/sample_manifest_excel/manifest_types.yml b/config/sample_manifest_excel/manifest_types.yml index 3dd6ddd915..4c29a4c456 100644 --- a/config/sample_manifest_excel/manifest_types.yml +++ b/config/sample_manifest_excel/manifest_types.yml @@ -273,7 +273,7 @@ plate_anospp: - :date_of_sample_collection - :sample_taxon_id - :sample_common_name - - :sample_description_specimen_plate_barcode + - :sample_description_specimen_plate_barcode_mandatory - :sample_type - :donor_id - :control_type diff --git a/spec/data/sample_manifest_excel/columns.yml b/spec/data/sample_manifest_excel/columns.yml index 405efbb1dc..8199b9d64c 100644 --- a/spec/data/sample_manifest_excel/columns.yml +++ b/spec/data/sample_manifest_excel/columns.yml @@ -686,6 +686,26 @@ sample_description_specimen_plate_barcode: operator: ">" operand: 20 is_number: +sample_description_specimen_plate_barcode_mandatory: + heading: SAMPLE DESCRIPTION + updates: sample_description + unlocked: true + validation: + options: + type: :custom + operator: :between + formula1: "=AND(LEN(A1)>=7,LEN(A1)<=11)" + allowBlank: false + showInputMessage: true + promptTitle: "Sample Description - Specimen Plate Barcode" + prompt: "Please enter the specimen plate barcode (NB. should be the same for all wells on the input plate, and between 7 and 11 characters in length)." + showErrorMessage: true + errorStyle: :stop + errorTitle: "Sample Description - Specimen Plate Barcode" + error: "The barcode length must be between 7 and 11 characters in length." + conditional_formattings: + empty_mandatory_cell: + is_number: sample_strain_att: heading: STRAIN unlocked: true diff --git a/spec/data/sample_manifest_excel/manifest_types.yml b/spec/data/sample_manifest_excel/manifest_types.yml index 40e08b82c8..d6c5c5aeae 100644 --- a/spec/data/sample_manifest_excel/manifest_types.yml +++ b/spec/data/sample_manifest_excel/manifest_types.yml @@ -206,7 +206,7 @@ plate_anospp: - :date_of_sample_collection - :sample_taxon_id - :sample_common_name - - :sample_description_specimen_plate_barcode + - :sample_description_specimen_plate_barcode_mandatory - :sample_type - :donor_id - :control_type