From 4084ff79af52964bcc63a625d328edb6dd68c872 Mon Sep 17 00:00:00 2001 From: Nathan Creger Date: Mon, 25 Mar 2024 11:24:07 -0400 Subject: [PATCH] check for more bundle and .zip files --- scripts/packageChecker/packageChecker.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/packageChecker/packageChecker.py b/scripts/packageChecker/packageChecker.py index 66ba1211..fc56c1d9 100644 --- a/scripts/packageChecker/packageChecker.py +++ b/scripts/packageChecker/packageChecker.py @@ -67,13 +67,15 @@ def find_empty_packages(self): empty_package_list.append(package_id) else: for file in files: - actual_file_names.append(file) + ext = os.path.splitext(file) + if not ext[1] == ".bfmemo" or "_expression_matrix" not in file or "_bundle.zip" not in file or "_spatial_metabolomics" not in file or "_spatial_n-glycomics" in file or "_image_collection.zip" in file or "_segmentation_data.zip" not in file: + actual_file_names.append(file) if file == "metadata.json" and len(files) == 1: empty_package_list.append(package_id) - ext = os.path.splitext(file) - if (not set(expected_file_names).issubset(set(actual_file_names))) and not all(p == "metadata.json" for p in actual_file_names and not ext[1] == ".bfmemo"): + + if (not set(expected_file_names).issubset(set(actual_file_names))) and not all(p == "metadata.json" for p in actual_file_names): empty_package_list.append(package_id) missing_files_list = set(expected_file_names).difference(set(actual_file_names)) @@ -82,8 +84,6 @@ def find_empty_packages(self): if "metadata.json" in disk_files: disk_files.remove("metadata.json") - elif "expression_matrix.zip" in disk_files: - disk_files.remove("expression_matrix.zip") disk_files = ", ".join(disk_files) files_list = np.setdiff1d(disk_files, mongo_files_col_list)