From d2a031cd7a3633a5f80e83282d557877ed8a367e Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 18:56:11 +0200 Subject: [PATCH 01/21] Try out improving study and experiment handling --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 8d9763e..8e8e5fa 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 8d9763e3501c3243ea5772b1d070e264494200c1 +Subproject commit 8e8e5fac2d9a9e2a35a4d7c4f21f6bfc648d0ecc From 6d50de709b6a1f0b8e6ee5693206aeaa43a74806 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 18:59:18 +0200 Subject: [PATCH 02/21] trigger ci/cd --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 9378a67..cfffc94 100644 --- a/README.md +++ b/README.md @@ -404,5 +404,3 @@ python mars_cli.py --credential-service-name metabolights --username-credential [To set up and run the MARS tool locally using Docker, follow these steps](../repository-services/README.md) - - From 5f00469f9728926f8019dcf5a53420fcfb74c329 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 19:10:10 +0200 Subject: [PATCH 03/21] remove not needed code to prevent double study submission --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 8e8e5fa..e3357d8 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 8e8e5fac2d9a9e2a35a4d7c4f21f6bfc648d0ecc +Subproject commit e3357d8eddd527e4dcc23091bd573cdd1f2d7785 From ce3d9ccb366356d47150a727a9c2e2fc756f04f7 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 19:19:22 +0200 Subject: [PATCH 04/21] DO not add study comments --- mars_lib/isa_json.py | 31 +++++++++++++------------------ tests/test_isa_json.py | 10 +++++----- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/mars_lib/isa_json.py b/mars_lib/isa_json.py index 793376b..1a6d1a4 100644 --- a/mars_lib/isa_json.py +++ b/mars_lib/isa_json.py @@ -484,29 +484,24 @@ def update_isa_json(isa_json: IsaJson, repo_response: RepositoryResponse) -> Isa add_accession_to_data_file_node(updated_node, accession.value) else: - # Add study accession to study comments updated_study = apply_filter(study_filter, investigation.studies) - - study_accession_comment: Comment = Comment( + accession_comment = Comment( name=f"{target_repository}_{target_level}_accession", value=accession.value, ) - updated_study.comments.append(study_accession_comment) - - # Add study accession to assay comments - updated_assay = next( - filter( - lambda assay: is_assay_for_target_repo(assay, target_repository), - updated_study.assays, - ), - None, - ) - if updated_assay: - assay_accession_comment: Comment = Comment( - name=f"{target_repository}_{target_level}_accession", - value=accession.value, + + if target_level == "study": + updated_study.comments.append(accession_comment) + else: + updated_assay = next( + filter( + lambda assay: is_assay_for_target_repo(assay, target_repository), + updated_study.assays, + ), + None, ) - updated_assay.comments.append(assay_accession_comment) + if updated_assay: + updated_assay.comments.append(accession_comment) isa_json.investigation = investigation return isa_json diff --git a/tests/test_isa_json.py b/tests/test_isa_json.py index b358c63..7e293a9 100644 --- a/tests/test_isa_json.py +++ b/tests/test_isa_json.py @@ -245,7 +245,7 @@ def test_update_study_materials_with_accession_categories(): ) -def test_update_study_and_assay_with_ena_study_accession_comment(): +def test_update_assay_only_with_ena_study_accession_comment(): json_path = "tests/fixtures/isa_jsons/1_after_biosamples.json" isa_json = load_isa_json(json_path, False) response_file_path = "tests/fixtures/mars_receipts/ena_success_response.json" @@ -254,10 +254,10 @@ def test_update_study_and_assay_with_ena_study_accession_comment(): updated_isa_json = update_isa_json(isa_json, ena_response) study_comments = updated_isa_json.investigation.studies[0].comments - accession_comment = filter( - lambda x: x.name == "ena_study_accession", study_comments - ) - assert next(accession_comment).value == ena_study_accession_number + accession_comments = [ + comment for comment in study_comments if comment.name == "ena_study_accession" + ] + assert accession_comments == [] ena_assay = next( filter( From 2a5be4308b2ea4732ec5be8c54db257a06bf642a Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 19:23:40 +0200 Subject: [PATCH 05/21] fix test --- tests/test_isa_json.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_isa_json.py b/tests/test_isa_json.py index 7e293a9..13d2b28 100644 --- a/tests/test_isa_json.py +++ b/tests/test_isa_json.py @@ -245,7 +245,7 @@ def test_update_study_materials_with_accession_categories(): ) -def test_update_assay_only_with_ena_study_accession_comment(): +def test_update_study_only_with_ena_study_accession_comment(): json_path = "tests/fixtures/isa_jsons/1_after_biosamples.json" isa_json = load_isa_json(json_path, False) response_file_path = "tests/fixtures/mars_receipts/ena_success_response.json" @@ -254,10 +254,10 @@ def test_update_assay_only_with_ena_study_accession_comment(): updated_isa_json = update_isa_json(isa_json, ena_response) study_comments = updated_isa_json.investigation.studies[0].comments - accession_comments = [ - comment for comment in study_comments if comment.name == "ena_study_accession" - ] - assert accession_comments == [] + accession_comment = filter( + lambda x: x.name == "ena_study_accession", study_comments + ) + assert next(accession_comment).value == ena_study_accession_number ena_assay = next( filter( @@ -267,10 +267,10 @@ def test_update_assay_only_with_ena_study_accession_comment(): None, ) assay_comments = ena_assay.comments - accession_comment = filter( - lambda x: x.name == "ena_study_accession", assay_comments - ) - assert next(accession_comment).value == ena_study_accession_number + accession_comments = [ + comment for comment in assay_comments if comment.name == "ena_study_accession" + ] + assert accession_comments == [] def test_update_datafile_comment_with_accession_comment_present(): From 7d261e28e8cc6a85b0916289cb80ca3d3627ad77 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 19:26:25 +0200 Subject: [PATCH 06/21] make linter content --- mars_lib/isa_json.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mars_lib/isa_json.py b/mars_lib/isa_json.py index 1a6d1a4..53695f5 100644 --- a/mars_lib/isa_json.py +++ b/mars_lib/isa_json.py @@ -495,7 +495,9 @@ def update_isa_json(isa_json: IsaJson, repo_response: RepositoryResponse) -> Isa else: updated_assay = next( filter( - lambda assay: is_assay_for_target_repo(assay, target_repository), + lambda assay: is_assay_for_target_repo( + assay, target_repository + ), updated_study.assays, ), None, @@ -520,10 +522,13 @@ def map_data_files_to_repositories( for assay in assays: target_repo_comment: Comment = detect_target_repo_comment(assay.comments) # This is an effect of everything being optional in the Comment model. - # Should we decide to make the value mandatory, this guard clause would not be necessary anymore. + # Should we decide to make the value mandatory, this guard clause + # would not be necessary anymore. if target_repo_comment.value is None: raise ValueError( - f"At least one assay in the ISA-JSON has no '{TARGET_REPO_KEY}' comment. Mapping not possible. Make sure all assays in the ISA-JSON have this comment!" + f"At least one assay in the ISA-JSON has no " + f"'{TARGET_REPO_KEY}' comment. Mapping not possible. " + f"Make sure all assays in the ISA-JSON have this comment!" ) assay_data_files = [df.name for df in assay.dataFiles] @@ -550,7 +555,11 @@ def map_data_files_to_repositories( [ print_and_log( - msg=f"File '{rf['short_name']}' could not be mapped to any data file in the ISA-JSON. For this reason, it will be skipped during submission!", + msg=( + f"File '{rf['short_name']}' could not be mapped to any data " + f"file in the ISA-JSON. For this reason, it will be skipped " + f"during submission!" + ), level="warning", ) for rf in remaining_files From 67f3bbb70be4c8e84a4a784c6df913f66592f7f2 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 20:49:53 +0200 Subject: [PATCH 07/21] run ci with multi experiment example --- .../multi-omics-submission-test.yaml | 2 +- MARS | 2 +- scripts/isa_generator.py | 118 +++++++++--------- scripts/prepare_poc_submission.py | 1 - 4 files changed, 60 insertions(+), 63 deletions(-) diff --git a/.github/workflows/multi-omics-submission-test.yaml b/.github/workflows/multi-omics-submission-test.yaml index 886686d..7a962d4 100644 --- a/.github/workflows/multi-omics-submission-test.yaml +++ b/.github/workflows/multi-omics-submission-test.yaml @@ -17,7 +17,7 @@ jobs: # Paths for MARS repo and ISA template REPOSITORY_SERVICES_PATH: ${{ github.workspace }}/MARS/repository-services - ISA_TEMPLATE_PATH: ${{ github.workspace }}/MARS/test-data/biosamples-input-isa.json + ISA_TEMPLATE_PATH: ${{ github.workspace }}/MARS/test-data/biosamples-input-isa-multi.json # Credentials from GitHub secrets WEBIN_USERNAME: ${{ secrets.WEBIN_USERNAME }} diff --git a/MARS b/MARS index e3357d8..826d09d 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit e3357d8eddd527e4dcc23091bd573cdd1f2d7785 +Subproject commit 826d09d42d9c10709a278a78b79031e7326569db diff --git a/scripts/isa_generator.py b/scripts/isa_generator.py index 555a79b..cef1a89 100644 --- a/scripts/isa_generator.py +++ b/scripts/isa_generator.py @@ -40,34 +40,33 @@ def _md5_of_file(path: Path) -> str: return h.hexdigest() -def _get_first_assay(isa_obj: dict[str, Any]) -> dict[str, Any] | None: +def _get_all_assays(isa_obj: dict[str, Any]) -> List[dict[str, Any]]: """ - Navigate to investigation.studies[0].assays[0] (if present). + Return all assays found under investigation.studies[*].assays[*]. """ inv = isa_obj.get("investigation") if inv is None: inv = isa_obj if not isinstance(inv, dict): - return None + return [] studies = inv.get("studies") or [] - if not isinstance(studies, list) or not studies: - return None + if not isinstance(studies, list): + return [] - first_study = studies[0] - if not isinstance(first_study, dict): - return None + assays: List[dict[str, Any]] = [] + for study in studies: + if not isinstance(study, dict): + continue - assays = first_study.get("assays") or [] - if not isinstance(assays, list) or not assays: - return None + study_assays = study.get("assays") or [] + if not isinstance(study_assays, list): + continue - first_assay = assays[0] - if not isinstance(first_assay, dict): - return None + assays.extend(assay for assay in study_assays if isinstance(assay, dict)) - return first_assay + return assays def _ensure_comment(comments: List[dict[str, Any]], name: str, value: str) -> None: @@ -83,14 +82,14 @@ def _ensure_comment(comments: List[dict[str, Any]], name: str, value: str) -> No def _update_datafiles_with_generated_files( - assay: dict[str, Any], + assays: List[dict[str, Any]], data_dir: Path, - n_files: int, + n_files: int | None, ) -> List[Path]: """ - For the first assay, update its dataFiles entries with newly generated .fastq.gz files. + Update assay dataFiles entries with newly generated .fastq.gz files. - Behaviour per dataFiles[i] (for i < n_files): + Behaviour per touched data file: - Generate a unique .fastq.gz file based on the existing 'name': e.g. ENA_TEST2.R2.fastq.gz -> ENA_TEST2.R2_.fastq.gz @@ -98,7 +97,7 @@ def _update_datafiles_with_generated_files( - Write a dummy FASTQ into that file and compute its MD5. - - Update the dataFiles[i] object: + - Update the dataFiles entry: * "name" = new file name * in "comments": - "file name" -> new file name @@ -107,50 +106,49 @@ def _update_datafiles_with_generated_files( - "checksum_method" -> "MD5" (existing "accession", "submission date", etc. are kept as-is) """ - data_files_json = assay.get("dataFiles") or [] - if not isinstance(data_files_json, list): - return [] - generated_paths: List[Path] = [] suffix = _timestamp_suffix() + updated_count = 0 - # We only touch up to n_files entries, and only those that look like objects - for i, df_json in enumerate(data_files_json): - if i >= n_files: - break - if not isinstance(df_json, dict): + for assay in assays: + data_files_json = assay.get("dataFiles") or [] + if not isinstance(data_files_json, list): continue - original_name = df_json.get("name") - if not isinstance(original_name, str) or not original_name: - continue + for df_json in data_files_json: + if n_files is not None and updated_count >= n_files: + return generated_paths + if not isinstance(df_json, dict): + continue + + original_name = df_json.get("name") + if not isinstance(original_name, str) or not original_name: + continue - # Build unique .fastq.gz name - if original_name.endswith(".fastq.gz"): - base = original_name[:-len(".fastq.gz")] - new_name = f"{base}_{suffix}.fastq.gz" - else: - new_name = f"{original_name}_{suffix}.fastq.gz" + if original_name.endswith(".fastq.gz"): + base = original_name[:-len(".fastq.gz")] + new_name = f"{base}_{suffix}.fastq.gz" + else: + new_name = f"{original_name}_{suffix}.fastq.gz" - file_path = data_dir / new_name - _write_dummy_fastq_gz(file_path) - md5 = _md5_of_file(file_path) + file_path = data_dir / new_name + _write_dummy_fastq_gz(file_path) + md5 = _md5_of_file(file_path) - # Update the JSON entry - df_json["name"] = new_name + df_json["name"] = new_name - comments = df_json.get("comments") - if not isinstance(comments, list): - comments = [] - df_json["comments"] = comments + comments = df_json.get("comments") + if not isinstance(comments, list): + comments = [] + df_json["comments"] = comments - _ensure_comment(comments, "file name", new_name) - _ensure_comment(comments, "file type", "fastq") - _ensure_comment(comments, "file checksum", md5) - _ensure_comment(comments, "checksum_method", "MD5") - # DO NOT touch 'accession' or 'submission date' if present + _ensure_comment(comments, "file name", new_name) + _ensure_comment(comments, "file type", "fastq") + _ensure_comment(comments, "file checksum", md5) + _ensure_comment(comments, "checksum_method", "MD5") - generated_paths.append(file_path) + generated_paths.append(file_path) + updated_count += 1 return generated_paths @@ -158,15 +156,15 @@ def _update_datafiles_with_generated_files( def generate_isa_json_with_data( work_dir: Path, template_path: Path, - n_files: int = 2, + n_files: int | None = None, ) -> Tuple[Path, List[Path]]: """ PoC behaviour: 1. Load ISA-JSON template from template_path. - 2. Find investigation.studies[0].assays[0].dataFiles. - 3. For up to n_files entries in dataFiles, generate UNIQUE .fastq.gz files - and update: + 2. Find all investigation.studies[*].assays[*].dataFiles. + 3. For each data file (or the first n_files when limited), generate UNIQUE + .fastq.gz files and update: - dataFiles[i]["name"] - dataFiles[i]["comments"] entries for file name, type, checksum, method. 4. Write the resulting ISA-JSON to work_dir / 'isa.json'. @@ -177,12 +175,12 @@ def generate_isa_json_with_data( isa_obj = json.loads(template_path.read_text()) - assay = _get_first_assay(isa_obj) + assays = _get_all_assays(isa_obj) generated_paths: List[Path] = [] - if assay is not None: + if assays: data_dir = work_dir / "data" generated_paths = _update_datafiles_with_generated_files( - assay=assay, + assays=assays, data_dir=data_dir, n_files=n_files, ) diff --git a/scripts/prepare_poc_submission.py b/scripts/prepare_poc_submission.py index c47456b..23b70f5 100644 --- a/scripts/prepare_poc_submission.py +++ b/scripts/prepare_poc_submission.py @@ -125,7 +125,6 @@ def main() -> None: isa_path, data_files = generate_isa_json_with_data( work_dir=work_dir, template_path=isa_template, - n_files=2, ) cred_path = write_credentials_json(work_dir) From 1409950d5ad6bef3c02c2ac88d711eaff2a8cc54 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 20:53:32 +0200 Subject: [PATCH 08/21] fix illumina model --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 826d09d..7ae7d53 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 826d09d42d9c10709a278a78b79031e7326569db +Subproject commit 7ae7d5397f45e162fcbaf2dfe680a5c11ceffb1e From 245333432977bfbe4121e2711d0f2a3b07e26311 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 21:20:48 +0200 Subject: [PATCH 09/21] add support for paired end reads --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 7ae7d53..7e4caae 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 7ae7d5397f45e162fcbaf2dfe680a5c11ceffb1e +Subproject commit 7e4caaee5f902e7386faa6b932d170d3d4a0defc From b493f681242f24b0684b1f456981c668a5bada99 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 21:33:26 +0200 Subject: [PATCH 10/21] retuen all run accessions in the receipt --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 7e4caae..c389838 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 7e4caaee5f902e7386faa6b932d170d3d4a0defc +Subproject commit c3898381a624f720e147cb9bd693a66bfa648f7e From bf8140e0f1a9fac253af832d64522b45b031ba56 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 21:41:17 +0200 Subject: [PATCH 11/21] add support for multiple experiments/samples --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index c389838..a98589b 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit c3898381a624f720e147cb9bd693a66bfa648f7e +Subproject commit a98589b12e15327fb10ce7bf69419b260e3829ab From a70e6861ff3833e826dd976bbe1bec1c587cbeda Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 21:49:16 +0200 Subject: [PATCH 12/21] add logging --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index a98589b..c01abdd 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit a98589b12e15327fb10ce7bf69419b260e3829ab +Subproject commit c01abddbc7491980cbc955b5a91ef56cdd24e5e6 From 5ffa82b7c64ed97c9f7da40ae07b2ae9de9442e4 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 22:03:36 +0200 Subject: [PATCH 13/21] MORE LOGS! --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index c01abdd..5b938cd 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit c01abddbc7491980cbc955b5a91ef56cdd24e5e6 +Subproject commit 5b938cd944a0b82866f785cda44112de2f0e0f1d From e2fc6047198c5b92d117d9dfff6abb900a911081 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 22:09:44 +0200 Subject: [PATCH 14/21] MORE! --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 5b938cd..c6a3b84 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 5b938cd944a0b82866f785cda44112de2f0e0f1d +Subproject commit c6a3b847a807db8e87d0f8aff85062de1a940f9c From fa88f1177a42c63c23ed259fb66f6bea4851c512 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 22:15:46 +0200 Subject: [PATCH 15/21] final logging --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index c6a3b84..053862f 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit c6a3b847a807db8e87d0f8aff85062de1a940f9c +Subproject commit 053862fa7cdef27f49369e7a4ece597e7644251b From a0492ad092826139090445fbe9f4b55814adb474 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Wed, 27 May 2026 22:23:09 +0200 Subject: [PATCH 16/21] fix run accession mapping --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 053862f..96f76a7 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 053862fa7cdef27f49369e7a4ece597e7644251b +Subproject commit 96f76a7fb9e7abbdf241cc8369015dfce2e45cd5 From 93e1d4a22d4fa836d8f5938a7fe892421da6508d Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Fri, 5 Jun 2026 11:20:15 +0200 Subject: [PATCH 17/21] read study title and description from study level metadata, not assay --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 96f76a7..d43e4c7 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 96f76a7fb9e7abbdf241cc8369015dfce2e45cd5 +Subproject commit d43e4c751676b35f294a0c03079a3da6351121cb From f9cd415d72c6059bd3f4c6db34111f2cd634e1de Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Fri, 5 Jun 2026 11:21:10 +0200 Subject: [PATCH 18/21] read study title and description from study level metadata, not assay --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index d43e4c7..76ccde1 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit d43e4c751676b35f294a0c03079a3da6351121cb +Subproject commit 76ccde1cbc5491a30acfb9e3af41f714da48565f From f1113e2810ff28d4cf41157cdffebb8095226d81 Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Fri, 5 Jun 2026 12:10:06 +0200 Subject: [PATCH 19/21] read study title and descr from study + remove unused project xml generator --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index 76ccde1..e54a397 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 76ccde1cbc5491a30acfb9e3af41f714da48565f +Subproject commit e54a397ae49cd9d9270ed000267bea26ace8e29f From bc0d98451cd13855c767c5abda401c4f730deecb Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Fri, 5 Jun 2026 13:14:15 +0200 Subject: [PATCH 20/21] add missing function --- MARS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARS b/MARS index e54a397..5e719c2 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit e54a397ae49cd9d9270ed000267bea26ace8e29f +Subproject commit 5e719c29e2fb9728e6cc450cb5d91812e952f1d3 From 525565cb875ca7816895a363de539ea45d22afea Mon Sep 17 00:00:00 2001 From: Bert Droesbeke Date: Fri, 5 Jun 2026 13:23:59 +0200 Subject: [PATCH 21/21] fix unit tests with new example data --- MARS | 2 +- .../fixtures/mars_receipts/biosamples_success_response.json | 4 ++-- tests/test_isa_json.py | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/MARS b/MARS index 5e719c2..9752f65 160000 --- a/MARS +++ b/MARS @@ -1 +1 @@ -Subproject commit 5e719c29e2fb9728e6cc450cb5d91812e952f1d3 +Subproject commit 9752f656724c9ed53190ac37836e60d42d2f3fd6 diff --git a/tests/fixtures/mars_receipts/biosamples_success_response.json b/tests/fixtures/mars_receipts/biosamples_success_response.json index 1fb4458..d7ef41a 100644 --- a/tests/fixtures/mars_receipts/biosamples_success_response.json +++ b/tests/fixtures/mars_receipts/biosamples_success_response.json @@ -13,7 +13,7 @@ "key": "studies", "where": { "key": "title", - "value": "Arabidopsis thaliana" + "value": "Integrated multi-omics profiling of Arabidopsis thaliana under controlled experimental conditions" } }, { @@ -38,7 +38,7 @@ "key": "studies", "where": { "key": "title", - "value": "Arabidopsis thaliana" + "value": "Integrated multi-omics profiling of Arabidopsis thaliana under controlled experimental conditions" } }, { diff --git a/tests/test_isa_json.py b/tests/test_isa_json.py index 13d2b28..3ef020f 100644 --- a/tests/test_isa_json.py +++ b/tests/test_isa_json.py @@ -35,7 +35,10 @@ def test_load_isa_json(): # Should test the validation process of the ISA JSON file where root has 'investigation' as key. valid_isa_json02 = load_isa_json("MARS/test-data/biosamples-input-isa.json", False) assert len(valid_isa_json02.investigation.studies) == 1 - assert valid_isa_json02.investigation.studies[0].title == "Arabidopsis thaliana" + assert ( + valid_isa_json02.investigation.studies[0].title + == "Integrated multi-omics profiling of Arabidopsis thaliana under controlled experimental conditions" + ) with pytest.raises(ValidationError): load_isa_json("./tests/fixtures/invalid_investigation.json", True)