From 84490125129d7771c4204ce494a65093a2a9c0bb Mon Sep 17 00:00:00 2001 From: Dominique Date: Tue, 26 Mar 2024 14:34:32 +0100 Subject: [PATCH] Dom water validation (#157) * fixed #156 --- README.md | 1 + ptmd/lib/validator/validate_identifier.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a631a2f..5e2b630 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ two sheets: - a first sheet containing specific information about the samples. This includes which replicates are exposed to which compound, at which dose, with which vehicle, and after how long they were collected. It also includes a unique identifier for each exposed replicate, each control and each empty tube based on a following pattern: `organism_code:exposure_batch_code:chemical_compound_code:dose_code:timepoint_code:replicate_code`. - a second sheet containing general information about the experiment, such as the organisation, the species, the start and end date, etc. + The spreadsheets are then uploaded to a shared Google Drive folder and opened for editing for when users hit the lab. The tool keeps track of the files uploaded to Google Drive, can import external files, and can validate the content of the spreadsheets. These validation steps are mandatory and must be performed before the files and boxes can be shipped. diff --git a/ptmd/lib/validator/validate_identifier.py b/ptmd/lib/validator/validate_identifier.py index f27ece5..eb41863 100644 --- a/ptmd/lib/validator/validate_identifier.py +++ b/ptmd/lib/validator/validate_identifier.py @@ -116,7 +116,7 @@ def validate_compound(validator: Any) -> None: compound_code_reference: int = int(validator.current_record['data'][PTX_ID_LABEL][3:6]) compound_reference: str = validator.current_record['data'][COMPOUND_NAME_LABEL] - if compound_code_reference < 1 or compound_code_reference > 999: + if compound_code_reference < 0 or compound_code_reference > 999: validator.add_error(validator.current_record['label'], f"The identifier doesn't contain a valid compound code '{compound_code_reference}'.", PTX_ID_LABEL)