AutoMorphoTrack 1.0.5__tar.gz → 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. automorphotrack-2.0.0/MANIFEST.in +3 -0
  2. automorphotrack-2.0.0/PKG-INFO +36 -0
  3. automorphotrack-2.0.0/automorphotrack/.___init__.py +0 -0
  4. automorphotrack-2.0.0/automorphotrack/._colocalization.py +0 -0
  5. automorphotrack-2.0.0/automorphotrack/._detection.py +0 -0
  6. automorphotrack-2.0.0/automorphotrack/._lyso_count.py +0 -0
  7. automorphotrack-2.0.0/automorphotrack/._morphology.py +0 -0
  8. automorphotrack-2.0.0/automorphotrack/._motility.py +0 -0
  9. automorphotrack-2.0.0/automorphotrack/._shape_features.py +0 -0
  10. automorphotrack-2.0.0/automorphotrack/._shape_profiling.py +0 -0
  11. automorphotrack-2.0.0/automorphotrack/._summary.py +0 -0
  12. automorphotrack-2.0.0/automorphotrack/._tracking.py +0 -0
  13. automorphotrack-2.0.0/automorphotrack/._tracking_overlay.py +0 -0
  14. automorphotrack-2.0.0/automorphotrack/._utils.py +0 -0
  15. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/__init__.py +1 -1
  16. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/colocalization.py +10 -6
  17. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/detection.py +2 -2
  18. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/lyso_count.py +4 -4
  19. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/morphology.py +0 -0
  20. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/motility.py +13 -6
  21. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/shape_features.py +18 -7
  22. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/shape_profiling.py +1 -1
  23. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/summary.py +13 -4
  24. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/tracking.py +4 -4
  25. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/tracking_overlay.py +4 -4
  26. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/automorphotrack/utils.py +0 -0
  27. automorphotrack-2.0.0/automorphotrack.egg-info/PKG-INFO +36 -0
  28. automorphotrack-2.0.0/automorphotrack.egg-info/SOURCES.txt +32 -0
  29. automorphotrack-2.0.0/pyproject.toml +3 -0
  30. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/setup.py +11 -11
  31. automorphotrack-1.0.5/AutoMorphoTrack.egg-info/PKG-INFO +0 -135
  32. automorphotrack-1.0.5/AutoMorphoTrack.egg-info/SOURCES.txt +0 -21
  33. automorphotrack-1.0.5/LICENSE.md +0 -21
  34. automorphotrack-1.0.5/MANIFEST.in +0 -19
  35. automorphotrack-1.0.5/PKG-INFO +0 -135
  36. automorphotrack-1.0.5/README.md +0 -95
  37. {automorphotrack-1.0.5/AutoMorphoTrack.egg-info → automorphotrack-2.0.0/automorphotrack.egg-info}/dependency_links.txt +0 -0
  38. {automorphotrack-1.0.5/AutoMorphoTrack.egg-info → automorphotrack-2.0.0/automorphotrack.egg-info}/requires.txt +0 -0
  39. {automorphotrack-1.0.5/AutoMorphoTrack.egg-info → automorphotrack-2.0.0/automorphotrack.egg-info}/top_level.txt +0 -0
  40. {automorphotrack-1.0.5 → automorphotrack-2.0.0}/setup.cfg +0 -0
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include LICENSE.md
3
+ recursive-include automorphotrack *.py
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: automorphotrack
3
+ Version: 2.0.0
4
+ Summary: Automated pipeline for mitochondrial and lysosomal detection, tracking, morphology, and colocalization analysis in microscopy images.
5
+ Home-page: https://github.com/abayatibrain/AMTpackage
6
+ Author: Armin Bayati, Ph.D.
7
+ Author-email: a.bayati.brain@gmail.com
8
+ License: MIT
9
+ Project-URL: Documentation, https://github.com/abayatibrain/AMTpackage
10
+ Project-URL: Source, https://github.com/abayatibrain/AMTpackage
11
+ Project-URL: Tracker, https://github.com/abayatibrain/AMTpackage/issues
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: numpy>=1.23.0
20
+ Requires-Dist: pandas>=1.5.0
21
+ Requires-Dist: matplotlib>=3.6.0
22
+ Requires-Dist: seaborn>=0.12.0
23
+ Requires-Dist: opencv-python>=4.6.0
24
+ Requires-Dist: scikit-image>=0.19.0
25
+ Requires-Dist: scipy>=1.9.0
26
+ Requires-Dist: tifffile>=2022.8.12
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description-content-type
31
+ Dynamic: home-page
32
+ Dynamic: license
33
+ Dynamic: project-url
34
+ Dynamic: requires-dist
35
+ Dynamic: requires-python
36
+ Dynamic: summary
@@ -33,7 +33,7 @@
33
33
  # )
34
34
  # ============================================================
35
35
 
36
- __version__ = "1.0.0"
36
+ __version__ = "2.0.0"
37
37
  __author__ = "Armin Bayati"
38
38
 
39
39
  # --- Utility Imports ---
@@ -7,6 +7,10 @@ from skimage.filters import threshold_otsu
7
7
  from pathlib import Path
8
8
  from automorphotrack.utils import ensure_dir, save_high_dpi
9
9
 
10
+ # Colorblind-friendly palette
11
+ CB_MITO = "#0173B2" # blue
12
+ CB_LYSO = "#DE8F05" # orange
13
+
10
14
  def analyze_colocalization(
11
15
  tif_path="Composite.tif",
12
16
  mito_channel=0,
@@ -93,7 +97,7 @@ def analyze_colocalization(
93
97
  "Manders_M1": m1_list,
94
98
  "Manders_M2": m2_list,
95
99
  "Pearson_r": pearson_r,
96
- "Overlap_R": overlap_R,
100
+ "Cosine_Similarity": overlap_R, # Renamed from Overlap_R for clarity
97
101
  "Mito_TotalIntensity": mito_sum,
98
102
  "Lyso_TotalIntensity": lyso_sum
99
103
  }).to_csv(csv_path, index=False)
@@ -112,11 +116,11 @@ def analyze_colocalization(
112
116
  # ---------- Plot metrics ----------
113
117
  plot_path = Path(out_dir) / "Colocalization_MetricsPlot.png"
114
118
  fig, ax = plt.subplots(figsize=(10, 9))
115
- ax.plot(m1_list, 'r-', label='Manders M1 (mito→lyso)')
116
- ax.plot(m2_list, 'g-', label='Manders M2 (lyso→mito)')
117
- ax.plot(np.array(overlap_percent) / 100, 'b--', label='Overlap fraction')
118
- ax.plot(pearson_r, 'k-.', label='Pearson r')
119
- ax.plot(overlap_R, 'm:', label='Normalized R')
119
+ ax.plot(m1_list, color=CB_MITO, linestyle='-', label='Manders M1 (mito\u2192lyso)')
120
+ ax.plot(m2_list, color=CB_LYSO, linestyle='-', label='Manders M2 (lyso\u2192mito)')
121
+ ax.plot(np.array(overlap_percent) / 100, 'b--', label='Jaccard overlap fraction')
122
+ ax.plot(pearson_r, 'k-.', label='Pearson r (intensity)')
123
+ ax.plot(overlap_R, color='#CC79A7', linestyle=':', label='Cosine similarity')
120
124
  ax.set_xlabel("Frame")
121
125
  ax.set_ylabel("Coefficient / Fraction (0–1)")
122
126
  ax.set_ylim(0, 1)
@@ -41,7 +41,7 @@ def detect_organelles(
41
41
  mito_gray = (mito_img * 255).astype(np.uint8)
42
42
  mito_rgb = cv2.cvtColor(mito_gray, cv2.COLOR_GRAY2RGB)
43
43
  cnts, _ = cv2.findContours(mito_mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
44
- cv2.drawContours(mito_rgb, cnts, -1, (255, 0, 0), 1, cv2.LINE_AA)
44
+ cv2.drawContours(mito_rgb, cnts, -1, (1, 115, 178), 1, cv2.LINE_AA) # CB blue
45
45
  mito_frames.append(upscale_frame(mito_rgb, upscale_factor))
46
46
 
47
47
  # ----- Lysosomes (standard detection) -----
@@ -49,7 +49,7 @@ def detect_organelles(
49
49
  lyso_gray = (lyso_img * 255).astype(np.uint8)
50
50
  lyso_rgb = cv2.cvtColor(lyso_gray, cv2.COLOR_GRAY2RGB)
51
51
  cnts, _ = cv2.findContours(lyso_mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
52
- cv2.drawContours(lyso_rgb, cnts, -1, (0, 255, 0), 1, cv2.LINE_AA)
52
+ cv2.drawContours(lyso_rgb, cnts, -1, (222, 143, 5), 1, cv2.LINE_AA) # CB orange
53
53
  lyso_frames.append(upscale_frame(lyso_rgb, upscale_factor))
54
54
 
55
55
  # Save representative frames
@@ -42,15 +42,15 @@ def count_lysosomes_per_frame(
42
42
 
43
43
  lyso_gray = (lyso_img * 255).astype(np.uint8)
44
44
  lyso_rgb = cv2.cvtColor(lyso_gray, cv2.COLOR_GRAY2RGB)
45
- cv2.drawContours(lyso_rgb, cnts, -1, (0, 255, 0), 1, cv2.LINE_AA)
45
+ cv2.drawContours(lyso_rgb, cnts, -1, (222, 143, 5), 1, cv2.LINE_AA) # CB orange
46
46
 
47
- # Add small green numbers at each lysosome position
47
+ # Add small orange numbers at each lysosome position
48
48
  for i, c in enumerate(cnts):
49
49
  M = cv2.moments(c)
50
50
  if M["m00"] != 0:
51
51
  cx, cy = int(M["m10"] / M["m00"]), int(M["m01"] / M["m00"])
52
52
  cv2.putText(lyso_rgb, str(i + 1), (cx, cy),
53
- cv2.FONT_HERSHEY_SIMPLEX, 0.35, (0, 255, 0), 1, cv2.LINE_AA)
53
+ cv2.FONT_HERSHEY_SIMPLEX, 0.35, (222, 143, 5), 1, cv2.LINE_AA)
54
54
 
55
55
  # Add total count label in white (small font)
56
56
  cv2.putText(lyso_rgb, f"Count: {lyso_count}", (10, 18),
@@ -72,7 +72,7 @@ def count_lysosomes_per_frame(
72
72
 
73
73
  # Plot counts over frames
74
74
  plt.figure(figsize=(6, 4))
75
- plt.plot(df["Frame"], df["Lysosome_Count"], "-o", color="green")
75
+ plt.plot(df["Frame"], df["Lysosome_Count"], "-o", color="#DE8F05")
76
76
  plt.xlabel("Frame")
77
77
  plt.ylabel("Lysosome Count")
78
78
  plt.title("Lysosome Count per Frame")
@@ -6,6 +6,10 @@ import pandas as pd, numpy as np, matplotlib.pyplot as plt, seaborn as sns
6
6
  from pathlib import Path
7
7
  from automorphotrack.utils import ensure_dir, save_high_dpi
8
8
 
9
+ # Colorblind-friendly palette (Okabe-Ito inspired)
10
+ CB_MITO = "#0173B2" # blue
11
+ CB_LYSO = "#DE8F05" # orange
12
+
9
13
  def analyze_motility(
10
14
  mito_tracks_path="Tracking_Outputs/Mito_Tracks.csv",
11
15
  lyso_tracks_path="Tracking_Outputs/Lyso_Tracks.csv",
@@ -71,16 +75,19 @@ def analyze_motility(
71
75
 
72
76
  # ---------- Distribution Plots ----------
73
77
  fig, axes = plt.subplots(1, 2, figsize=(20, 8))
74
- sns.kdeplot(mito_summary["Mean_Velocity"], color="red", fill=True, ax=axes[0], label="Mitochondria")
75
- sns.kdeplot(lyso_summary["Mean_Velocity"], color="green", fill=True, alpha=0.4, ax=axes[0], label="Lysosomes")
78
+ # clip=(0, None) prevents KDE from extending into physically invalid negative values
79
+ sns.kdeplot(mito_summary["Mean_Velocity"], color=CB_MITO, fill=True, ax=axes[0], label="Mitochondria", clip=(0, None))
80
+ sns.kdeplot(lyso_summary["Mean_Velocity"], color=CB_LYSO, fill=True, alpha=0.4, ax=axes[0], label="Lysosomes", clip=(0, None))
76
81
  axes[0].set_title("Mean Velocity Distribution")
77
82
  axes[0].set_xlabel("Velocity (px/frame)")
83
+ axes[0].set_xlim(left=0)
78
84
  axes[0].legend()
79
85
 
80
- sns.kdeplot(mito_summary["Total_Displacement"], color="red", fill=True, ax=axes[1], label="Mitochondria")
81
- sns.kdeplot(lyso_summary["Total_Displacement"], color="green", fill=True, alpha=0.4, ax=axes[1], label="Lysosomes")
86
+ sns.kdeplot(mito_summary["Total_Displacement"], color=CB_MITO, fill=True, ax=axes[1], label="Mitochondria", clip=(0, None))
87
+ sns.kdeplot(lyso_summary["Total_Displacement"], color=CB_LYSO, fill=True, alpha=0.4, ax=axes[1], label="Lysosomes", clip=(0, None))
82
88
  axes[1].set_title("Total Displacement Distribution")
83
89
  axes[1].set_xlabel("Displacement (px)")
90
+ axes[1].set_xlim(left=0)
84
91
  axes[1].legend()
85
92
 
86
93
  plt.tight_layout()
@@ -89,9 +96,9 @@ def analyze_motility(
89
96
  # ---------- Scatter Plot ----------
90
97
  fig, ax = plt.subplots(figsize=(12, 10))
91
98
  sns.scatterplot(data=mito_summary, x="Total_Displacement", y="Mean_Velocity",
92
- color="red", s=30, label="Mitochondria")
99
+ color=CB_MITO, s=30, label="Mitochondria")
93
100
  sns.scatterplot(data=lyso_summary, x="Total_Displacement", y="Mean_Velocity",
94
- color="green", s=30, alpha=0.6, label="Lysosomes")
101
+ color=CB_LYSO, s=30, alpha=0.6, label="Lysosomes")
95
102
  ax.set_xlabel("Total Displacement (px)")
96
103
  ax.set_ylabel("Mean Velocity (px/frame)")
97
104
  ax.set_title("Motility Scatter Plot")
@@ -10,6 +10,10 @@ from skimage.segmentation import clear_border
10
10
  from pathlib import Path
11
11
  from automorphotrack.utils import ensure_dir, save_high_dpi, upscale_frame
12
12
 
13
+ # Colorblind-friendly palette (Okabe-Ito inspired)
14
+ CB_MITO = "#0173B2" # blue
15
+ CB_LYSO = "#DE8F05" # orange
16
+
13
17
  def detect_mask(frame, ch, min_size=3, thr_factor=0.8):
14
18
  """Threshold and clean a single channel."""
15
19
  img = frame[..., ch].astype(float)
@@ -41,7 +45,11 @@ def analyze_shape_features(
41
45
  for p in regionprops(lbl_m):
42
46
  if p.area < 5:
43
47
  continue
44
- circ = (4 * np.pi * p.area) / (p.perimeter ** 2 + 1e-9)
48
+ # Use perimeter_crofton for more accurate continuous perimeter estimate
49
+ # to avoid circularity > 1 due to discrete pixel-boundary underestimation
50
+ perim = getattr(p, 'perimeter_crofton', p.perimeter)
51
+ circ = (4 * np.pi * p.area) / (perim ** 2 + 1e-9)
52
+ circ = min(circ, 1.0) # Clamp to [0, 1] for physical validity
45
53
  aspect = p.major_axis_length / (p.minor_axis_length + 1e-9)
46
54
  mito_records.append({
47
55
  "Frame": f,
@@ -59,7 +67,9 @@ def analyze_shape_features(
59
67
  for p in regionprops(lbl_l):
60
68
  if p.area < 5:
61
69
  continue
62
- circ = (4 * np.pi * p.area) / (p.perimeter ** 2 + 1e-9)
70
+ perim = getattr(p, 'perimeter_crofton', p.perimeter)
71
+ circ = (4 * np.pi * p.area) / (perim ** 2 + 1e-9)
72
+ circ = min(circ, 1.0) # Clamp to [0, 1] for physical validity
63
73
  aspect = p.major_axis_length / (p.minor_axis_length + 1e-9)
64
74
  lyso_records.append({
65
75
  "Frame": f,
@@ -82,14 +92,15 @@ def analyze_shape_features(
82
92
 
83
93
  # ---------- KDE Distribution Plots ----------
84
94
  fig, axes = plt.subplots(1, 2, figsize=(20, 8))
85
- sns.kdeplot(mito_df["Circularity"], ax=axes[0], color="red", fill=True, alpha=0.5, label="Mito")
86
- sns.kdeplot(lyso_df["Circularity"], ax=axes[0], color="green", fill=True, alpha=0.4, label="Lyso")
95
+ sns.kdeplot(mito_df["Circularity"], ax=axes[0], color=CB_MITO, fill=True, alpha=0.5, label="Mito", clip=(0, 1))
96
+ sns.kdeplot(lyso_df["Circularity"], ax=axes[0], color=CB_LYSO, fill=True, alpha=0.4, label="Lyso", clip=(0, 1))
87
97
  axes[0].set_title("Circularity Distribution")
88
- axes[0].set_xlabel("Circularity (4πA/P²)")
98
+ axes[0].set_xlabel("Circularity (4\u03C0A/P\u00B2)")
99
+ axes[0].set_xlim(0, 1)
89
100
  axes[0].legend(frameon=False)
90
101
 
91
- sns.kdeplot(mito_df["Solidity"], ax=axes[1], color="red", fill=True, alpha=0.5, label="Mito")
92
- sns.kdeplot(lyso_df["Solidity"], ax=axes[1], color="green", fill=True, alpha=0.4, label="Lyso")
102
+ sns.kdeplot(mito_df["Solidity"], ax=axes[1], color=CB_MITO, fill=True, alpha=0.5, label="Mito", clip=(0, 1))
103
+ sns.kdeplot(lyso_df["Solidity"], ax=axes[1], color=CB_LYSO, fill=True, alpha=0.4, label="Lyso", clip=(0, 1))
93
104
  axes[1].set_title("Solidity Distribution")
94
105
  axes[1].set_xlabel("Solidity")
95
106
  axes[1].legend(frameon=False)
@@ -34,7 +34,7 @@ def profile_shape_data(
34
34
  data=combined_df,
35
35
  x="Type",
36
36
  y=metric,
37
- palette={"Mitochondria": "red", "Lysosomes": "green"},
37
+ palette={"Mitochondria": "#0173B2", "Lysosomes": "#DE8F05"},
38
38
  cut=0,
39
39
  inner="quartile",
40
40
  ax=ax
@@ -3,6 +3,7 @@
3
3
  # ============================================================
4
4
 
5
5
  import pandas as pd, numpy as np, matplotlib.pyplot as plt, seaborn as sns
6
+ from scipy.stats import spearmanr
6
7
  from pathlib import Path
7
8
  from automorphotrack.utils import ensure_dir
8
9
 
@@ -44,10 +45,18 @@ def summarize_integrated_data(
44
45
  )
45
46
  print(f"Merged dataset dimensions: {merged.shape[0]} rows × {merged.shape[1]} columns")
46
47
 
47
- # ---------- Correlation computation ----------
48
+ # ---------- Correlation computation (Spearman rank) ----------
49
+ # Spearman is preferred over Pearson for biological morphometric data
50
+ # because many relationships are non-linear and distributions are non-normal
48
51
  numeric_cols = merged.select_dtypes(include=[np.number])
49
- corr = numeric_cols.corr().round(2)
50
- print("Correlation matrix computed")
52
+ cols = numeric_cols.columns
53
+ rho_matrix = np.zeros((len(cols), len(cols)))
54
+ for i, c1 in enumerate(cols):
55
+ for j, c2 in enumerate(cols):
56
+ rho, _ = spearmanr(numeric_cols[c1], numeric_cols[c2])
57
+ rho_matrix[i, j] = rho
58
+ corr = pd.DataFrame(rho_matrix, index=cols, columns=cols).round(2)
59
+ print("Spearman correlation matrix computed")
51
60
 
52
61
  # ---------- Save results ----------
53
62
  out_dir = Path(out_dir)
@@ -61,7 +70,7 @@ def summarize_integrated_data(
61
70
  # ---------- Plot correlation heatmap ----------
62
71
  fig, ax = plt.subplots(figsize=(28, 20))
63
72
  sns.heatmap(corr, annot=True, fmt=".2f", cmap="coolwarm", square=True)
64
- ax.set_title("Integrated Correlation Matrix – Shape, Motility, Colocalization", fontsize=14)
73
+ ax.set_title("Integrated Spearman Correlation Matrix \u2013 Shape, Motility, Colocalization", fontsize=14)
65
74
  plt.tight_layout()
66
75
  heatmap_path = out_dir / "Integrated_CorrelationMatrix.png"
67
76
  plt.savefig(heatmap_path, dpi=300)
@@ -98,11 +98,11 @@ def track_organelles(
98
98
  mito_frame, lyso_frame, comp_frame = frame_rgb.copy(), frame_rgb.copy(), frame_rgb.copy()
99
99
 
100
100
  for p1, p2 in mito_paths:
101
- cv2.line(mito_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])), (255, 0, 0), 1)
102
- cv2.line(comp_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])), (255, 0, 0), 1)
101
+ cv2.line(mito_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])), (1, 115, 178), 1)
102
+ cv2.line(comp_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])), (1, 115, 178), 1)
103
103
  for p1, p2 in lyso_paths:
104
- cv2.line(lyso_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])), (0, 255, 0), 1)
105
- cv2.line(comp_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])), (0, 255, 0), 1)
104
+ cv2.line(lyso_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])), (222, 143, 5), 1)
105
+ cv2.line(comp_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])), (222, 143, 5), 1)
106
106
 
107
107
  mito_frames.append(upscale_frame(mito_frame))
108
108
  lyso_frames.append(upscale_frame(lyso_frame))
@@ -95,14 +95,14 @@ def track_overlay(
95
95
 
96
96
  for p1, p2 in mito_paths:
97
97
  cv2.line(mito_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])),
98
- (255, 0, 0), line_thickness, cv2.LINE_AA)
98
+ (1, 115, 178), line_thickness, cv2.LINE_AA)
99
99
  cv2.line(comp_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])),
100
- (255, 0, 0), line_thickness, cv2.LINE_AA)
100
+ (1, 115, 178), line_thickness, cv2.LINE_AA)
101
101
  for p1, p2 in lyso_paths:
102
102
  cv2.line(lyso_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])),
103
- (0, 255, 0), line_thickness, cv2.LINE_AA)
103
+ (222, 143, 5), line_thickness, cv2.LINE_AA)
104
104
  cv2.line(comp_frame, tuple(np.int32(p1[::-1])), tuple(np.int32(p2[::-1])),
105
- (0, 255, 0), line_thickness, cv2.LINE_AA)
105
+ (222, 143, 5), line_thickness, cv2.LINE_AA)
106
106
 
107
107
  mito_frames.append(upscale_frame(mito_frame))
108
108
  lyso_frames.append(upscale_frame(lyso_frame))
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: automorphotrack
3
+ Version: 2.0.0
4
+ Summary: Automated pipeline for mitochondrial and lysosomal detection, tracking, morphology, and colocalization analysis in microscopy images.
5
+ Home-page: https://github.com/abayatibrain/AMTpackage
6
+ Author: Armin Bayati, Ph.D.
7
+ Author-email: a.bayati.brain@gmail.com
8
+ License: MIT
9
+ Project-URL: Documentation, https://github.com/abayatibrain/AMTpackage
10
+ Project-URL: Source, https://github.com/abayatibrain/AMTpackage
11
+ Project-URL: Tracker, https://github.com/abayatibrain/AMTpackage/issues
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: numpy>=1.23.0
20
+ Requires-Dist: pandas>=1.5.0
21
+ Requires-Dist: matplotlib>=3.6.0
22
+ Requires-Dist: seaborn>=0.12.0
23
+ Requires-Dist: opencv-python>=4.6.0
24
+ Requires-Dist: scikit-image>=0.19.0
25
+ Requires-Dist: scipy>=1.9.0
26
+ Requires-Dist: tifffile>=2022.8.12
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description-content-type
31
+ Dynamic: home-page
32
+ Dynamic: license
33
+ Dynamic: project-url
34
+ Dynamic: requires-dist
35
+ Dynamic: requires-python
36
+ Dynamic: summary
@@ -0,0 +1,32 @@
1
+ MANIFEST.in
2
+ pyproject.toml
3
+ setup.py
4
+ automorphotrack/.___init__.py
5
+ automorphotrack/._colocalization.py
6
+ automorphotrack/._detection.py
7
+ automorphotrack/._lyso_count.py
8
+ automorphotrack/._morphology.py
9
+ automorphotrack/._motility.py
10
+ automorphotrack/._shape_features.py
11
+ automorphotrack/._shape_profiling.py
12
+ automorphotrack/._summary.py
13
+ automorphotrack/._tracking.py
14
+ automorphotrack/._tracking_overlay.py
15
+ automorphotrack/._utils.py
16
+ automorphotrack/__init__.py
17
+ automorphotrack/colocalization.py
18
+ automorphotrack/detection.py
19
+ automorphotrack/lyso_count.py
20
+ automorphotrack/morphology.py
21
+ automorphotrack/motility.py
22
+ automorphotrack/shape_features.py
23
+ automorphotrack/shape_profiling.py
24
+ automorphotrack/summary.py
25
+ automorphotrack/tracking.py
26
+ automorphotrack/tracking_overlay.py
27
+ automorphotrack/utils.py
28
+ automorphotrack.egg-info/PKG-INFO
29
+ automorphotrack.egg-info/SOURCES.txt
30
+ automorphotrack.egg-info/dependency_links.txt
31
+ automorphotrack.egg-info/requires.txt
32
+ automorphotrack.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64", "wheel"]
3
+ build-backend = "setuptools.build_meta"
@@ -1,19 +1,19 @@
1
1
  from setuptools import setup, find_packages
2
+ import os
2
3
 
3
- # Read the README file for the long description
4
- with open("README.md", "r", encoding="utf-8") as fh:
5
- long_description = fh.read()
4
+ # Read README file (handle missing file gracefully for pip install from sdist)
5
+ long_description = ""
6
+ readme_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md")
7
+ if os.path.exists(readme_path):
8
+ with open(readme_path, "r", encoding="utf-8") as fh:
9
+ long_description = fh.read()
6
10
 
7
11
  setup(
8
- name="AutoMorphoTrack",
9
- version="1.0.5",
10
- author="Armin Bayati",
12
+ name="automorphotrack",
13
+ version="2.0.0",
14
+ author="Armin Bayati, Ph.D.",
11
15
  author_email="a.bayati.brain@gmail.com",
12
- description=(
13
- "AutoMorphoTrack is an open-source Python package for automated detection, "
14
- "morphology classification, motility tracking, and colocalization analysis "
15
- "of organelles in multichannel fluorescence microscopy data."
16
- ),
16
+ description="Automated pipeline for mitochondrial and lysosomal detection, tracking, morphology, and colocalization analysis in microscopy images.",
17
17
  long_description=long_description,
18
18
  long_description_content_type="text/markdown",
19
19
  url="https://github.com/abayatibrain/AMTpackage",
@@ -1,135 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: AutoMorphoTrack
3
- Version: 1.0.5
4
- Summary: AutoMorphoTrack is an open-source Python package for automated detection, morphology classification, motility tracking, and colocalization analysis of organelles in multichannel fluorescence microscopy data.
5
- Home-page: https://github.com/abayatibrain/AMTpackage
6
- Author: Armin Bayati
7
- Author-email: a.bayati.brain@gmail.com
8
- License: MIT
9
- Project-URL: Documentation, https://github.com/abayatibrain/AMTpackage
10
- Project-URL: Source, https://github.com/abayatibrain/AMTpackage
11
- Project-URL: Tracker, https://github.com/abayatibrain/AMTpackage/issues
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Intended Audience :: Science/Research
16
- Classifier: Topic :: Scientific/Engineering :: Image Processing
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE.md
20
- Requires-Dist: numpy>=1.23.0
21
- Requires-Dist: pandas>=1.5.0
22
- Requires-Dist: matplotlib>=3.6.0
23
- Requires-Dist: seaborn>=0.12.0
24
- Requires-Dist: opencv-python>=4.6.0
25
- Requires-Dist: scikit-image>=0.19.0
26
- Requires-Dist: scipy>=1.9.0
27
- Requires-Dist: tifffile>=2022.8.12
28
- Dynamic: author
29
- Dynamic: author-email
30
- Dynamic: classifier
31
- Dynamic: description
32
- Dynamic: description-content-type
33
- Dynamic: home-page
34
- Dynamic: license
35
- Dynamic: license-file
36
- Dynamic: project-url
37
- Dynamic: requires-dist
38
- Dynamic: requires-python
39
- Dynamic: summary
40
-
41
- # AutoMorphoTrack
42
-
43
- **AutoMorphoTrack** is an open-source Python package for automated detection, morphology classification, shape profiling, motility tracking, and colocalization analysis of subcellular organelles in multichannel fluorescence microscopy data.
44
-
45
- This package represents the fully modular version of the **AutoMorphoTrack pipeline**, originally developed as a Jupyter Notebook by **Armin Bayati, Ph.D.**, and now distributed as an installable Python framework.
46
- Repository: [https://github.com/abayatibrain/automorphotrack](https://github.com/abayatibrain/automorphotrack)
47
-
48
- ---
49
-
50
- ## 🧬 Overview
51
-
52
- AutoMorphoTrack automates quantitative analysis of time-lapse `.tif` image stacks—typically dual-channel recordings of mitochondria and lysosomes—and generates publication-ready visual and numerical outputs at every step of the analysis pipeline.
53
-
54
- **Pipeline stages:**
55
-
56
- 1. **Detection** – Organelle segmentation and outline visualization
57
- 2. **Lysosomal Counting** – Per-frame lysosome enumeration and temporal profiling
58
- 3. **Morphology Classification** – Elongated vs. punctate mitochondria
59
- 4. **Shape Feature Extraction** – Area, circularity, solidity, aspect ratio, orientation
60
- 5. **Tracking** – Cumulative organelle trajectories (mitochondria, lysosomes, composite)
61
- 6. **Motility Analysis** – Velocity, displacement, and trajectory-based statistics
62
- 7. **Colocalization** – Bright-blue overlap overlays and correlation metrics
63
- 8. **Integrated Summary** – Correlation matrices linking morphology, motility, and overlap
64
-
65
- Each stage outputs high-resolution figures, videos, and CSV data tables stored in standardized subdirectories, ensuring reproducibility and compatibility with any image dataset.
66
-
67
- ---
68
-
69
- ## 📦 Installation
70
-
71
- Install directly from PyPI:
72
-
73
- ```bash
74
- pip install AutoMorphoTrack
75
- ```
76
-
77
- Or from source:
78
-
79
- ```bash
80
- git clone https://github.com/abayatibrain/automorphotrack.git
81
- cd automorphotrack
82
- pip install -e .
83
- ```
84
-
85
- ---
86
-
87
- ## 🚀 Basic Usage
88
-
89
- ```python
90
- from automorphotrack import *
91
-
92
- tif_path = "Composite.tif"
93
-
94
- detect_organelles(tif_path)
95
- count_lysosomes_per_frame(tif_path)
96
- classify_morphology(tif_path)
97
- analyze_shape_features(tif_path)
98
- track_organelles(tif_path)
99
- analyze_motility()
100
- analyze_colocalization(tif_path)
101
- summarize_integrated_data()
102
- ```
103
-
104
- Each function automatically generates visual and quantitative outputs at every step.
105
-
106
- ---
107
-
108
- ## 📁 Outputs
109
-
110
- | Step | Output Type | Example Files |
111
- |------|--------------|---------------|
112
- | Detection | PNG + MP4 | `Mito_Frame0.png`, `Mitochondria_Detection.mp4` |
113
- | Lysosome Count | PNG + CSV + MP4 | `Lyso_Count_Plot.png`, `Lysosome_Counts.csv` |
114
- | Morphology | PNG + MP4 + CSV | `Morphology_Frame0_Labeled.png`, `Morphology_Labeled.mp4` |
115
- | Shape Features | PNG + CSV | `Shape_Distributions.png`, `Mito_ShapeMetrics.csv` |
116
- | Tracking | PNG + MP4 + CSV | `Cumulative_Mito.png`, `Mito_Tracks.csv` |
117
- | Motility | PNG + CSV | `Motility_Distributions.png`, `Motility_Scatter.png` |
118
- | Colocalization | PNG + MP4 + CSV | `Colocalization_Frame0.png`, `Colocalization.csv` |
119
- | Summary | PNG + CSV | `Integrated_CorrelationMatrix.png`, `Integrated_Merged_Data.csv` |
120
-
121
- ---
122
-
123
- ## 🔧 Dependencies
124
-
125
- - Python ≥ 3.9
126
- - numpy, pandas, matplotlib, seaborn, opencv-python, scikit-image, scipy, tifffile
127
-
128
- ---
129
-
130
- ## 🧩 Citation
131
-
132
- If you use **AutoMorphoTrack** in your research, please cite:
133
-
134
- > **Bayati, A. (2025)**. AutoMorphoTrack: An accessible Python framework for automated analysis of organelle morphology and motility.
135
- > *GitHub Repository:* [https://github.com/abayatibrain/automorphotrack](https://github.com/abayatibrain/automorphotrack)
@@ -1,21 +0,0 @@
1
- LICENSE.md
2
- MANIFEST.in
3
- README.md
4
- setup.py
5
- AutoMorphoTrack.egg-info/PKG-INFO
6
- AutoMorphoTrack.egg-info/SOURCES.txt
7
- AutoMorphoTrack.egg-info/dependency_links.txt
8
- AutoMorphoTrack.egg-info/requires.txt
9
- AutoMorphoTrack.egg-info/top_level.txt
10
- automorphotrack/__init__.py
11
- automorphotrack/colocalization.py
12
- automorphotrack/detection.py
13
- automorphotrack/lyso_count.py
14
- automorphotrack/morphology.py
15
- automorphotrack/motility.py
16
- automorphotrack/shape_features.py
17
- automorphotrack/shape_profiling.py
18
- automorphotrack/summary.py
19
- automorphotrack/tracking.py
20
- automorphotrack/tracking_overlay.py
21
- automorphotrack/utils.py
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Armin Bayati
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,19 +0,0 @@
1
- # Include documentation and license files
2
- include README.md
3
- include LICENSE
4
- include requirements.txt
5
-
6
- # Include all Python source files
7
- recursive-include automorphotrack *.py
8
-
9
- # Include any additional data files (if present)
10
- recursive-include automorphotrack *.csv
11
- recursive-include automorphotrack *.txt
12
- recursive-include automorphotrack *.ipynb
13
- recursive-include automorphotrack *.png
14
- recursive-include automorphotrack *.jpg
15
- recursive-include automorphotrack *.tif
16
- recursive-include automorphotrack *.json
17
-
18
- # Exclude unnecessary system or cache files
19
- global-exclude __pycache__ *.py[cod] .DS_Store
@@ -1,135 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: AutoMorphoTrack
3
- Version: 1.0.5
4
- Summary: AutoMorphoTrack is an open-source Python package for automated detection, morphology classification, motility tracking, and colocalization analysis of organelles in multichannel fluorescence microscopy data.
5
- Home-page: https://github.com/abayatibrain/AMTpackage
6
- Author: Armin Bayati
7
- Author-email: a.bayati.brain@gmail.com
8
- License: MIT
9
- Project-URL: Documentation, https://github.com/abayatibrain/AMTpackage
10
- Project-URL: Source, https://github.com/abayatibrain/AMTpackage
11
- Project-URL: Tracker, https://github.com/abayatibrain/AMTpackage/issues
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Intended Audience :: Science/Research
16
- Classifier: Topic :: Scientific/Engineering :: Image Processing
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE.md
20
- Requires-Dist: numpy>=1.23.0
21
- Requires-Dist: pandas>=1.5.0
22
- Requires-Dist: matplotlib>=3.6.0
23
- Requires-Dist: seaborn>=0.12.0
24
- Requires-Dist: opencv-python>=4.6.0
25
- Requires-Dist: scikit-image>=0.19.0
26
- Requires-Dist: scipy>=1.9.0
27
- Requires-Dist: tifffile>=2022.8.12
28
- Dynamic: author
29
- Dynamic: author-email
30
- Dynamic: classifier
31
- Dynamic: description
32
- Dynamic: description-content-type
33
- Dynamic: home-page
34
- Dynamic: license
35
- Dynamic: license-file
36
- Dynamic: project-url
37
- Dynamic: requires-dist
38
- Dynamic: requires-python
39
- Dynamic: summary
40
-
41
- # AutoMorphoTrack
42
-
43
- **AutoMorphoTrack** is an open-source Python package for automated detection, morphology classification, shape profiling, motility tracking, and colocalization analysis of subcellular organelles in multichannel fluorescence microscopy data.
44
-
45
- This package represents the fully modular version of the **AutoMorphoTrack pipeline**, originally developed as a Jupyter Notebook by **Armin Bayati, Ph.D.**, and now distributed as an installable Python framework.
46
- Repository: [https://github.com/abayatibrain/automorphotrack](https://github.com/abayatibrain/automorphotrack)
47
-
48
- ---
49
-
50
- ## 🧬 Overview
51
-
52
- AutoMorphoTrack automates quantitative analysis of time-lapse `.tif` image stacks—typically dual-channel recordings of mitochondria and lysosomes—and generates publication-ready visual and numerical outputs at every step of the analysis pipeline.
53
-
54
- **Pipeline stages:**
55
-
56
- 1. **Detection** – Organelle segmentation and outline visualization
57
- 2. **Lysosomal Counting** – Per-frame lysosome enumeration and temporal profiling
58
- 3. **Morphology Classification** – Elongated vs. punctate mitochondria
59
- 4. **Shape Feature Extraction** – Area, circularity, solidity, aspect ratio, orientation
60
- 5. **Tracking** – Cumulative organelle trajectories (mitochondria, lysosomes, composite)
61
- 6. **Motility Analysis** – Velocity, displacement, and trajectory-based statistics
62
- 7. **Colocalization** – Bright-blue overlap overlays and correlation metrics
63
- 8. **Integrated Summary** – Correlation matrices linking morphology, motility, and overlap
64
-
65
- Each stage outputs high-resolution figures, videos, and CSV data tables stored in standardized subdirectories, ensuring reproducibility and compatibility with any image dataset.
66
-
67
- ---
68
-
69
- ## 📦 Installation
70
-
71
- Install directly from PyPI:
72
-
73
- ```bash
74
- pip install AutoMorphoTrack
75
- ```
76
-
77
- Or from source:
78
-
79
- ```bash
80
- git clone https://github.com/abayatibrain/automorphotrack.git
81
- cd automorphotrack
82
- pip install -e .
83
- ```
84
-
85
- ---
86
-
87
- ## 🚀 Basic Usage
88
-
89
- ```python
90
- from automorphotrack import *
91
-
92
- tif_path = "Composite.tif"
93
-
94
- detect_organelles(tif_path)
95
- count_lysosomes_per_frame(tif_path)
96
- classify_morphology(tif_path)
97
- analyze_shape_features(tif_path)
98
- track_organelles(tif_path)
99
- analyze_motility()
100
- analyze_colocalization(tif_path)
101
- summarize_integrated_data()
102
- ```
103
-
104
- Each function automatically generates visual and quantitative outputs at every step.
105
-
106
- ---
107
-
108
- ## 📁 Outputs
109
-
110
- | Step | Output Type | Example Files |
111
- |------|--------------|---------------|
112
- | Detection | PNG + MP4 | `Mito_Frame0.png`, `Mitochondria_Detection.mp4` |
113
- | Lysosome Count | PNG + CSV + MP4 | `Lyso_Count_Plot.png`, `Lysosome_Counts.csv` |
114
- | Morphology | PNG + MP4 + CSV | `Morphology_Frame0_Labeled.png`, `Morphology_Labeled.mp4` |
115
- | Shape Features | PNG + CSV | `Shape_Distributions.png`, `Mito_ShapeMetrics.csv` |
116
- | Tracking | PNG + MP4 + CSV | `Cumulative_Mito.png`, `Mito_Tracks.csv` |
117
- | Motility | PNG + CSV | `Motility_Distributions.png`, `Motility_Scatter.png` |
118
- | Colocalization | PNG + MP4 + CSV | `Colocalization_Frame0.png`, `Colocalization.csv` |
119
- | Summary | PNG + CSV | `Integrated_CorrelationMatrix.png`, `Integrated_Merged_Data.csv` |
120
-
121
- ---
122
-
123
- ## 🔧 Dependencies
124
-
125
- - Python ≥ 3.9
126
- - numpy, pandas, matplotlib, seaborn, opencv-python, scikit-image, scipy, tifffile
127
-
128
- ---
129
-
130
- ## 🧩 Citation
131
-
132
- If you use **AutoMorphoTrack** in your research, please cite:
133
-
134
- > **Bayati, A. (2025)**. AutoMorphoTrack: An accessible Python framework for automated analysis of organelle morphology and motility.
135
- > *GitHub Repository:* [https://github.com/abayatibrain/automorphotrack](https://github.com/abayatibrain/automorphotrack)
@@ -1,95 +0,0 @@
1
- # AutoMorphoTrack
2
-
3
- **AutoMorphoTrack** is an open-source Python package for automated detection, morphology classification, shape profiling, motility tracking, and colocalization analysis of subcellular organelles in multichannel fluorescence microscopy data.
4
-
5
- This package represents the fully modular version of the **AutoMorphoTrack pipeline**, originally developed as a Jupyter Notebook by **Armin Bayati, Ph.D.**, and now distributed as an installable Python framework.
6
- Repository: [https://github.com/abayatibrain/automorphotrack](https://github.com/abayatibrain/automorphotrack)
7
-
8
- ---
9
-
10
- ## 🧬 Overview
11
-
12
- AutoMorphoTrack automates quantitative analysis of time-lapse `.tif` image stacks—typically dual-channel recordings of mitochondria and lysosomes—and generates publication-ready visual and numerical outputs at every step of the analysis pipeline.
13
-
14
- **Pipeline stages:**
15
-
16
- 1. **Detection** – Organelle segmentation and outline visualization
17
- 2. **Lysosomal Counting** – Per-frame lysosome enumeration and temporal profiling
18
- 3. **Morphology Classification** – Elongated vs. punctate mitochondria
19
- 4. **Shape Feature Extraction** – Area, circularity, solidity, aspect ratio, orientation
20
- 5. **Tracking** – Cumulative organelle trajectories (mitochondria, lysosomes, composite)
21
- 6. **Motility Analysis** – Velocity, displacement, and trajectory-based statistics
22
- 7. **Colocalization** – Bright-blue overlap overlays and correlation metrics
23
- 8. **Integrated Summary** – Correlation matrices linking morphology, motility, and overlap
24
-
25
- Each stage outputs high-resolution figures, videos, and CSV data tables stored in standardized subdirectories, ensuring reproducibility and compatibility with any image dataset.
26
-
27
- ---
28
-
29
- ## 📦 Installation
30
-
31
- Install directly from PyPI:
32
-
33
- ```bash
34
- pip install AutoMorphoTrack
35
- ```
36
-
37
- Or from source:
38
-
39
- ```bash
40
- git clone https://github.com/abayatibrain/automorphotrack.git
41
- cd automorphotrack
42
- pip install -e .
43
- ```
44
-
45
- ---
46
-
47
- ## 🚀 Basic Usage
48
-
49
- ```python
50
- from automorphotrack import *
51
-
52
- tif_path = "Composite.tif"
53
-
54
- detect_organelles(tif_path)
55
- count_lysosomes_per_frame(tif_path)
56
- classify_morphology(tif_path)
57
- analyze_shape_features(tif_path)
58
- track_organelles(tif_path)
59
- analyze_motility()
60
- analyze_colocalization(tif_path)
61
- summarize_integrated_data()
62
- ```
63
-
64
- Each function automatically generates visual and quantitative outputs at every step.
65
-
66
- ---
67
-
68
- ## 📁 Outputs
69
-
70
- | Step | Output Type | Example Files |
71
- |------|--------------|---------------|
72
- | Detection | PNG + MP4 | `Mito_Frame0.png`, `Mitochondria_Detection.mp4` |
73
- | Lysosome Count | PNG + CSV + MP4 | `Lyso_Count_Plot.png`, `Lysosome_Counts.csv` |
74
- | Morphology | PNG + MP4 + CSV | `Morphology_Frame0_Labeled.png`, `Morphology_Labeled.mp4` |
75
- | Shape Features | PNG + CSV | `Shape_Distributions.png`, `Mito_ShapeMetrics.csv` |
76
- | Tracking | PNG + MP4 + CSV | `Cumulative_Mito.png`, `Mito_Tracks.csv` |
77
- | Motility | PNG + CSV | `Motility_Distributions.png`, `Motility_Scatter.png` |
78
- | Colocalization | PNG + MP4 + CSV | `Colocalization_Frame0.png`, `Colocalization.csv` |
79
- | Summary | PNG + CSV | `Integrated_CorrelationMatrix.png`, `Integrated_Merged_Data.csv` |
80
-
81
- ---
82
-
83
- ## 🔧 Dependencies
84
-
85
- - Python ≥ 3.9
86
- - numpy, pandas, matplotlib, seaborn, opencv-python, scikit-image, scipy, tifffile
87
-
88
- ---
89
-
90
- ## 🧩 Citation
91
-
92
- If you use **AutoMorphoTrack** in your research, please cite:
93
-
94
- > **Bayati, A. (2025)**. AutoMorphoTrack: An accessible Python framework for automated analysis of organelle morphology and motility.
95
- > *GitHub Repository:* [https://github.com/abayatibrain/automorphotrack](https://github.com/abayatibrain/automorphotrack)