@@ -89,21 +89,37 @@ def __init__(
89
89
self ._update_derived_values ()
90
90
91
91
@property
92
- def labels_ (self ):
93
- """Get the labels."""
92
+ def cluster_labels (self ):
93
+ """Get the cluster labels."""
94
94
if "cell_data" in self .mudata .mod .keys ():
95
95
if "clustering" in self .mudata ["cell_data" ].obs_keys ():
96
96
return self .mudata ["cell_data" ].obs ["clustering" ]
97
97
return None
98
98
99
- @labels_ .setter
100
- def labels_ (self , value ):
101
- """Set the labels."""
99
+ @cluster_labels .setter
100
+ def cluster_labels (self , value ):
101
+ """Set the cluster labels."""
102
102
if "cell_data" in self .mudata .mod .keys ():
103
103
self .mudata ["cell_data" ].obs ["clustering" ] = value
104
104
else :
105
105
raise ValueError ("No cell data found in the MuData object." )
106
106
107
+ @property
108
+ def metacluster_labels (self ):
109
+ """Get the metacluster labels."""
110
+ if "cell_data" in self .mudata .mod .keys ():
111
+ if "clustering" in self .mudata ["cell_data" ].obs_keys ():
112
+ return self .mudata ["cell_data" ].obs ["metaclustering" ]
113
+ return None
114
+
115
+ @metacluster_labels .setter
116
+ def metacluster_labels (self , value ):
117
+ """Set the metacluster labels."""
118
+ if "cell_data" in self .mudata .mod .keys ():
119
+ self .mudata ["cell_data" ].obs ["metaclustering" ] = value
120
+ else :
121
+ raise ValueError ("No cell data found in the MuData object." )
122
+
107
123
def read_input (
108
124
self ,
109
125
inp = None ,
0 commit comments