From 06c5b121e6ec09632bccaf0e36d0f09f49241ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Guignard?= Date: Wed, 22 Oct 2025 14:53:11 +0200 Subject: [PATCH] removing useless print statement --- src/sc3D/sc3D.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/sc3D/sc3D.py b/src/sc3D/sc3D.py index 02c84a3..1223b06 100644 --- a/src/sc3D/sc3D.py +++ b/src/sc3D/sc3D.py @@ -187,7 +187,7 @@ def read_anndata( elif genes_of_interest == "all": genes_of_interest = data.var_names self.all_genes = sorted(genes_of_interest) - + if 0 < len(genes_of_interest): raw_X = self._to_dense(data.raw[:, self.all_genes].X) self.gene_expression = dict(zip(ids, np.array(raw_X))) @@ -511,7 +511,6 @@ def build_pairing(self, cs1, cs2, rebuild=False, refine=False, th_d=None): zip(cells_cs1[pairing[0]], cells_cs2[pairing[1]]) ) except Exception as _: - print("re-doing linear sum assignment :(") pairing = linear_sum_assignment(copy_d) pos_ref_tmp = positions_cs1[pairing[0]] pos_flo_tmp = positions_cs2[pairing[1]] @@ -789,16 +788,21 @@ def downsample(self, spacing=10, pos_id="pos_3D"): if 0 < len(v) ] ) - - final_expr = np.array([ - np.mean( - self._to_dense(self.anndata.raw[ - mapping_from_removed[[cells[vi] for vi in v]] - ].X), - axis=0, - ) - for v in mapping if len(v) > 0 - ]) + + final_expr = np.array( + [ + np.mean( + self._to_dense( + self.anndata.raw[ + mapping_from_removed[[cells[vi] for vi in v]] + ].X + ), + axis=0, + ) + for v in mapping + if len(v) > 0 + ] + ) nb_cells = np.array([len(v) for v in mapping if 0 < len(v)]) tissue = [