File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
EMT_data_analysis/analysis_scripts Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,23 @@ def nuclei_localization(
5050 tmp_dir = Path ("./emt_tmp/nuclei_localization/" )
5151 tmp_dir .mkdir (exist_ok = True , parents = True )
5252
53- # load segmetnations and meshes
54- if df ['Gene' ].values [0 ] == 'HIST1H2BJ' :
53+ # load segmentations and meshes
54+ # First, check for local ZARR file in the reprocessed directory
55+ local_zarr_base = Path ("/allen/aics/emt/all_cells_masks/ZARR_Conversion/August_24_H2B_reprocess_v2/main" )
56+ local_zarr_path = local_zarr_base / f"{ data_id } _H2B_nuclear_segmentation.ome.zarr"
57+
58+ if local_zarr_path .exists ():
59+ seg_path = str (local_zarr_path )
60+ print (f"Using local ZARR: { seg_path } " )
61+ elif df ['Gene' ].values [0 ] == 'HIST1H2BJ' :
5562 seg_path = df ['H2B Nuclear Segmentation URL' ].values [0 ]
63+ print (f"Using H2B segmentation from quilt manifest: { seg_path } " )
5664 else :
5765 raise ValueError (f"The move { data_id } does not have H2B segmentations" )
5866
5967 # import pdb; pdb.set_trace()
6068 segmentations = BioImage (seg_path )
69+
6170 # download meshes into temporary directory from s3 bucket
6271 mesh_path = df ['CollagenIV Segmentation Mesh Folder' ].values [0 ].replace ('s3://allencell/' , '' )
6372 bucket = q3 .Bucket ("s3://allencell" )
You can’t perform that action at this time.
0 commit comments