1616 "M_LR_000214_L" : ["PV" , "CR" , "Calb1" ],
1717 "M_AMD_N62_L" : ["PV" , "CR" , "Calb1" ],
1818 "M_AMD_N180_R" : ["CR" , "Ntng1" , "CTBP2" ],
19+ "M_AMD_N180_L" : ["CR" , "Ntng1" , "Lypd1" ],
1920 # Mutant / some stuff is weird.
2021 # "M_AMD_Runx1_L": ["PV", "Lypd1", "Calb1"],
2122 # This one still has to be stitched:
2223 # "M_LR_000184_R": {"PV", "Prph"},
23- # We don't have PV here, so we exclude these two for now.
24- # "M_AMD_00N180_L": {"CR", "Ntng1", "Lypd1"},
2524}
2625
2726# Map from channels to subtypes.
@@ -99,7 +98,15 @@ def check_processing_status():
9998 continue
10099
101100 # Check which tables we have.
102- expected_tables = [f"{ chan } _{ seg_name } _object-measures.tsv" for chan in channels ]
101+ if cochlea == "M_AMD_N180_L" : # we need all intensity measures here
102+ seg_names = ["CR-SGN-v2" , "Ntng1-SGN-v2" , "Lypd1-SGN-v2" ]
103+ expected_tables = [f"{ chan } _{ sname } _object-measures.tsv" for chan in channels for sname in seg_names ]
104+ elif cochlea == "M_AMD_N180_R" :
105+ seg_names = ["CR-SGN-v2" , "Ntng1-SGN-v2" ]
106+ expected_tables = [f"{ chan } _{ sname } _object-measures.tsv" for chan in channels for sname in seg_names ]
107+ else :
108+ expected_tables = [f"{ chan } _{ seg_name } _object-measures.tsv" for chan in channels ]
109+
103110 tables = s3 .ls (os .path .join (BUCKET_NAME , cochlea , table_folder ))
104111 tables = [os .path .basename (tab ) for tab in tables ]
105112
@@ -118,10 +125,10 @@ def require_missing_tables(missing_tables):
118125 output_root = "./object_measurements"
119126
120127 for cochlea , missing_tabs in missing_tables .items ():
121- seg_name = "PV_SGN_v2" if "PV" in COCHLEAE_FOR_SUBTYPES [cochlea ] else "CR_SGN_v2"
122128 for missing in missing_tabs :
123129 channel = missing .split ("_" )[0 ]
124- print ("Computing intensities for:" , cochlea , channel )
130+ seg_name = missing .split ("_" )[1 ].replace ("-" , "_" )
131+ print ("Computing intensities for cochlea:" , cochlea , "segmentation:" , seg_name , "channel:" , channel )
125132
126133 img_s3 = f"{ cochlea } /images/ome-zarr/{ channel } .ome.zarr"
127134 seg_s3 = f"{ cochlea } /images/ome-zarr/{ seg_name } .ome.zarr"
@@ -327,18 +334,14 @@ def analyze_subtype_data(show_plots=True):
327334
328335
329336# General notes:
330- # M_LR_000099_L: PV looks weird and segmentation doesn't work so well. Besides this intensities look good.
331- # Double check if this is the right channel. Maybe we try domain adaptation here?
332- # M_LR_000214_L: PV looks correct, segmentation is not there yet.
333- # M_AMD_N62_L: PV signal and segmentation look good.
334- # M_AMD_N180_R: Need SGN segmentation based on CR.
337+ # See:
335338def main ():
336- # missing_tables = check_processing_status()
337- # require_missing_tables(missing_tables)
339+ missing_tables = check_processing_status ()
340+ require_missing_tables (missing_tables )
338341
339342 # compile_data_for_subtype_analysis()
340343
341- analyze_subtype_data (show_plots = False )
344+ # analyze_subtype_data(show_plots=False)
342345
343346
344347if __name__ == "__main__" :
0 commit comments