diff --git a/src/napatrackmater/Trackvector.py b/src/napatrackmater/Trackvector.py index bc318e6..a075ee1 100644 --- a/src/napatrackmater/Trackvector.py +++ b/src/napatrackmater/Trackvector.py @@ -57,7 +57,7 @@ ] -TRACK_TYPE_FEATURE = ["MSD"] +TRACK_TYPE_FEATURES = ["MSD"] IDENTITY_FEATURES = ["Track ID", "t", "z", "y", "x", "Dividing", "Number_Dividing"] STATUS_FEATURES = ["Dividing", "Number_Dividing"] @@ -265,7 +265,9 @@ def _get_track_vector_xml_data(self): ) self.basicsettings = self.xml_content.find("Settings").find("BasicSettings") try: - self.detectorchannel = int(float(self.detectorsettings.get("TARGET_CHANNEL"))) + self.detectorchannel = int( + float(self.detectorsettings.get("TARGET_CHANNEL")) + ) except TypeError: self.detectorchannel = 1 self.tstart = int(float(self.basicsettings.get("tstart"))) @@ -370,7 +372,7 @@ def _compute_track_vectors(self): cell_axis_z, cell_axis_y, cell_axis_x, - msd + msd, ] + ( [latent_features[i] for i in range(len(latent_features))] @@ -4123,9 +4125,9 @@ def get_most_frequent_prediction(predictions): final_predictions = shape_predictions + dynamic_predictions most_frequent_prediction = get_most_frequent_prediction(final_predictions) if most_frequent_prediction is not None: - most_predicted_class = class_map[int(most_frequent_prediction)] + most_predicted_class = class_map[int(most_frequent_prediction)] - return most_predicted_class + return most_predicted_class else: return "UnClassified" @@ -4166,4 +4168,4 @@ def save_cell_type_predictions( filename = os.path.join(save_dir, f"{save_name}.csv") df.to_csv(filename, index=True) - print(f"Saved data for cell type {value} to {filename}") \ No newline at end of file + print(f"Saved data for cell type {value} to {filename}")