From 660431e9999880b5895bc10d27d30f77f56bb7bb Mon Sep 17 00:00:00 2001 From: LTLA Date: Sat, 28 Dec 2024 13:05:40 -0800 Subject: [PATCH] Removed redundant checks that are now performed in singlepp itself. --- src/singler/classify_integrated.py | 3 --- src/singler/classify_single.py | 3 --- src/singler/train_integrated.py | 1 - src/singler/train_single.py | 1 - 4 files changed, 8 deletions(-) diff --git a/src/singler/classify_integrated.py b/src/singler/classify_integrated.py index d5f3b20..cb160ea 100644 --- a/src/singler/classify_integrated.py +++ b/src/singler/classify_integrated.py @@ -77,9 +77,6 @@ def classify_integrated( if isinstance(test_data, summarizedexperiment.SummarizedExperiment): test_data = test_data.assay(assay_type) - if test_data.shape[0] != integrated_prebuilt._test_num_features: # TODO: move to singlepp. - raise ValueError("number of rows in 'test_data' is not consistent with 'test_features=' used to create 'integrated_prebuilt'") - ref_labs = integrated_prebuilt.reference_labels if len(results) != len(ref_labs): raise ValueError("length of 'results' should equal the number of references") diff --git a/src/singler/classify_single.py b/src/singler/classify_single.py index 6c96f5f..5d82b2a 100644 --- a/src/singler/classify_single.py +++ b/src/singler/classify_single.py @@ -66,9 +66,6 @@ def classify_single( if isinstance(test_data, summarizedexperiment.SummarizedExperiment): test_data = test_data.assay(assay_type) - if test_data.shape[0] != ref_prebuilt._test_num_features: # TODO: move to singlepp - raise ValueError("number of rows in 'test_data' is not consistent with 'test_features=' used to create 'ref_prebuilt'") - test_ptr = mattress.initialize(test_data) best, raw_scores, delta = lib.classify_single( diff --git a/src/singler/train_integrated.py b/src/singler/train_integrated.py index 76f23c5..d31e91a 100644 --- a/src/singler/train_integrated.py +++ b/src/singler/train_integrated.py @@ -17,7 +17,6 @@ class TrainedIntegratedReferences: def __init__(self, ptr: int, ref_labels: list, test_num_features: int): self._ptr = ptr self._labels = ref_labels - self._test_num_features = test_num_features # TODO: move to singlepp. @property def reference_labels(self) -> list: diff --git a/src/singler/train_single.py b/src/singler/train_single.py index f33dfd1..639f592 100644 --- a/src/singler/train_single.py +++ b/src/singler/train_single.py @@ -34,7 +34,6 @@ def __init__( self._features = features self._labels = labels self._markers = markers - self._test_num_features = test_num_features # TODO: move to singlepp. def num_markers(self) -> int: """