Skip to content

Commit ef1379f

Browse files
authored
Add summary of changes to MetricComputation.md
This markdown file summarizes changes made to Metric_computation.py, including significant logic updates such as the removal of migration time calculations and restoration of gene-specific metrics.
1 parent ae5089c commit ef1379f

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Summary of Changes to Metric_computation.py Since Sept 2024
2+
3+
Timeline of Changes
4+
5+
| Date | Commit | Summary |
6+
|------------|---------|------------------------------------------|
7+
| 2025-04-07 | fdc6a0c | Added import_folder() function |
8+
| 2025-04-11 | bfa002a | Bugfix |
9+
| 2025-04-14 | e25cb77 | Path updates |
10+
| 2025-04-29 | 77d8cab | Processing resubmission data |
11+
| 2025-05-14 | 906998e | Batch processing scripts |
12+
| 2025-07-30 | 6fc7597 | Restored to using Quilt data |
13+
| 2025-08-21 | 61904ba | Column name updates (Movie ID → Data ID) |
14+
| 2025-08-25 | 91db0e9 | Removed unused metric column |
15+
16+
---
17+
Major Changes Analysis
18+
19+
1. IO Changes (Not Breaking)
20+
21+
- Movie ID → Data ID column name changes throughout
22+
- Restored io.load_bf_colony_features() and io.load_imaging_and_segmentation_dataset() instead of CSV file loading
23+
- Removed temporary import_folder() function
24+
25+
2. LOGIC CHANGE: Migration Time Calculation REMOVED ⚠️
26+
27+
Before (April 2025):
28+
```
29+
# In add_bottom_mip_migration():
30+
raw_values = df_area['Area at the glass (pixels)'].values
31+
df_area['dy2'] = savgol_filter(raw_values, polyorder=2, window_length=40, deriv=2)
32+
d_filt = df_area[(df_area.Timepoint>=35) & (df_area.Timepoint<=80)]
33+
index_infl = d_filt['dy2'].idxmax()
34+
x_p = df_area['Timepoint'][index_infl]
35+
df_area['Migration time (h)'] = x_p * (30/60)
36+
```
37+
38+
After (August 2025): This entire migration time calculation was REMOVED.
39+
40+
Impact: The Migration time (h) column is no longer computed in add_bottom_mip_migration(). This is a significant
41+
logic removal.
42+
43+
3. LOGIC CHANGE: Gene Metrics Restored ✓
44+
45+
Before (April 2025): Gene-specific metrics were commented out:
46+
```
47+
# ######--computing Time of max EOMES expression ------ #####
48+
# df_eomes=df_int[(df_int.Gene=='EOMES|TBR2') | (df_int.Gene=='TBR2|EOMES')]
49+
# ... (all commented)
50+
```
51+
52+
After (July 2025): Gene metrics were restored and expanded:
53+
- Time of max EOMES expression
54+
- Time of max TBXT expression (NEW)
55+
- Time of inflection of E-cad expression
56+
- Time of half-maximal SOX2 expression
57+
58+
4. Output Column Removal
59+
60+
Removed from final output (August 2025):
61+
```
62+
# Removed: 'Time of max expression (h)'
63+
```
64+
This column was removed from the final feature list.
65+
66+
---
67+
#Summary Table
68+
69+
| Change | Type | Impact |
70+
|------------------------------------------------|--------|------------------------------------------------------------|
71+
| Movie ID → Data ID | IO | Not breaking |
72+
| Quilt data loading restored | IO | Not breaking |
73+
| Migration time calculation REMOVED | LOGIC | Breaking - metric no longer computed |
74+
| Gene-specific metrics RESTORED | LOGIC | Significant - EOMES, TBXT, CDH1, SOX2 metrics now computed |
75+
| Time of max expression (h) removed from output | Output | Minor - column removed |
76+
| import_folder() removed | IO | Not breaking (was temporary) |
77+
---
78+
Conclusion
79+
80+
Two significant logic changes:
81+
82+
1. Migration time calculation REMOVED from add_bottom_mip_migration() - this metric based on second derivative of
83+
area at glass is no longer computed
84+
2. Gene-specific metrics RESTORED - Time of max EOMES, TBXT expression, E-cad inflection, and SOX2 half-maximal are
85+
now computed (were commented out before)
86+
87+
The migration time removal could be significant if downstream analysis depended on that metric.
88+

0 commit comments

Comments
 (0)