Skip to content

Commit

Permalink
lower numpy version
Browse files Browse the repository at this point in the history
  • Loading branch information
kapoorlab committed Jul 26, 2024
1 parent c7a9639 commit eb56f9c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ install_requires =
pymesh
torchsummary
statsmodels
numpy<=1.25.0
numpy<=1.24.0


python_requires = >=3.8
Expand Down
9 changes: 7 additions & 2 deletions src/napatrackmater/Trackmate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,7 @@ def _update_spot_fate(self, TrackIds, fate_label):
{self.fate_key: fate_label}
)

def _get_trackmate_ids_by_location(self, dataframe):
def _get_trackmate_ids_by_location(self, dataframe, tracklet_length = None):
trackmate_track_ids = []
t = int(self.tend)
for index, row in dataframe.iterrows():
Expand All @@ -2070,7 +2070,12 @@ def _get_trackmate_ids_by_location(self, dataframe):
spot_properties_dict = self.unique_spot_properties[spot_id]
if self.trackid_key in spot_properties_dict.keys():
trackmate_track_id = spot_properties_dict[self.trackid_key]
trackmate_track_ids.append(trackmate_track_id)
if tracklet_length is None:
trackmate_track_ids.append(trackmate_track_id)
else:
track_duration = spot_properties_dict[self.track_duration_key]
if track_duration > tracklet_length:
trackmate_track_ids.append(trackmate_track_id)

return trackmate_track_ids

Expand Down
8 changes: 4 additions & 4 deletions src/napatrackmater/Trackvector.py
Original file line number Diff line number Diff line change
Expand Up @@ -4103,7 +4103,7 @@ def get_most_frequent_prediction(predictions):
return "UnClassified"


def save_cell_type_predictions(tracks_dataframe, cell_map, predictions, save_dir):
def save_cell_type_predictions(tracks_dataframe, cell_map, predictions, save_dir, channel):

cell_type = {}
for value in cell_map.values():
Expand All @@ -4129,11 +4129,11 @@ def save_cell_type_predictions(tracks_dataframe, cell_map, predictions, save_dir
save_name = f"{value}_inception"

if "Goblet" in value:
save_name = "goblet_cells_annotations_inception"
save_name = f"goblet_cells_{channel}annotations_inception"
if "Radial" in value:
save_name = "radially_intercalating_cells_annotations_inception"
save_name = f"radially_intercalating_cells_{channel}annotations_inception"
if "Basal" in value:
save_name = "basal_cells_annotations_inception"
save_name = f"basal_cells_{channel}annotations_inception"

filename = os.path.join(save_dir, f"{save_name}.csv")
df.to_csv(filename, index=True)
Expand Down

0 comments on commit eb56f9c

Please sign in to comment.