diff --git a/infer_subc/utils/stats.py b/infer_subc/utils/stats.py index 84f71d3..26d842b 100644 --- a/infer_subc/utils/stats.py +++ b/infer_subc/utils/stats.py @@ -4,6 +4,7 @@ from skimage.measure import regionprops_table, regionprops, mesh_surface_area, marching_cubes, label from skimage.morphology import binary_erosion from skimage.measure._regionprops import _props_to_dict +from skimage.segmentation import watershed from typing import Tuple, Any, Union import itertools @@ -17,7 +18,27 @@ from infer_subc.core.img import apply_mask - +def _contact(orgs:str, + organelle_segs: dict[str:np.ndarray], + splitter: str="_") -> tuple[np.ndarray, np.ndarray]: + ########################################## + ## CREATE CONTACT + ########################################## + site = np.ones_like(organelle_segs[orgs.split(splitter)[0]]) + for org in orgs.split(splitter): + site = site*(organelle_segs[org]>0) + + ########################################## + ## DETERMINE REDUNDANT CONTACTS + ########################################## + HOc = site.copy() + for org, val in organelle_segs.items(): + if (org not in orgs.split(splitter)) and np.any(site*val): + HOc = HOc*(np.invert(watershed(image=(np.invert(site)), + markers=(site*val), + mask=site, + connectivity=np.ones((3, 3, 3), bool))>0)) + return site, HOc def _my_props_to_dict( rp, label_image, intensity_image=None, properties=("label", "area", "centroid", "bbox"), extra_properties=None, spacing: Union[tuple, None] = None): @@ -398,93 +419,51 @@ def standard_deviation_intensity(region, intensities): return props_table - -def get_contact_metrics_3D(a: np.ndarray, - a_name: str, - b: np.ndarray, - b_name:str, - mask: np.ndarray, +def get_empty_contact_dist_tabs(mask: np.ndarray, + name: str, + dist_centering_obj: np.ndarray, scale: Union[tuple, None]=None, - include_dist:bool=False, - dist_centering_obj: Union[np.ndarray, None]=None, - dist_num_bins: Union[int, None]=None, - dist_zernike_degrees: Union[int, None]=None, + dist_zernike_degrees: Union[int,None] = None, dist_center_on: Union[bool, None]=None, - dist_keep_center_as_bin: Union[bool, None]=None): - """ - collect volumentric measurements of organelle `a` intersect organelle `b` - - Parameters - ------------ - a: np.ndarray - 3D (ZYX) np.ndarray of one set of objects that will be assessed as part of a "contact" - a_name: str - the name or nickname of object a; this will be used for record keeping purposed in the output dataframe - b: np.ndarray - 3D (ZYX) np.ndarray of one set of objects that will be assessed as part of a "contact" - b_name: str - the name or nickname of object b; this will be used for record keeping purposed in the output dataframe - mask: np.ndarray - 3D (ZYX) binary mask of the area to measure contacts from - include_dist:bool=False - *optional* - True = include the XY and Z distribution measurements of the contact sites within the masked region - (utilizing the functions get_XY_distribution() and get_Z_distribution() from Infer-subc) - False = do not include distirbution measurements - dist_centering_obj: Union[np.ndarray, None]=None - ONLY NEEDED IF include_dist=True; if None, the center of the mask will be used - 3D (ZYX) np.ndarray containing the object to use for centering the XY distribution mask - dist_num_bins: Union[int, None]=None - ONLY NEEDED IF include_dist=True; if None, the default is 5 - dist_zernike_degrees: Unions[int, None]=None, - ONLY NEEDED IF include_dist=True; if None, the zernike share measurements will not be included in the distribution - the number of zernike degrees to include for the zernike shape descriptors - dist_center_on: Union[bool, None]=None - ONLY NEEDED IF include_dist=True; if None, the default is False - True = distribute the bins from the center of the centering object - False = distribute the bins from the edge of the centering object - dist_keep_center_as_bin: Union[bool, None]=None - ONLY NEEDED IF include_dist=True; if None, the default is True - True = include the centering object area when creating the bins - False = do not include the centering object area when creating the bins - - - Regionprops measurements: - ------------------------ - ['label', - 'centroid', - 'bbox', - 'area', - 'equivalent_diameter', - 'extent', - 'feret_diameter_max', - 'euler_number', - 'convex_area', - 'solidity', - 'axis_major_length', - 'axis_minor_length'] - - Additional measurements: - ---------------------- - ['surface_area'] - - - Returns - ------------- - pandas dataframe of containing regionprops measurements (columns) for each overlap region between a and b (rows) - - """ + dist_keep_center_as_bin: Union[bool, None]=None, + dist_num_bins: Union[int, None]=None): + XY_contact_dist, XY_bins, XY_wedges = get_XY_distribution(mask=mask, + obj=np.zeros_like(mask), + obj_name=name, + centering_obj=dist_centering_obj, + scale=scale, + center_on=dist_center_on, + keep_center_as_bin=dist_keep_center_as_bin, + num_bins=dist_num_bins, + zernike_degrees=dist_zernike_degrees) + + Z_contact_dist = get_Z_distribution(mask=mask, + obj=np.zeros_like(mask), + obj_name=name, + center_obj=dist_centering_obj, + scale=scale) + + return pd.merge(XY_contact_dist, Z_contact_dist, on=["object", "scale"]) + +def get_contact_metrics_3D(orgs: str, + organelle_segs: dict[str:np.ndarray], + mask: np.ndarray, + splitter: str="_", + scale: Union[tuple, None]=None, + include_dist:bool=False, + dist_centering_obj: Union[np.ndarray, None]=None, + dist_num_bins: Union[int, None]=None, + dist_zernike_degrees: Union[int, None]=None, + dist_center_on: Union[bool, None]=None, + dist_keep_center_as_bin: Union[bool, None]=None) -> list: + ########################################## + ## PREPARING CONTACT METRICS + ########################################## + site, HOc = _contact(orgs, organelle_segs, splitter) + dist_tabs =[] + labels = label(apply_mask(site, mask)).astype("int") #Isolate to only contact sites found within the cell of interest + para_labels = apply_mask((HOc>0), mask).astype("int") * labels #copy labels found in labels to para_labels - ######################### - ## CREATE OVERLAP REGIONS - ######################### - a = _assert_uint16_labels(a) - b = _assert_uint16_labels(b) - - a_int_b = np.logical_and(a > 0, b > 0) - - labels = label(apply_mask(a_int_b, mask)).astype("int") - ########################################## ## CREATE LIST OF REGIONPROPS MEASUREMENTS ########################################## @@ -511,78 +490,264 @@ def get_contact_metrics_3D(a: np.ndarray, surface_area_tab = pd.DataFrame(surface_area_from_props(labels, props, scale)) ###################################################### - ## LIST WHICH ORGANELLES ARE INVOLVED IN THE CONTACTS - ###################################################### - label_a = [] - index_ab = [] - label_b = [] - for index, lab in enumerate(props["label"]): - # this seems less elegant than you might wish, given that regionprops returns a slice, - # but we need to expand the slice out by one voxel in each direction, or surface area freaks out - volume = labels[props["slice"][index]] - la = a[props["slice"][index]] - lb = b[props["slice"][index]] - volume = volume == lab - la = la[volume] - lb = lb[volume] - - all_as = np.unique(la[la>0]).tolist() - all_bs = np.unique(lb[lb>0]).tolist() - if len(all_as) != 1: - print(f"we have an error. as-> {all_as}") - if len(all_bs) != 1: - print(f"we have an error. bs-> {all_bs}") - - label_a.append(f"{all_as[0]}" ) - label_b.append(f"{all_bs[0]}" ) - index_ab.append(f"{all_as[0]}_{all_bs[0]}") - - + ## LIST WHICH ORGANELLES ARE INVOLVED IN THE CONTACT + ###################################################### + cont_inv = [] #initializes a variable to be used for creating the values for the contacts in the dictionary + # This variable is a list of the labels of each organelle involved in one contact site between those organelles + involved = orgs.split(splitter) #creates list of all involved organelles in the contact + indexes = dict.fromkeys(involved, []) #A dictionary of indexes of site involved in the contact + indexes[orgs] = [] # str = "contact" or "organelle", may have multiple different organelles + # list = contact or organelle number in image corresponding to the same contact in the other keys + # a 2-way contact will have 3 keys, a 3-way contact will have 4 keys, etc + redundancy = [] + for index, l in enumerate(props["label"]): + cont_inv.clear() #clears cont_inv variable of any labels from past contact site for new contact site + present = para_labels[props["slice"][index]] + present = present==l + redundant = not np.any(present) + redundancy.append(redundant) + for org in involved: #iterates across list of involved organelles + volume = labels[props["slice"][index]] + lorg = organelle_segs[org][props["slice"][index]] + volume = volume==l + lorg = lorg[volume] + all_inv = np.unique(lorg[lorg>0]).tolist() + if len(all_inv) != 1: #ensures only one label is involved in the contact site + print(f"we have an error. as-> {all_inv}") #informs the console of any errors and the reasoing for it + indexes[org].append(f"{all_inv[0]}") #adds the label of the organelle involved in the contact to the organelle's key's list + cont_inv.append(f"{all_inv[0]}") #adds the label of the organelle involved in the contact to the list of involved organelle labels + indexes[orgs].append('_'.join(cont_inv)) #adds the combination of all the organelle's labels involved in the contact to the contact key's list ###################################################### ## CREATE COMBINED DATAFRAME OF THE QUANTIFICATION ###################################################### props_table = pd.DataFrame(props) props_table.drop(columns=['slice', 'label'], inplace=True) - props_table.insert(0, 'label',value=index_ab) - props_table.insert(0, "object", f"{a_name}X{b_name}") + props_table.insert(0, 'label',value=indexes[orgs]) + props_table.insert(0, "object", orgs) props_table.rename(columns={"area": "volume"}, inplace=True) props_table.insert(11, "surface_area", surface_area_tab) - props_table.insert(13, "SA_to_volume_ratio", props_table["surface_area"].div(props_table["volume"])) - + props_table.insert(13, "SA_to_volume_ratio", + props_table["surface_area"].div(props_table["volume"])) + props_table["redundant"] = redundancy + if scale is not None: round_scale = (round(scale[0], 4), round(scale[1], 4), round(scale[2], 4)) props_table.insert(loc=2, column="scale", value=f"{round_scale}") else: props_table.insert(loc=2, column="scale", value=f"{tuple(np.ones(labels.ndim))}") - ###################################################### ## optional: DISTRIBUTION OF CONTACTS MEASUREMENTS ###################################################### - if include_dist is True: + if include_dist: XY_contact_dist, XY_bins, XY_wedges = get_XY_distribution(mask=mask, - obj=a_int_b, - obj_name=f"{a_name}X{b_name}", + obj=site, + obj_name=orgs, centering_obj=dist_centering_obj, scale=scale, center_on=dist_center_on, keep_center_as_bin=dist_keep_center_as_bin, num_bins=dist_num_bins, zernike_degrees=dist_zernike_degrees) - + Z_contact_dist = get_Z_distribution(mask=mask, - obj=a_int_b, - obj_name=f"{a_name}X{b_name}", + obj=site, + obj_name=orgs, center_obj=dist_centering_obj, scale=scale) - contact_dist_tab = pd.merge(XY_contact_dist, Z_contact_dist, on=["object", "scale"]) - - return props_table, contact_dist_tab + dist_tabs.append(contact_dist_tab) + indexes.clear() + if include_dist: + return props_table, dist_tabs else: return props_table +# def get_contact_metrics_3D(a: np.ndarray, +# a_name: str, +# b: np.ndarray, +# b_name:str, +# mask: np.ndarray, +# scale: Union[tuple, None]=None, +# include_dist:bool=False, +# dist_centering_obj: Union[np.ndarray, None]=None, +# dist_num_bins: Union[int, None]=None, +# dist_zernike_degrees: Union[int, None]=None, +# dist_center_on: Union[bool, None]=None, +# dist_keep_center_as_bin: Union[bool, None]=None): +# """ +# collect volumentric measurements of organelle `a` intersect organelle `b` + +# Parameters +# ------------ +# a: np.ndarray +# 3D (ZYX) np.ndarray of one set of objects that will be assessed as part of a "contact" +# a_name: str +# the name or nickname of object a; this will be used for record keeping purposed in the output dataframe +# b: np.ndarray +# 3D (ZYX) np.ndarray of one set of objects that will be assessed as part of a "contact" +# b_name: str +# the name or nickname of object b; this will be used for record keeping purposed in the output dataframe +# mask: np.ndarray +# 3D (ZYX) binary mask of the area to measure contacts from +# include_dist:bool=False +# *optional* +# True = include the XY and Z distribution measurements of the contact sites within the masked region +# (utilizing the functions get_XY_distribution() and get_Z_distribution() from Infer-subc) +# False = do not include distirbution measurements +# dist_centering_obj: Union[np.ndarray, None]=None +# ONLY NEEDED IF include_dist=True; if None, the center of the mask will be used +# 3D (ZYX) np.ndarray containing the object to use for centering the XY distribution mask +# dist_num_bins: Union[int, None]=None +# ONLY NEEDED IF include_dist=True; if None, the default is 5 +# dist_zernike_degrees: Unions[int, None]=None, +# ONLY NEEDED IF include_dist=True; if None, the zernike share measurements will not be included in the distribution +# the number of zernike degrees to include for the zernike shape descriptors +# dist_center_on: Union[bool, None]=None +# ONLY NEEDED IF include_dist=True; if None, the default is False +# True = distribute the bins from the center of the centering object +# False = distribute the bins from the edge of the centering object +# dist_keep_center_as_bin: Union[bool, None]=None +# ONLY NEEDED IF include_dist=True; if None, the default is True +# True = include the centering object area when creating the bins +# False = do not include the centering object area when creating the bins + + +# Regionprops measurements: +# ------------------------ +# ['label', +# 'centroid', +# 'bbox', +# 'area', +# 'equivalent_diameter', +# 'extent', +# 'feret_diameter_max', +# 'euler_number', +# 'convex_area', +# 'solidity', +# 'axis_major_length', +# 'axis_minor_length'] + +# Additional measurements: +# ---------------------- +# ['surface_area'] + + +# Returns +# ------------- +# pandas dataframe of containing regionprops measurements (columns) for each overlap region between a and b (rows) + +# """ + +# ######################### +# ## CREATE OVERLAP REGIONS +# ######################### +# a = _assert_uint16_labels(a) +# b = _assert_uint16_labels(b) + +# a_int_b = np.logical_and(a > 0, b > 0) + +# labels = label(apply_mask(a_int_b, mask)).astype("int") + +# ########################################## +# ## CREATE LIST OF REGIONPROPS MEASUREMENTS +# ########################################## +# # start with LABEL +# properties = ["label"] + +# # add position +# properties = properties + ["centroid", "bbox"] + +# # add area +# properties = properties + ["area", "equivalent_diameter"] # "num_pixels", + +# # add shape measurements +# properties = properties + ["extent", "euler_number", "solidity", "axis_major_length", "slice"] # "feret_diameter_max", "axis_minor_length", + +# ################## +# ## RUN REGIONPROPS +# ################## +# props = regionprops_table(labels, intensity_image=None, properties=properties, extra_properties=None, spacing=scale) + +# ################################################################## +# ## RUN SURFACE AREA FUNCTION SEPARATELY AND APPEND THE PROPS_TABLE +# ################################################################## +# surface_area_tab = pd.DataFrame(surface_area_from_props(labels, props, scale)) + +# ###################################################### +# ## LIST WHICH ORGANELLES ARE INVOLVED IN THE CONTACTS +# ###################################################### +# label_a = [] +# index_ab = [] +# label_b = [] +# for index, lab in enumerate(props["label"]): +# # this seems less elegant than you might wish, given that regionprops returns a slice, +# # but we need to expand the slice out by one voxel in each direction, or surface area freaks out +# volume = labels[props["slice"][index]] +# la = a[props["slice"][index]] +# lb = b[props["slice"][index]] +# volume = volume == lab +# la = la[volume] +# lb = lb[volume] + +# all_as = np.unique(la[la>0]).tolist() +# all_bs = np.unique(lb[lb>0]).tolist() +# if len(all_as) != 1: +# print(f"we have an error. as-> {all_as}") +# if len(all_bs) != 1: +# print(f"we have an error. bs-> {all_bs}") + +# label_a.append(f"{all_as[0]}" ) +# label_b.append(f"{all_bs[0]}" ) +# index_ab.append(f"{all_as[0]}_{all_bs[0]}") + + +# ###################################################### +# ## CREATE COMBINED DATAFRAME OF THE QUANTIFICATION +# ###################################################### +# props_table = pd.DataFrame(props) +# props_table.drop(columns=['slice', 'label'], inplace=True) +# props_table.insert(0, 'label',value=index_ab) +# props_table.insert(0, "object", f"{a_name}X{b_name}") +# props_table.rename(columns={"area": "volume"}, inplace=True) + +# props_table.insert(11, "surface_area", surface_area_tab) +# props_table.insert(13, "SA_to_volume_ratio", props_table["surface_area"].div(props_table["volume"])) + +# if scale is not None: +# round_scale = (round(scale[0], 4), round(scale[1], 4), round(scale[2], 4)) +# props_table.insert(loc=2, column="scale", value=f"{round_scale}") +# else: +# props_table.insert(loc=2, column="scale", value=f"{tuple(np.ones(labels.ndim))}") + + +# ###################################################### +# ## optional: DISTRIBUTION OF CONTACTS MEASUREMENTS +# ###################################################### +# if include_dist is True: +# XY_contact_dist, XY_bins, XY_wedges = get_XY_distribution(mask=mask, +# obj=a_int_b, +# obj_name=f"{a_name}X{b_name}", +# centering_obj=dist_centering_obj, +# scale=scale, +# center_on=dist_center_on, +# keep_center_as_bin=dist_keep_center_as_bin, +# num_bins=dist_num_bins, +# zernike_degrees=dist_zernike_degrees) + +# Z_contact_dist = get_Z_distribution(mask=mask, +# obj=a_int_b, +# obj_name=f"{a_name}X{b_name}", +# center_obj=dist_centering_obj, +# scale=scale) + +# contact_dist_tab = pd.merge(XY_contact_dist, Z_contact_dist, on=["object", "scale"]) + +# return props_table, contact_dist_tab +# else: +# return props_table + # def get_aXb_stats_3D(a, b, mask, use_shell_a=False): # """ # collect volumentric stats of `a` intersect `b` diff --git a/infer_subc/utils/stats_helpers.py b/infer_subc/utils/stats_helpers.py index cca1500..e75da3d 100644 --- a/infer_subc/utils/stats_helpers.py +++ b/infer_subc/utils/stats_helpers.py @@ -4,6 +4,9 @@ import itertools import time +from skimage.measure import label +from skimage.segmentation import watershed + from infer_subc.core.img import apply_mask import pandas as pd @@ -14,14 +17,104 @@ get_XY_distribution, get_Z_distribution, _assert_uint16_labels, - get_region_morphology_3D) + get_region_morphology_3D, + get_empty_contact_dist_tabs) from infer_subc.utils.batch import list_image_files, find_segmentation_tiff_files from infer_subc.core.file_io import read_czi_image, read_tiff_image from infer_subc.constants import organelle_to_colname, NUC_CH, GOLGI_CH, PEROX_CH - +def make_dict(obj_names: list[str], #Intakes list of object names + obj_segs: list[np.ndarray]): #Intakes list of object segmentations + objs_labeled = {} #Initialize dictionary + for idx, name in enumerate(obj_names): #Loop across each organelle name + if name == 'ER': #Proceed only for ER + objs_labeled[name]=(obj_segs[idx]>0).astype(np.uint16) #Ensures ER is labeled only as one object & sets it as key for its object segmentation + else: #Proceed for other organelles + objs_labeled[name]=obj_segs[idx] #Set the organelle name as the key for the corresponding object segmentation + return objs_labeled #Return a dictionary of segmented objects with keys as the organelle name + +def inkeys(dic: dict[str], #Takes in dictionary to search through + s:str, #Takes in string being searched for + splitter:str="_") -> bool: #Takes in character strings are split by, defaults to "_" + a = sorted(s.split(splitter)) #Normalizes the way the string is written + for key in dic.keys(): #Iterates through each key in dictionary + if (a == sorted(key.split(splitter))): #Checks if key has same vals as string + return True #Returns true if any key is same as string + return False #Returns false if no keys are same as string + +def contacting(segs: dict[str], + iterated:dict[str], + splitter:str="_") -> dict: + conts = {} + for a in iterated: #Iterates through preexisting dictionary of contact sites + for b in segs: #Iterates through labeled organelles list (b) + if(np.any(((iterated[a]>0)*(segs[b]>0))>0) and not (a==b) and not #Proceeds if there is a contact between the lower order contact and the other organelle + ((b+splitter in a)or(splitter+b in a)or(splitter+b+splitter in a)) and #Proceeds if organelle is not already in lower order contact set + (not inkeys(conts,(a+splitter+b),splitter=splitter))): #Proceeds if contact between organelle and lower ordercontact set is not already made + conts[(a+splitter+b)]=label((iterated[a]*segs[b])>0) #Adds new labeled contact + return conts #Returns contacts + +def multi_contact(org_segs:dict[str:np.ndarray], + organelles:list[str], + splitter:str="_", + redundancy:bool=True) -> dict: + contacts=contacting(org_segs, org_segs, splitter=splitter) #Dictionary for ALL contacts, starts with 2nd Order #Returns with dictionary of all levels of + + iterated={} #Iterated Dictionary + contact={} #Contact Dictionary + if not redundancy: #Only initialize if looking for non-redundant contacts + HO_conts={} #Highest order contact dictionary + + for n in (range(len(organelles)-1)): + iterated.clear() #Clears iterated dictionary + contact.clear() #Clears contact dictionary + num=n+3 #Number of contacts in lower order number + + ########################## + # Finding nLO Contacts + ########################## + for key in contacts: #Iterates over every key in contacts + if (len(key.split(splitter)) == (num-1)): #Selects for last set of contacts + iterated[key]=contacts[key] #Adds each key from last set of contacts to iterated + + ########################### + # Making the n-Way Contact + ########################### + for c in iterated: #Iterates through preexisting dictionary of contact sites + for d in org_segs: #Iterates through labeled organelles list (b) + if(np.any((iterated[c]*org_segs[d])>0) and not + ((d+splitter in c)or(splitter+d in c)or(splitter+d+splitter in c)) and #Proceeds if organelle is not already in previous contact set + (not inkeys(contact,(c+splitter+d),splitter=splitter))): #Proceeds if contact between organelle and previous contact set is not already made + contact[(c+splitter+d)]=label((iterated[c]*org_segs[d])>0) #Adds new binary contact + + ################################################ + # Adding n-Way contacts to contacts Dictionary + ################################################ + for key in contact: #Iterates across the new contact sites + contacts[key]=(contact[key]) #Labels & assigns higher order contact to + + ################################################ + # Dictionary of Non-Redundant Contacts + ################################################ + if not redundancy: + while len(iterated) != 0: + key = list(iterated.keys())[0] + ara = iterated[key]>0 + HO_conts[key] = ara + for ki in contact.keys(): + if (set(ki.split(splitter)).issuperset(key.split(splitter))): + HO_conts[key] = HO_conts[key]*(np.invert(watershed(image=(np.invert(ara)), #Watershed with the map of the nLO image + markers=contact[ki], #Watershed with the markers of the nO's superstr + mask=ara, #Watershed unable to proceed beyond the nLO image + connectivity=np.ones((3, 3, 3), bool))>0)) #Watershed with 3D connectivity + del iterated[key] + if not redundancy: + return contacts, HO_conts + else: + return contacts + def make_all_metrics_tables(source_file: str, list_obj_names: List[str], list_obj_segs: List[np.ndarray], @@ -35,7 +128,8 @@ def make_all_metrics_tables(source_file: str, dist_keep_center_as_bin: bool=True, dist_zernike_degrees: Union[int, None]=None, scale: Union[tuple,None] = None, - include_contact_dist:bool=True): + include_contact_dist:bool=True, + splitter:str="_"): """ Measure the composition, morphology, distribution, and contacts of multiple organelles in a cell @@ -91,12 +185,58 @@ def make_all_metrics_tables(source_file: str, # segmentation image for all masking steps below mask = list_region_segs[list_region_names.index(mask)] + # containers to collect per organelle information + org_tabs = [] + dist_tabs = [] + XY_bins = [] + XY_wedges = [] + + centering = list_region_segs[list_region_names.index(dist_centering_obj)] + + ############################# + # Measure Organelle Contacts + ############################# + distance_tabs = [] + contacts_tabs = [] + all_pos =[] + labeled_dict = make_dict(list_obj_names, list_obj_segs) + if len(list_obj_names) >= 2: + for n in list(map(lambda x:x+2, (range(len(list_obj_names)-1)))): + all_pos += itertools.combinations(list_obj_names, n) + possib = [splitter.join(cont) for cont in all_pos] + if include_contact_dist: + for conts in possib: + print(conts) + cont_tab, dist_tab = get_contact_metrics_3D(orgs=conts, + organelle_segs=labeled_dict, + mask=mask, + splitter=splitter, + scale=scale, + include_dist=include_contact_dist, + dist_centering_obj=centering, + dist_num_bins=dist_num_bins, + dist_zernike_degrees=dist_zernike_degrees, + dist_center_on=dist_center_on, + dist_keep_center_as_bin=dist_keep_center_as_bin) + for tabs in dist_tab: + distance_tabs.append(tabs) + contacts_tabs.append(cont_tab) + else: + for conts in all_pos: + cont_tab = get_contact_metrics_3D(orgs=conts, + organelle_segs=labeled_dict, + mask=mask, + splitter=splitter, + scale=scale, + include_dist=include_contact_dist) + contacts_tabs.append(cont_tab) + ###################### # measure cell regions ###################### # create np.ndarray of intensity images raw_image = np.stack(list_intensity_img) - + # container for region data region_tabs = [] for r, r_name in enumerate(list_region_names): @@ -112,11 +252,6 @@ def make_all_metrics_tables(source_file: str, ############################################################## # loop through all organelles to collect measurements for each ############################################################## - # containers to collect per organelle information - org_tabs = [] - dist_tabs = [] - XY_bins = [] - XY_wedges = [] for j, target in enumerate(list_obj_names): # organelle intensity image @@ -130,7 +265,7 @@ def make_all_metrics_tables(source_file: str, org_obj = list_obj_segs[j] ########################################################## - # measure organelle morphology & number of objs contacting + # measure organelle morphology ########################################################## org_metrics = get_org_morphology_3D(segmentation_img=org_obj, seg_name=target, @@ -138,52 +273,11 @@ def make_all_metrics_tables(source_file: str, mask=mask, scale=scale) - ### org_metrics.insert(loc=0,column='cell',value=1) - # ^^^ saving this thought for later when someone might have more than one cell per image. - # Not sure how they analysis process would fit in our pipelines as they exist now. - # Maybe here, iterating though the index of the masks above all of this and using that index as the cell number? - - # TODO: find a better way to quantify the number and area of contacts per organelle - # I think it can be done during summarizing based on the label and object values in the contact sheet - # for i, nmi in enumerate(list_obj_names): - # if i != j: - # if target == 'ER': - # b = (list_obj_segs[i] > 0).astype(np.uint16) - # else: - # b = list_obj_segs[i] - - # ov = [] - # b_labs = [] - # labs = [] - # for idx, lab in enumerate(org_metrics["label"]): - # xyz = tuple(rp[idx].coords.T) - # cmp_org = b[xyz] - - # # total area (in voxels or real world units) where these two orgs overlap within the cell - # if scale != None: - # overlap = sum(cmp_org > 0)*scale[0]*scale[1]*scale[2] - # else: - # # total number of overlapping pixels - # overlap = sum(cmp_org > 0) - # # overlap? - - # # which b organelles are involved in that overlap - # labs_b = cmp_org[cmp_org > 0] - # b_js = np.unique(labs_b).tolist() - - # # if overlap > 0: - # labs.append(lab) # labs.append(lab) - # ov.append(overlap) - # b_labs.append(b_js) - # org_metrics[f"{nmi}_overlap"] = ov - # org_metrics[f"{nmi}_labels"] = b_labs - org_tabs.append(org_metrics) ################################ # measure organelle distribution ################################ - centering = list_region_segs[list_region_names.index(dist_centering_obj)] XY_org_distribution, XY_bin_masks, XY_wedge_masks = get_XY_distribution(mask=mask, centering_obj=centering, obj=org_obj, @@ -204,64 +298,14 @@ def make_all_metrics_tables(source_file: str, dist_tabs.append(org_distribution_metrics) XY_bins.append(XY_bin_masks) XY_wedges.append(XY_wedge_masks) - - ####################################### - # collect non-redundant contact metrics - ####################################### - # list the non-redundant organelle pairs - contact_combos = list(itertools.combinations(list_obj_names, 2)) - - # container to keep contact data in - contact_tabs = [] - - # loop through each pair and measure contacts - for pair in contact_combos: - # pair names - a_name = pair[0] - b_name = pair[1] - - # segmentations to measure - if a_name == 'ER': - # ensure ER is only one object - a = (list_obj_segs[list_obj_names.index(a_name)] > 0).astype(np.uint16) - else: - a = list_obj_segs[list_obj_names.index(a_name)] - - if b_name == 'ER': - # ensure ER is only one object - b = (list_obj_segs[list_obj_names.index(b_name)] > 0).astype(np.uint16) - else: - b = list_obj_segs[list_obj_names.index(b_name)] - - - if include_contact_dist == True: - contact_tab, contact_dist_tab = get_contact_metrics_3D(a, a_name, - b, b_name, - mask, - scale, - include_dist=include_contact_dist, - dist_centering_obj=centering, - dist_num_bins=dist_num_bins, - dist_zernike_degrees=dist_zernike_degrees, - dist_center_on=dist_center_on, - dist_keep_center_as_bin=dist_keep_center_as_bin) - dist_tabs.append(contact_dist_tab) - else: - contact_tab = get_contact_metrics_3D(a, a_name, - b, b_name, - mask, - scale, - include_dist=include_contact_dist) - contact_tabs.append(contact_tab) - - ########################################### # combine all tabs into one table per type: ########################################### final_org_tab = pd.concat(org_tabs, ignore_index=True) final_org_tab.insert(loc=0,column='image_name',value=source_file.stem) - final_contact_tab = pd.concat(contact_tabs, ignore_index=True) + final_contact_tab = pd.concat(contacts_tabs, ignore_index=True) + final_contact_tab['redundant'] = final_contact_tab['redundant'].astype(bool) final_contact_tab.insert(loc=0,column='image_name',value=source_file.stem) combined_dist_tab = pd.concat(dist_tabs, ignore_index=True) diff --git a/notebooks/02_organelle_contact_analysis.ipynb b/notebooks/02_organelle_contact_analysis.ipynb new file mode 100644 index 0000000..9db6e03 --- /dev/null +++ b/notebooks/02_organelle_contact_analysis.ipynb @@ -0,0 +1,4907 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# ORGANELLE CONTACT ANALYSIS\n", + "\n", + "-------\n", + "\n", + "## OBJECTIVE:\n", + "In this notebook, the logic for determining locations of contacts between 2 or more organelles is outlined. Additionally, the logic for quantifying organelle contact composition (how much of each contact is present) and morphology (contact site size and shape) is outlined as well. Here, we begin with a walkthrough of how the workflow completes 2-way contacts, then proceed to more complex n-way contacts. " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## SUMMARY OF WORKFLOW STEPS:\n", + " - Inputs\n", + " - Get and Load image and its segmentations\n", + " - Save segmentations to a dictionary\n", + " - Create overlap regions dictionary\n", + " - Run Analysis \n", + " - Regionprops\n", + " - Distribution" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## IMPORTS:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import warnings\n", + "import numpy as np\n", + "from typing import Any, List, Union\n", + "import pandas as pd\n", + "from IPython.display import display\n", + "from pathlib import Path\n", + "import os, sys\n", + "import itertools \n", + "\n", + "from skimage.measure import regionprops_table, label\n", + "from skimage.segmentation import watershed\n", + "\n", + "from infer_subc.core.file_io import read_czi_image, read_tiff_image\n", + "from infer_subc.core.img import apply_mask\n", + "from infer_subc.utils.batch import list_image_files, find_segmentation_tiff_files\n", + "from infer_subc.utils.stats import surface_area_from_props, get_XY_distribution, get_Z_distribution, _assert_uint16_labels\n", + "from infer_subc.utils.stats_helpers import inkeys\n", + "\n", + "from infer_subc.constants import (TEST_IMG_N,\n", + " NUC_CH ,\n", + " LYSO_CH ,\n", + " MITO_CH ,\n", + " GOLGI_CH ,\n", + " PEROX_CH ,\n", + " ER_CH ,\n", + " LD_CH ,\n", + " RESIDUAL_CH )\n", + "\n", + "#For Convexhull Errors\n", + "warnings.simplefilter(\"ignore\", UserWarning)\n", + "warnings.simplefilter(\"ignore\", RuntimeWarning)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## INPUTS:\n", + "Load image and segmentations and save segmentations to a dictionary. Using these segmentations, overlaps between 2 or more segmentations are performed and added to their own dictionary." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### User Inputs" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### Image Path\n", + "Here, the user should edit any of the values to correctly access the folder containing the __RAW__ image files. The naming of this file will then be used later to collect the corresponding segmentation files." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "test_img_n = 0\n", + "\n", + "data_root_path = Path(os.path.expanduser(\"~\")) / \"Documents/Python Scripts/Infer-subc-2D\"\n", + "\n", + "in_data_path = data_root_path / \"raw/shannon\"\n", + "seg_path = data_root_path/\"out\"\n", + "seg_suffix = \"-\"\n", + "im_type = \".tiff\"\n", + "\n", + "img_file_list = list_image_files(in_data_path,im_type)\n", + "test_img_name = img_file_list[test_img_n]\n", + "\n", + "out_data_path = data_root_path / \"out\"\n", + "if not Path.exists(out_data_path):\n", + " Path.mkdir(out_data_path)\n", + " print(f\"making {out_data_path}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "img_data,meta_dict = read_czi_image(test_img_name)\n", + "\n", + "channel_names = meta_dict['name']\n", + "img = meta_dict['metadata']['aicsimage']\n", + "scale = meta_dict['scale']\n", + "channel_axis = meta_dict['channel_axis']" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##### Function Inputs\n", + "These are inputs that will be entered into the main function by the user. These should be changed to properly represent the user's image." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "org_names = ['LD', 'ER', 'golgi', 'lyso', 'mito', 'perox']\n", + "masks_file_name= ['nuc', 'cell']\n", + "mask = 'cell'\n", + "splitter = \"_\"\n", + "include_contact_dist = True\n", + "dist_centering_obj = 'nuc'\n", + "dist_center_on = False\n", + "dist_keep_center_as_bin = True\n", + "dist_num_bins = 5\n", + "dist_zernike_degrees=None" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Collecting All Organelle Segmentations and Region/Mask Segmentations\n", + "These inputs are NOT meant to be changed. These will be used by the program to collect the segmentations based off of the inputs from above and used furtherdown in the pipeline." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "org_segs = [read_tiff_image(find_segmentation_tiff_files(test_img_name, (org_names + masks_file_name), seg_path, seg_suffix)[org]) for org in org_names]\n", + "region_segs=[read_tiff_image(find_segmentation_tiff_files(test_img_name, (org_names + masks_file_name), seg_path, seg_suffix)[masks_file_name[0]]), read_tiff_image(find_segmentation_tiff_files(test_img_name, (org_names + masks_file_name), seg_path, seg_suffix)[masks_file_name[1]])]\n", + "mask = region_segs[masks_file_name.index(mask)]\n", + "center_obj = region_segs[masks_file_name.index(dist_centering_obj)]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Make Dictionaries\n", + "These inputs are NOT meant to be changed and are not user facing.\n", + "\n", + "Here we will convert the input list of __organelle segmentations__ and the input list of __organelle names__ into a ***labeled*** dictionary. \n", + "\n", + "The ***labeled*** format treats the locations of the organelles in the image as positive integers with each different organelle within the organelle type having a different integer value assigned to it; meanwhile, the space without the organelle is assigned 0s. " + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "organelle_segs = {} #Initialize dictionary\n", + "for idx, name in enumerate(org_names): #Loop across each organelle name\n", + " if name == 'ER': #Proceed only for ER\n", + " organelle_segs[name]=(org_segs[idx]>0).astype(np.uint16) #Ensures ER is labeled only as one object & sets it as key for its object segmentation\n", + " else: #Proceed for other organelles\n", + " organelle_segs[name]=org_segs[idx] #Set the organelle name as the key for the corresponding object segmentation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2-Way Contact Workflow\n", + "First, we will run through how the workflow determines 2-Way contacts. In the final take of this function, all contacts, including n-way contacts will be analyzed.\n", + "\n", + "### Inputs\n", + "\n", + "#### Choose a 2-Way Contact\n", + "Due to this function being designed around only functioning for a single contact site given by a string, __users should input__ the desired 2-Way contact to analyze here. \n", + "\n", + "The format for the contact site string is as follows:\n", + "
\n", + "`organelle 1` + `splitter` + `organelle 2`\n", + "\n", + "For example, if the desired contact site is between the _endoplasmic reticulum_ and _peroxisomes_, and in the above block of code the _endoplasmic reticulum_ is set equal to _`ER`_, the _splitter_ is listed as _`_`_, and _peroxisomes_ are set equal to _`perox`_ in the above block of code, the contact site string would be as follows:\n", + "
\n", + "`ER_perox`\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "orgs = \"ER_perox\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Make 2-Way Contacts \n", + "Here we are creating a contact site between the selected organelles. The method for creating pairwise contacts like this will be expanded upon to make nth order contacts. These inputs are NOT meant to be changed and are not user facing." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "site = organelle_segs[orgs.split(splitter)[0]] * organelle_segs[orgs.split(splitter)[1]]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### RUN ANALYSIS:\n", + "Here the data from the above inputs are analyzed to find everything we can about the contacts from regionprops measurements to the original organelles and their numbers' involved in the contacts to even the distribution of the contacts." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Find Contacts Involved in Higher Order (3-Way) Contacts\n", + "Here, higher order contacts of the 2-Way contact sites are found. In the case of 2-way contacts, the ones looked at are 3-Way contacts. These are overlapping regions between the 2-way contact site and a organelle not involved in the original contact. This data is then used to determine which 2-Way contacts are also involved in 3-Way or even higher order contacts. \n", + "\n", + "To find these higher order contacts, we iterate across each of the organelles we have segmentations for. Then, for each organelle we have segmentations for, if they are not present in the original 2-Way contact, we find the contacts between the 2-Way contact and the organelle and use the image to watershed onto the 2-Way contact image. Using the watershed, we take the area that has been filled and remove it from the Higher Order Contact version of the 2-Way contact's site variable." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "HOc = site.copy()\n", + "for org, val in organelle_segs.items():\n", + " if (org not in orgs.split(splitter)) and np.any(site*val):\n", + " HOc = HOc*(np.invert(watershed(image=(np.invert(site)),\n", + " markers=(site*val),\n", + " mask=site,\n", + " connectivity=np.ones((3, 3, 3), bool))>0))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Isolate Images To Within the Cell\n", + "Here, we ensure that we are only taking measurements from within the cellmask. This means applying the mask to both the 2-Way contact image and the version of the 2-Way contact image that only contains non-redundant contact sites." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "labels = label(apply_mask(site, mask)).astype(\"int\") #Isolate to only contact sites found within the cell of interest\n", + "para_labels = apply_mask((HOc>0), mask).astype(\"int\") * labels #copy labels found in labels to para_labels" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Create List of Regionprops Measurements And Run Regionprops\n", + "Here, a table is created using the regionprops measurements for the contact site." + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "##########################################\n", + "## CREATE LIST OF REGIONPROPS MEASUREMENTS\n", + "##########################################\n", + "# start with LABEL\n", + "properties = [\"label\"]\n", + "\n", + "# add position\n", + "properties = properties + [\"centroid\", \"bbox\"]\n", + "\n", + "# add area\n", + "properties = properties + [\"area\", \"equivalent_diameter\"] # \"num_pixels\", \n", + "\n", + "# add shape measurements\n", + "properties = properties + [\"extent\", \"euler_number\", \"solidity\", \"axis_major_length\", \"slice\"] # \"feret_diameter_max\", \"axis_minor_length\", \n", + "\n", + "##################\n", + "## RUN REGIONPROPS\n", + "##################\n", + "props = regionprops_table(labels, intensity_image=None, properties=properties, extra_properties=None, spacing=scale)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Add Surface Area Columns to Data Table\n", + "This function adds the surface area of the contact. Viewing the two involved organelles as circles in a venn-diagram and the contact as the overlapping area, the surface area is the part of each circle's surface that is inside of the other circle." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "surface_area_tab = pd.DataFrame(surface_area_from_props(labels, props, scale))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Determine Organelles Involved in Contact, Organelle's Labels, and Redundancy\n", + "This section of code enables the determination of which organelle label of each organelle involved in the contact is present in the contact. For example, if peroxisome # 6 was involved in a contact with the ER, the contact would be listed as \"ER_perox\" and the label for the contact would be listed as 1_6. \n", + "\n", + "Additionally, this section of code also determines whether or not the contact is involved in a higher order contact, and lists it as redundant if it is. This means, that any contact that is of the highest order is listed as non-redundant. This does not remove redundant contacts from analysis--it only provides additional context to the data." + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "cont_inv = [] \n", + "involved = orgs.split(splitter) \n", + "indexes = dict.fromkeys(involved, []) \n", + "indexes[orgs] = [] \n", + "redundancy = []\n", + "label_a = []\n", + "index_ab = []\n", + "label_b = []\n", + "a = _assert_uint16_labels(organelle_segs[orgs.split(splitter)[0]])\n", + "b = _assert_uint16_labels(organelle_segs[orgs.split(splitter)[1]])\n", + "for index, lab in enumerate(props[\"label\"]):\n", + " present = para_labels[props[\"slice\"][index]] #examines contact site to find if it is present in a higher order contact or not\n", + " present = present==lab\n", + " redundant = not np.any(present)\n", + " redundancy.append(redundant)\n", + " volume = labels[props[\"slice\"][index]]\n", + " la = a[props[\"slice\"][index]]\n", + " lb = b[props[\"slice\"][index]]\n", + " volume = volume == lab\n", + " la = la[volume]\n", + " lb = lb[volume]\n", + "\n", + " all_as = np.unique(la[la>0]).tolist()\n", + " all_bs = np.unique(lb[lb>0]).tolist()\n", + " if len(all_as) != 1:\n", + " print(f\"we have an error. as-> {all_as}\")\n", + " if len(all_bs) != 1:\n", + " print(f\"we have an error. bs-> {all_bs}\")\n", + "\n", + " label_a.append(f\"{all_as[0]}\" )\n", + " label_b.append(f\"{all_bs[0]}\" )\n", + " index_ab.append(f\"{all_as[0]}{splitter}{all_bs[0]}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Combine the Datatables\n", + "Here, all of the individual datatables created to examine the contacts data present are combined into one data table for export." + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [], + "source": [ + "props_table = pd.DataFrame(props)\n", + "props_table.drop(columns=['slice', 'label'], inplace=True)\n", + "props_table.insert(0, 'label',value=index_ab)\n", + "props_table.insert(0, \"object\", orgs)\n", + "props_table.rename(columns={\"area\": \"volume\"}, inplace=True)\n", + "\n", + "props_table.insert(11, \"surface_area\", surface_area_tab)\n", + "props_table.insert(13, \"SA_to_volume_ratio\", props_table[\"surface_area\"].div(props_table[\"volume\"]))\n", + "\n", + "if scale is not None:\n", + " round_scale = (round(scale[0], 4), round(scale[1], 4), round(scale[2], 4))\n", + " props_table.insert(loc=2, column=\"scale\", value=f\"{round_scale}\")\n", + "else: \n", + " props_table.insert(loc=2, column=\"scale\", value=f\"{tuple(np.ones(labels.ndim))}\") \n", + "props_table[\"redundant\"] = list(map(bool, redundancy))\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here, we can view the results of the analysis performed for the contacts thus far." + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
objectlabelscalecentroid-0centroid-1centroid-2bbox-0bbox-1bbox-2bbox-3...bbox-5surface_areavolumeSA_to_volume_ratioequivalent_diameterextenteuler_numbersolidityaxis_major_lengthredundant
0ER_perox1_2(0.4106, 0.0799, 0.0799)1.8792579.86423051.75953341216456...6512.0088980.06823229.4420130.5069870.36111110.6842110.923434True
1ER_perox1_3(0.4106, 0.0799, 0.0799)1.64237611.45087053.46609441426675...6710.9994410.03411629.2952370.4023960.8125001inf0.432237True
2ER_perox1_1(0.4106, 0.0799, 0.0799)1.64237623.61101416.51349742932055...2091.0893120.02361946.1203810.3559760.4500001inf0.508868True
3ER_perox1_4(0.4106, 0.0799, 0.0799)2.01564333.85392187.371169442010916...10972.1288170.05773536.8721650.4795280.22916710.4782610.741311True
4ER_perox1_5(0.4106, 0.0799, 0.0799)1.75083539.50286939.11821844914866...4942.4545420.13908917.6472740.6428330.47321410.8030300.836116True
..................................................................
667ER_perox1_420(0.4106, 0.0799, 0.0799)11.08603893.45804381.146205271169101528...10160.1874420.00262471.4250500.1711351.0000001inf0.000000True
668ER_perox1_415(0.4106, 0.0799, 0.0799)11.49663284.10424477.30874928105296729...9680.1874420.00262471.4250500.1711351.0000001inf0.000000True
669ER_perox1_419(0.4106, 0.0799, 0.0799)11.49663290.30013784.783794281129106029...10620.3748850.00524971.4250500.2156170.5000001inf0.252815True
670ER_perox1_419(0.4106, 0.0799, 0.0799)11.49663290.50000484.823767281132106129...10620.1874420.00262471.4250500.1711351.0000001inf0.000000True
671ER_perox1_421(0.4106, 0.0799, 0.0799)11.90722688.87441577.53526529111196830...9720.7553180.01574647.9691050.3109730.5000001inf0.441430True
\n", + "

672 rows × 21 columns

\n", + "
" + ], + "text/plain": [ + " object label scale centroid-0 centroid-1 \\\n", + "0 ER_perox 1_2 (0.4106, 0.0799, 0.0799) 1.879257 9.864230 \n", + "1 ER_perox 1_3 (0.4106, 0.0799, 0.0799) 1.642376 11.450870 \n", + "2 ER_perox 1_1 (0.4106, 0.0799, 0.0799) 1.642376 23.611014 \n", + "3 ER_perox 1_4 (0.4106, 0.0799, 0.0799) 2.015643 33.853921 \n", + "4 ER_perox 1_5 (0.4106, 0.0799, 0.0799) 1.750835 39.502869 \n", + ".. ... ... ... ... ... \n", + "667 ER_perox 1_420 (0.4106, 0.0799, 0.0799) 11.086038 93.458043 \n", + "668 ER_perox 1_415 (0.4106, 0.0799, 0.0799) 11.496632 84.104244 \n", + "669 ER_perox 1_419 (0.4106, 0.0799, 0.0799) 11.496632 90.300137 \n", + "670 ER_perox 1_419 (0.4106, 0.0799, 0.0799) 11.496632 90.500004 \n", + "671 ER_perox 1_421 (0.4106, 0.0799, 0.0799) 11.907226 88.874415 \n", + "\n", + " centroid-2 bbox-0 bbox-1 bbox-2 bbox-3 ... bbox-5 surface_area \\\n", + "0 51.759533 4 121 645 6 ... 651 2.008898 \n", + "1 53.466094 4 142 667 5 ... 671 0.999441 \n", + "2 16.513497 4 293 205 5 ... 209 1.089312 \n", + "3 87.371169 4 420 1091 6 ... 1097 2.128817 \n", + "4 39.118218 4 491 486 6 ... 494 2.454542 \n", + ".. ... ... ... ... ... ... ... ... \n", + "667 81.146205 27 1169 1015 28 ... 1016 0.187442 \n", + "668 77.308749 28 1052 967 29 ... 968 0.187442 \n", + "669 84.783794 28 1129 1060 29 ... 1062 0.374885 \n", + "670 84.823767 28 1132 1061 29 ... 1062 0.187442 \n", + "671 77.535265 29 1111 968 30 ... 972 0.755318 \n", + "\n", + " volume SA_to_volume_ratio equivalent_diameter extent \\\n", + "0 0.068232 29.442013 0.506987 0.361111 \n", + "1 0.034116 29.295237 0.402396 0.812500 \n", + "2 0.023619 46.120381 0.355976 0.450000 \n", + "3 0.057735 36.872165 0.479528 0.229167 \n", + "4 0.139089 17.647274 0.642833 0.473214 \n", + ".. ... ... ... ... \n", + "667 0.002624 71.425050 0.171135 1.000000 \n", + "668 0.002624 71.425050 0.171135 1.000000 \n", + "669 0.005249 71.425050 0.215617 0.500000 \n", + "670 0.002624 71.425050 0.171135 1.000000 \n", + "671 0.015746 47.969105 0.310973 0.500000 \n", + "\n", + " euler_number solidity axis_major_length redundant \n", + "0 1 0.684211 0.923434 True \n", + "1 1 inf 0.432237 True \n", + "2 1 inf 0.508868 True \n", + "3 1 0.478261 0.741311 True \n", + "4 1 0.803030 0.836116 True \n", + ".. ... ... ... ... \n", + "667 1 inf 0.000000 True \n", + "668 1 inf 0.000000 True \n", + "669 1 inf 0.252815 True \n", + "670 1 inf 0.000000 True \n", + "671 1 inf 0.441430 True \n", + "\n", + "[672 rows x 21 columns]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "display(props_table)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Calculate Distribution of Measurements\n", + "This section of code performs analysis on the distribution measurements of the contacts. It is entirely optional and whether it is performed or not is determined in the user inputs earlier on in this notebook. \n", + "\n", + "This section of code will additional combine the distribution measurements into a separate table for export." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WTF!! how did we have missing labels?\n" + ] + } + ], + "source": [ + "dist_tabs = []\n", + "if include_contact_dist:\n", + " XY_contact_dist, XY_bins, XY_wedges = get_XY_distribution(mask=mask, \n", + " obj=site,\n", + " obj_name=orgs,\n", + " centering_obj=center_obj,\n", + " scale=scale,\n", + " center_on=dist_center_on,\n", + " keep_center_as_bin=dist_keep_center_as_bin,\n", + " num_bins=dist_num_bins,\n", + " zernike_degrees=dist_zernike_degrees)\n", + " \n", + " Z_contact_dist = get_Z_distribution(mask=mask,\n", + " obj=site,\n", + " obj_name=orgs,\n", + " center_obj=center_obj,\n", + " scale=scale)\n", + " contact_dist_tab = pd.merge(XY_contact_dist, Z_contact_dist, on=[\"object\", \"scale\"])\n", + " dist_tabs.append(contact_dist_tab)\n", + "indexes.clear()\n", + "combined_dist_tab = pd.concat(dist_tabs, ignore_index=True)\n", + "combined_dist_tab.insert(loc=0,column='image_name',value=test_img_name.stem)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here, we can view the distribution metrics created by the above block of code. \n", + "\n", + ">NOTE: If include_contact_dist is False, the following code will produce an error as there will be no data to display." + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
image_nameobjectscaleXY_n_binsXY_binsXY_mask_vox_cnt_perbinXY_obj_vox_cnt_perbinXY_center_vox_cnt_perbinXY_n_pix_perbinXY_portion_pix_perbin...XY_area_wedges_perbinZ_n_slicesZ_slicesZ_mask_vox_cntZ_obj_vox_cntZ_center_vox_cntZ_heightZ_mask_volumeZ_obj_volumeZ_center_volume
020230727_C2-121_conditioned_well 2_cell 1_50uM...ER_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][2289, 1678, 2253, 4150, 6018][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 262, 1810, 3662, 2945, 1494, 1013...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.6875720800544991, 4.750...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
\n", + "

1 rows × 46 columns

\n", + "
" + ], + "text/plain": [ + " image_name object \\\n", + "0 20230727_C2-121_conditioned_well 2_cell 1_50uM... ER_perox \n", + "\n", + " scale XY_n_bins XY_bins \\\n", + "0 (0.4106, 0.0799, 0.0799) 5 [1, 2, 3, 4, 5] \n", + "\n", + " XY_mask_vox_cnt_perbin XY_obj_vox_cnt_perbin \\\n", + "0 [391573, 150534, 182433, 203736, 1795494] [2289, 1678, 2253, 4150, 6018] \n", + "\n", + " XY_center_vox_cnt_perbin XY_n_pix_perbin \\\n", + "0 [159863, 0, 0, 0, 0] [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "\n", + " XY_portion_pix_perbin ... \\\n", + "0 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "\n", + " XY_area_wedges_perbin Z_n_slices \\\n", + "0 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "\n", + " Z_slices \\\n", + "0 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "\n", + " Z_mask_vox_cnt \\\n", + "0 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "\n", + " Z_obj_vox_cnt \\\n", + "0 [0, 0, 0, 0, 262, 1810, 3662, 2945, 1494, 1013... \n", + "\n", + " Z_center_vox_cnt Z_height \\\n", + "0 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "\n", + " Z_mask_volume \\\n", + "0 [0.023618888246146916, 0.36478060735715795, 94... \n", + "\n", + " Z_obj_volume \\\n", + "0 [0.0, 0.0, 0.0, 0.0, 0.6875720800544991, 4.750... \n", + "\n", + " Z_center_volume \n", + "0 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "\n", + "[1 rows x 46 columns]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "display(combined_dist_tab)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## N-Way Contact Workflow\n", + "First, we will run through how the workflow determines 2-Way contacts. In the final take of this function, all contacts, including n-way contacts will be analyzed.\n", + "\n", + "### Inputs\n", + "\n", + "#### Choose an N-Way Contact\n", + "Due to this function being designed around only functioning for a single contact site given by a string, __users should input__ their desired n-Way contact to analyze here. \n", + "\n", + "The format for the contact site string is as follows:\n", + "
\n", + "`organelle 1` + `splitter` + `organelle 2` + `splitter` + `organelle 3` + ...\n", + "\n", + "For example, if the desired contact site is between the _endoplasmic reticulum_, _peroxisomes_, and _mitochondria_ and in the earlier input block of code the _endoplasmic reticulum_ is set equal to _`ER`_, the _splitter_ is listed as _`_`_, _peroxisomes_ are set equal to _`perox`_, and _mitochondria_ are set equal to _`mito`_, the contact site string would be as follows:\n", + "
\n", + "`ER_perox_mito`\n" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "orgs = \"ER_perox_mito\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Make N-Way Contacts \n", + "Here we are creating a contact site between the selected organelles. The method for creating pairwise contacts from earlier is expanded upon here. Previously, the method directly selected the organelles involved; however, when analyzing a variable number of contacts it is not possible to directly call upon what you want so instead we use a for loop. These inputs are NOT meant to be changed and are not user facing." + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [], + "source": [ + "site = np.ones_like(organelle_segs[orgs.split(splitter)[0]])\n", + "for org in orgs.split(splitter):\n", + " site = site*(organelle_segs[org]>0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### RUN ANALYSIS:\n", + "Here the data from the above inputs are analyzed to find everything we can about the contacts from regionprops measurements to the original organelles and their numbers' involved in the contacts to even the distribution of the contacts." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Find Contacts Involved in Higher Order (n+1-Way) Contacts\n", + "Here, higher order contacts of the n-Way contact sites are found. These are overlapping regions between the n-Way contact site and a organelle not involved in the original contact. This data is then used to determine which n-Way contacts are also involved in higher order contacts. \n", + "\n", + "To find these higher order contacts, we iterate across each of the organelles we have segmentations for. Then, for each organelle we have segmentations for, if they are not present in the original n-Way contact, we find the contacts between the n-Way contact and the organelle and use the image to watershed onto the n-Way contact image. Using the watershed, we take the area that has been filled and remove it from the Higher Order Contact version of the n-Way contact's site variable.\n", + "\n", + "Functionally, nothing has changed between the 2-Way and n-Way contacts variations of this code." + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [], + "source": [ + "HOc = site.copy()\n", + "for org, val in organelle_segs.items():\n", + " if (org not in orgs.split(splitter)) and np.any(site*val):\n", + " HOc = HOc*(np.invert(watershed(image=(np.invert(site)),\n", + " markers=(site*val),\n", + " mask=site,\n", + " connectivity=np.ones((3, 3, 3), bool))>0))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Isolate Images To Within the Cell\n", + "Here, we ensure that we are only taking measurements from within the cellmask. This means applying the mask to both the n-Way contact image and the version of the n-Way contact image that only contains non-redundant contact sites.\n", + "\n", + "Functionally, nothing has changed between the 2-Way and n-Way contacts variations of this code." + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [], + "source": [ + "labels = label(apply_mask(site, mask)).astype(\"int\") #Isolate to only contact sites found within the cell of interest\n", + "para_labels = apply_mask((HOc>0), mask).astype(\"int\") * labels #copy labels found in labels to para_labels" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Create List of Regionprops Measurements And Run Regionprops\n", + "Here, a table is created using the regionprops measurements for the contact site.\n", + "\n", + "Functionally, nothing has changed between the 2-Way and n-Way contacts variations of this code." + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "##########################################\n", + "## CREATE LIST OF REGIONPROPS MEASUREMENTS\n", + "##########################################\n", + "# start with LABEL\n", + "properties = [\"label\"]\n", + "\n", + "# add position\n", + "properties = properties + [\"centroid\", \"bbox\"]\n", + "\n", + "# add area\n", + "properties = properties + [\"area\", \"equivalent_diameter\"] # \"num_pixels\", \n", + "\n", + "# add shape measurements\n", + "properties = properties + [\"extent\", \"euler_number\", \"solidity\", \"axis_major_length\", \"slice\"] # \"feret_diameter_max\", \"axis_minor_length\", \n", + "\n", + "##################\n", + "## RUN REGIONPROPS\n", + "##################\n", + "props = regionprops_table(labels, intensity_image=None, properties=properties, extra_properties=None, spacing=scale)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Add Surface Area Columns to Data Table\n", + "This function adds the surface area of the contact. Viewing the involved organelles as circles in a venn-diagram and the contact as the overlapping area, the surface area is the part of each circle's surface that is inside of the other circle.\n", + "\n", + "Functionally, nothing has changed between the 2-Way and n-Way contacts variations of this code." + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "surface_area_tab = pd.DataFrame(surface_area_from_props(labels, props, scale))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Determine Organelles Involved in Contact and Organelle's Labels\n", + "This section of code enables the determination of which organelle label of each organelle involved in the contact is present in the contact. For example, if peroxisome # 6 was involved in a contact with the ER and mitochondria #43, the contact would be listed as \"ER_perox_mito\" and the label for the contact would be listed as 1_6_43. \n", + "\n", + "This section of code also determines whether or not the contact is involved in a higher order contact, and lists it as redundant if it is. This means, that any contact that is of the highest order is listed as non-redundant. This does not remove redundant contacts from analysis--it only provides additional context to the data.\n", + "\n", + "Furthermore, this section of code has been overhauled here to enable iterating across n organelles rather than just 2-Way contacts. This enables for 3, 4, 5, 6, 7, and so on contacts between organelles to be measured." + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "cont_inv = [] #initializes a variable to be used for creating the values for the contacts in the dictionary\n", + " # This variable is a list of the labels of each organelle involved in one contact site between those organelles\n", + "involved = orgs.split(splitter) #creates list of all involved organelles in the contact\n", + "indexes = dict.fromkeys(involved, []) #A dictionary of indexes of site involved in the contact\n", + "indexes[orgs] = [] # str = \"contact\" or \"organelle\", may have multiple different organelles\n", + " # list = contact or organelle number in image corresponding to the same contact in the other keys\n", + " # a 2-way contact will have 3 keys, a 3-way contact will have 4 keys, etc\n", + "redundancy = []\n", + "for index, l in enumerate(props[\"label\"]):\n", + " cont_inv.clear() #clears cont_inv variable of any labels from past contact site for new contact site\n", + " present = para_labels[props[\"slice\"][index]] #examines contact site to find if it is present in a higher order contact or not\n", + " present = present==l\n", + " redundant = not np.any(present)\n", + " redundancy.append(redundant)\n", + " for org in involved: #iterates across list of involved organelles\n", + " volume = labels[props[\"slice\"][index]]\n", + " lorg = organelle_segs[org][props[\"slice\"][index]]\n", + " volume = volume==l\n", + " lorg = lorg[volume]\n", + " all_inv = np.unique(lorg[lorg>0]).tolist()\n", + " if len(all_inv) != 1: #ensures only one label is involved in the contact site\n", + " print(f\"we have an error. as-> {all_inv}\") #informs the console of any errors and the reasoing for it\n", + " indexes[org].append(f\"{all_inv[0]}\") #adds the label of the organelle involved in the contact to the organelle's key's list\n", + " cont_inv.append(f\"{all_inv[0]}\") #adds the label of the organelle involved in the contact to the list of involved organelle labels\n", + " indexes[orgs].append(\"_\".join(cont_inv)) #adds the combination of all the organelle's labels involved in the contact to the contact key's list" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Combine the Datatables\n", + "Here, all of the individual datatables created to examine the contacts data present are combined into one data table for export." + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "props_table = pd.DataFrame(props)\n", + "props_table.drop(columns=['slice', 'label'], inplace=True)\n", + "props_table.insert(0, 'label',value=indexes[orgs])\n", + "props_table.insert(0, \"object\", orgs)\n", + "props_table.rename(columns={\"area\": \"volume\"}, inplace=True)\n", + "props_table.insert(11, \"surface_area\", surface_area_tab)\n", + "props_table.insert(13, \"SA_to_volume_ratio\", \n", + "props_table[\"surface_area\"].div(props_table[\"volume\"]))\n", + "if scale is not None:\n", + " round_scale = (round(scale[0], 4), round(scale[1], 4), round(scale[2], 4))\n", + " props_table.insert(loc=2, column=\"scale\", value=f\"{round_scale}\")\n", + "else: \n", + " props_table.insert(loc=2, column=\"scale\", value=f\"{tuple(np.ones(labels.ndim))}\") \n", + "props_table[\"redundant\"] = list(map(bool, redundancy))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here, we can view the results of the analysis performed for the contacts thus far." + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
objectlabelscalecentroid-0centroid-1centroid-2bbox-0bbox-1bbox-2bbox-3...bbox-5surface_areavolumeSA_to_volume_ratioequivalent_diameterextenteuler_numbersolidityaxis_major_lengthredundant
0ER_perox_mito1_1_2(0.4106, 0.0799, 0.0799)1.64237623.47776916.49573142932065...2080.4213240.00787353.5152760.2468200.751inf0.206422False
1ER_perox_mito1_5_21(0.4106, 0.0799, 0.0799)1.64237639.29395139.29395144914915...4930.3748850.00524971.4250500.2156170.501inf0.252815False
2ER_perox_mito1_5_21(0.4106, 0.0799, 0.0799)1.64237639.69368638.97416344964875...4890.3748850.00524971.4250500.2156170.501inf0.252815False
3ER_perox_mito1_6_24(0.4106, 0.0799, 0.0799)1.64237640.45318239.33392445064925...4930.1874420.00262471.4250500.1711351.001inf0.000000False
4ER_perox_mito1_8_29(0.4106, 0.0799, 0.0799)1.91610545.86292962.35866045737806...7810.4737190.00787360.1703400.2468200.751inf0.869819False
..................................................................
255ER_perox_mito1_228_742(0.4106, 0.0799, 0.0799)8.21188089.94037574.35071020112593021...9310.1874420.00262471.4250500.1711351.001inf0.000000False
256ER_perox_mito1_366_747(0.4106, 0.0799, 0.0799)8.62247482.26546373.87102821102992422...9250.1874420.00262471.4250500.1711351.001inf0.000000False
257ER_perox_mito1_392_619(0.4106, 0.0799, 0.0799)8.62247488.86109175.74978321111194722...9490.3748850.00524971.4250500.2156170.501inf0.252815False
258ER_perox_mito1_398_735(0.4106, 0.0799, 0.0799)9.03306882.82509274.11086922103692723...9280.1874420.00262471.4250500.1711351.001inf0.000000False
259ER_perox_mito1_391_754(0.4106, 0.0799, 0.0799)9.03306888.66122373.67116022110992123...9230.3212110.00524961.1989040.2156171.001inf0.178767False
\n", + "

260 rows × 21 columns

\n", + "
" + ], + "text/plain": [ + " object label scale centroid-0 \\\n", + "0 ER_perox_mito 1_1_2 (0.4106, 0.0799, 0.0799) 1.642376 \n", + "1 ER_perox_mito 1_5_21 (0.4106, 0.0799, 0.0799) 1.642376 \n", + "2 ER_perox_mito 1_5_21 (0.4106, 0.0799, 0.0799) 1.642376 \n", + "3 ER_perox_mito 1_6_24 (0.4106, 0.0799, 0.0799) 1.642376 \n", + "4 ER_perox_mito 1_8_29 (0.4106, 0.0799, 0.0799) 1.916105 \n", + ".. ... ... ... ... \n", + "255 ER_perox_mito 1_228_742 (0.4106, 0.0799, 0.0799) 8.211880 \n", + "256 ER_perox_mito 1_366_747 (0.4106, 0.0799, 0.0799) 8.622474 \n", + "257 ER_perox_mito 1_392_619 (0.4106, 0.0799, 0.0799) 8.622474 \n", + "258 ER_perox_mito 1_398_735 (0.4106, 0.0799, 0.0799) 9.033068 \n", + "259 ER_perox_mito 1_391_754 (0.4106, 0.0799, 0.0799) 9.033068 \n", + "\n", + " centroid-1 centroid-2 bbox-0 bbox-1 bbox-2 bbox-3 ... bbox-5 \\\n", + "0 23.477769 16.495731 4 293 206 5 ... 208 \n", + "1 39.293951 39.293951 4 491 491 5 ... 493 \n", + "2 39.693686 38.974163 4 496 487 5 ... 489 \n", + "3 40.453182 39.333924 4 506 492 5 ... 493 \n", + "4 45.862929 62.358660 4 573 780 6 ... 781 \n", + ".. ... ... ... ... ... ... ... ... \n", + "255 89.940375 74.350710 20 1125 930 21 ... 931 \n", + "256 82.265463 73.871028 21 1029 924 22 ... 925 \n", + "257 88.861091 75.749783 21 1111 947 22 ... 949 \n", + "258 82.825092 74.110869 22 1036 927 23 ... 928 \n", + "259 88.661223 73.671160 22 1109 921 23 ... 923 \n", + "\n", + " surface_area volume SA_to_volume_ratio equivalent_diameter extent \\\n", + "0 0.421324 0.007873 53.515276 0.246820 0.75 \n", + "1 0.374885 0.005249 71.425050 0.215617 0.50 \n", + "2 0.374885 0.005249 71.425050 0.215617 0.50 \n", + "3 0.187442 0.002624 71.425050 0.171135 1.00 \n", + "4 0.473719 0.007873 60.170340 0.246820 0.75 \n", + ".. ... ... ... ... ... \n", + "255 0.187442 0.002624 71.425050 0.171135 1.00 \n", + "256 0.187442 0.002624 71.425050 0.171135 1.00 \n", + "257 0.374885 0.005249 71.425050 0.215617 0.50 \n", + "258 0.187442 0.002624 71.425050 0.171135 1.00 \n", + "259 0.321211 0.005249 61.198904 0.215617 1.00 \n", + "\n", + " euler_number solidity axis_major_length redundant \n", + "0 1 inf 0.206422 False \n", + "1 1 inf 0.252815 False \n", + "2 1 inf 0.252815 False \n", + "3 1 inf 0.000000 False \n", + "4 1 inf 0.869819 False \n", + ".. ... ... ... ... \n", + "255 1 inf 0.000000 False \n", + "256 1 inf 0.000000 False \n", + "257 1 inf 0.252815 False \n", + "258 1 inf 0.000000 False \n", + "259 1 inf 0.178767 False \n", + "\n", + "[260 rows x 21 columns]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "display(props_table)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Calculate Distribution of Measurements\n", + "This section of code performs analysis on the distribution measurements of the contacts. It is entirely optional and whether it is performed or not is determined in the user inputs earlier on in this notebook. \n", + "\n", + "This section of code will additional combine the distribution measurements into a separate table for export." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "WTF!! how did we have missing labels?\n" + ] + } + ], + "source": [ + "dist_tabs = []\n", + "if include_contact_dist:\n", + " XY_contact_dist, XY_bins, XY_wedges = get_XY_distribution(mask=mask, \n", + " obj=site,\n", + " obj_name=orgs,\n", + " centering_obj=center_obj,\n", + " scale=scale,\n", + " center_on=dist_center_on,\n", + " keep_center_as_bin=dist_keep_center_as_bin,\n", + " num_bins=dist_num_bins,\n", + " zernike_degrees=dist_zernike_degrees)\n", + " \n", + " Z_contact_dist = get_Z_distribution(mask=mask,\n", + " obj=site,\n", + " obj_name=orgs,\n", + " center_obj=center_obj,\n", + " scale=scale)\n", + " contact_dist_tab = pd.merge(XY_contact_dist, Z_contact_dist, on=[\"object\", \"scale\"])\n", + " dist_tabs.append(contact_dist_tab)\n", + "indexes.clear()\n", + "combined_dist_tab = pd.concat(dist_tabs, ignore_index=True)\n", + "combined_dist_tab.insert(loc=0,column='image_name',value=test_img_name.stem)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here, we can view the distribution metrics created by the above block of code. \n", + "\n", + ">NOTE: If include_contact_dist is False, the following code will produce an error as there will be no data to display." + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
image_nameobjectscaleXY_n_binsXY_binsXY_mask_vox_cnt_perbinXY_obj_vox_cnt_perbinXY_center_vox_cnt_perbinXY_n_pix_perbinXY_portion_pix_perbin...XY_area_wedges_perbinZ_n_slicesZ_slicesZ_mask_vox_cntZ_obj_vox_cntZ_center_vox_cntZ_heightZ_mask_volumeZ_obj_volumeZ_center_volume
020230727_C2-121_conditioned_well 2_cell 1_50uM...ER_perox_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][216, 103, 122, 184, 492][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 18, 136, 286, 272, 101, 43, 67, 4...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.04723777649229383, 0.35...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
\n", + "

1 rows × 46 columns

\n", + "
" + ], + "text/plain": [ + " image_name object \\\n", + "0 20230727_C2-121_conditioned_well 2_cell 1_50uM... ER_perox_mito \n", + "\n", + " scale XY_n_bins XY_bins \\\n", + "0 (0.4106, 0.0799, 0.0799) 5 [1, 2, 3, 4, 5] \n", + "\n", + " XY_mask_vox_cnt_perbin XY_obj_vox_cnt_perbin \\\n", + "0 [391573, 150534, 182433, 203736, 1795494] [216, 103, 122, 184, 492] \n", + "\n", + " XY_center_vox_cnt_perbin XY_n_pix_perbin \\\n", + "0 [159863, 0, 0, 0, 0] [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "\n", + " XY_portion_pix_perbin ... \\\n", + "0 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "\n", + " XY_area_wedges_perbin Z_n_slices \\\n", + "0 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "\n", + " Z_slices \\\n", + "0 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "\n", + " Z_mask_vox_cnt \\\n", + "0 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "\n", + " Z_obj_vox_cnt \\\n", + "0 [0, 0, 0, 0, 18, 136, 286, 272, 101, 43, 67, 4... \n", + "\n", + " Z_center_vox_cnt Z_height \\\n", + "0 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "\n", + " Z_mask_volume \\\n", + "0 [0.023618888246146916, 0.36478060735715795, 94... \n", + "\n", + " Z_obj_volume \\\n", + "0 [0.0, 0.0, 0.0, 0.0, 0.04723777649229383, 0.35... \n", + "\n", + " Z_center_volume \n", + "0 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "\n", + "[1 rows x 46 columns]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "display(combined_dist_tab)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## DEFINE FUNCTIONS:\n", + "This section creates new functions that should run the contact metrics. These functions are based on the code from above." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Make Dictionary\n", + "Creates a dictionary of all organelle segmentations with their keys assigned to their names" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "def _make_dict(obj_names: list[str], #Intakes list of object names\n", + " obj_segs: list[np.ndarray]): #Intakes list of object segmentations\n", + " objs_labeled = {} #Initialize dictionary\n", + " for idx, name in enumerate(obj_names): #Loop across each organelle name\n", + " if name == 'ER': #Proceed only for ER\n", + " objs_labeled[name]=(obj_segs[idx]>0).astype(np.uint16) #Ensures ER is labeled only as one object & sets it as key for its object segmentation\n", + " else: #Proceed for other organelles\n", + " objs_labeled[name]=obj_segs[idx] #Set the organelle name as the key for the corresponding object segmentation\n", + " return objs_labeled #Return a dictionary of segmented objects with keys as the organelle name\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Contact\n", + "Creates a contact between two or more organelles and finds if there are any higher order contacts present for the contact sites between those organelles." + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [], + "source": [ + "def _contact(orgs:str,\n", + " organelle_segs: dict[str:np.ndarray]) -> tuple[np.ndarray, np.ndarray]: \n", + " ##########################################\n", + " ## CREATE CONTACT\n", + " ##########################################\n", + " site = np.ones_like(organelle_segs[orgs.split(splitter)[0]])\n", + " for org in orgs.split(splitter):\n", + " site = site*(organelle_segs[org]>0)\n", + " \n", + " ##########################################\n", + " ## DETERMINE REDUNDANT CONTACTS\n", + " ##########################################\n", + " HOc = site.copy()\n", + " for org, val in organelle_segs.items():\n", + " if (org not in orgs.split(splitter)) and np.any(site*val):\n", + " HOc = HOc*(np.invert(watershed(image=(np.invert(site)),\n", + " markers=(site*val),\n", + " mask=site,\n", + " connectivity=np.ones((3, 3, 3), bool))>0))\n", + " return site, HOc" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Get Contact Metrics\n", + "This function combines multiple steps seen in the above \"Get Contact Metrics for Chosen n-Way Contact\" section to produce a data table for the contact metrics and provides a True or False statement to enable or disable the production of a data table for the distribution metrics." + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [], + "source": [ + "def _get_contact_metrics_3D(orgs: str,\n", + " organelle_segs: dict[str:np.ndarray],\n", + " mask: np.ndarray,\n", + " splitter: str=\"_\",\n", + " scale: Union[tuple, None]=None,\n", + " include_dist:bool=False, \n", + " dist_centering_obj: Union[np.ndarray, None]=None,\n", + " dist_num_bins: Union[int, None]=None,\n", + " dist_zernike_degrees: Union[int, None]=None,\n", + " dist_center_on: Union[bool, None]=None,\n", + " dist_keep_center_as_bin: Union[bool, None]=None) -> list:\n", + " \n", + " ##########################################\n", + " ## PREPARING CONTACT METRICS\n", + " ##########################################\n", + " site, HOc = _contact(orgs, organelle_segs) \n", + " dist_tabs =[]\n", + " labels = label(apply_mask(site, mask)).astype(\"int\") #Isolate to only contact sites found within the cell of interest\n", + " para_labels = apply_mask((HOc>0), mask).astype(\"int\") * labels #copy labels found in labels to para_labels\n", + " \n", + " ##########################################\n", + " ## CREATE LIST OF REGIONPROPS MEASUREMENTS\n", + " ##########################################\n", + " # start with LABEL\n", + " properties = [\"label\"]\n", + "\n", + " # add position\n", + " properties = properties + [\"centroid\", \"bbox\"]\n", + "\n", + " # add area\n", + " properties = properties + [\"area\", \"equivalent_diameter\"] # \"num_pixels\", \n", + "\n", + " # add shape measurements\n", + " properties = properties + [\"extent\", \"euler_number\", \"solidity\", \"axis_major_length\", \"slice\"] # \"feret_diameter_max\", \"axis_minor_length\", \n", + "\n", + " ##################\n", + " ## RUN REGIONPROPS\n", + " ##################\n", + " props = regionprops_table(labels, intensity_image=None, properties=properties, extra_properties=None, spacing=scale)\n", + "\n", + " ##################################################################\n", + " ## RUN SURFACE AREA FUNCTION SEPARATELY AND APPEND THE PROPS_TABLE\n", + " ##################################################################\n", + " surface_area_tab = pd.DataFrame(surface_area_from_props(labels, props, scale))\n", + "\n", + " ######################################################\n", + " ## LIST WHICH ORGANELLES ARE INVOLVED IN THE CONTACT\n", + " ###################################################### \n", + " cont_inv = [] #initializes a variable to be used for creating the values for the contacts in the dictionary\n", + " # This variable is a list of the labels of each organelle involved in one contact site between those organelles\n", + " involved = orgs.split(splitter) #creates list of all involved organelles in the contact\n", + " indexes = dict.fromkeys(involved, []) #A dictionary of indexes of site involved in the contact\n", + " indexes[orgs] = [] # str = \"contact\" or \"organelle\", may have multiple different organelles\n", + " # list = contact or organelle number in image corresponding to the same contact in the other keys\n", + " # a 2-way contact will have 3 keys, a 3-way contact will have 4 keys, etc\n", + " redundancy = []\n", + " for index, l in enumerate(props[\"label\"]):\n", + " cont_inv.clear() #clears cont_inv variable of any labels from past contact site for new contact site\n", + " present = para_labels[props[\"slice\"][index]]\n", + " present = present==l\n", + " redundant = not np.any(present)\n", + " redundancy.append(redundant)\n", + " for org in involved: #iterates across list of involved organelles\n", + " volume = labels[props[\"slice\"][index]]\n", + " lorg = organelle_segs[org][props[\"slice\"][index]] \n", + " volume = volume==l \n", + " lorg = lorg[volume] \n", + " all_inv = np.unique(lorg[lorg>0]).tolist() \n", + " if len(all_inv) != 1: #ensures only one label is involved in the contact site\n", + " print(f\"we have an error. as-> {all_inv}\") #informs the console of any errors and the reasoing for it\n", + " indexes[org].append(f\"{all_inv[0]}\") #adds the label of the organelle involved in the contact to the organelle's key's list\n", + " cont_inv.append(f\"{all_inv[0]}\") #adds the label of the organelle involved in the contact to the list of involved organelle labels\n", + " indexes[orgs].append(splitter.join(cont_inv)) #adds the combination of all the organelle's labels involved in the contact to the contact key's list \n", + " ######################################################\n", + " ## CREATE COMBINED DATAFRAME OF THE QUANTIFICATION\n", + " ######################################################\n", + " props_table = pd.DataFrame(props)\n", + " props_table.drop(columns=['slice', 'label'], inplace=True)\n", + " props_table.insert(0, 'label',value=indexes[orgs])\n", + " props_table.insert(0, \"object\", orgs)\n", + " props_table.rename(columns={\"area\": \"volume\"}, inplace=True)\n", + "\n", + " props_table.insert(11, \"surface_area\", surface_area_tab)\n", + " props_table.insert(13, \"SA_to_volume_ratio\", \n", + " props_table[\"surface_area\"].div(props_table[\"volume\"]))\n", + " props_table[\"redundant\"] = list(map(bool, redundancy))\n", + " \n", + " if scale is not None:\n", + " round_scale = (round(scale[0], 4), round(scale[1], 4), round(scale[2], 4))\n", + " props_table.insert(loc=2, column=\"scale\", value=f\"{round_scale}\")\n", + " else: \n", + " props_table.insert(loc=2, column=\"scale\", value=f\"{tuple(np.ones(labels.ndim))}\") \n", + "\n", + " ######################################################\n", + " ## optional: DISTRIBUTION OF CONTACTS MEASUREMENTS\n", + " ######################################################\n", + " if include_dist:\n", + " XY_contact_dist, XY_bins, XY_wedges = get_XY_distribution(mask=mask, \n", + " obj=site,\n", + " obj_name=orgs,\n", + " centering_obj=dist_centering_obj,\n", + " scale=scale,\n", + " center_on=dist_center_on,\n", + " keep_center_as_bin=dist_keep_center_as_bin,\n", + " num_bins=dist_num_bins,\n", + " zernike_degrees=dist_zernike_degrees)\n", + " \n", + " Z_contact_dist = get_Z_distribution(mask=mask,\n", + " obj=site,\n", + " obj_name=orgs,\n", + " center_obj=dist_centering_obj,\n", + " scale=scale)\n", + " contact_dist_tab = pd.merge(XY_contact_dist, Z_contact_dist, on=[\"object\", \"scale\"])\n", + " dist_tabs.append(contact_dist_tab)\n", + " indexes.clear()\n", + " if include_dist:\n", + " return props_table, dist_tabs\n", + " else:\n", + " return props_table" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## OUTPUT:\n", + "Here, we will use the functions we created above to create the output from earlier that was made without using the functions while expanding on it to repeat across all of the contact sites." + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "LD_ER\n", + "WTF!! how did we have missing labels?\n", + "LD_golgi\n", + "WTF!! how did we have missing labels?\n", + "LD_lyso\n", + "WTF!! how did we have missing labels?\n", + "LD_mito\n", + "WTF!! how did we have missing labels?\n", + "LD_perox\n", + "WTF!! how did we have missing labels?\n", + "ER_golgi\n", + "WTF!! how did we have missing labels?\n", + "ER_lyso\n", + "WTF!! how did we have missing labels?\n", + "ER_mito\n", + "WTF!! how did we have missing labels?\n", + "ER_perox\n", + "WTF!! how did we have missing labels?\n", + "golgi_lyso\n", + "WTF!! how did we have missing labels?\n", + "golgi_mito\n", + "WTF!! how did we have missing labels?\n", + "golgi_perox\n", + "WTF!! how did we have missing labels?\n", + "lyso_mito\n", + "WTF!! how did we have missing labels?\n", + "lyso_perox\n", + "WTF!! how did we have missing labels?\n", + "mito_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_golgi\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_lyso\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_mito\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_golgi_lyso\n", + "WTF!! how did we have missing labels?\n", + "LD_golgi_mito\n", + "WTF!! how did we have missing labels?\n", + "LD_golgi_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_lyso_mito\n", + "WTF!! how did we have missing labels?\n", + "LD_lyso_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "ER_golgi_lyso\n", + "WTF!! how did we have missing labels?\n", + "ER_golgi_mito\n", + "WTF!! how did we have missing labels?\n", + "ER_golgi_perox\n", + "WTF!! how did we have missing labels?\n", + "ER_lyso_mito\n", + "WTF!! how did we have missing labels?\n", + "ER_lyso_perox\n", + "WTF!! how did we have missing labels?\n", + "ER_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "golgi_lyso_mito\n", + "WTF!! how did we have missing labels?\n", + "golgi_lyso_perox\n", + "WTF!! how did we have missing labels?\n", + "golgi_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "lyso_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_golgi_lyso\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_golgi_mito\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_golgi_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_lyso_mito\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_lyso_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_golgi_lyso_mito\n", + "WTF!! how did we have missing labels?\n", + "LD_golgi_lyso_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_golgi_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_lyso_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "ER_golgi_lyso_mito\n", + "WTF!! how did we have missing labels?\n", + "ER_golgi_lyso_perox\n", + "WTF!! how did we have missing labels?\n", + "ER_golgi_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "ER_lyso_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "golgi_lyso_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_golgi_lyso_mito\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_golgi_lyso_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_golgi_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_lyso_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_golgi_lyso_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "ER_golgi_lyso_mito_perox\n", + "WTF!! how did we have missing labels?\n", + "LD_ER_golgi_lyso_mito_perox\n", + "WTF!! how did we have missing labels?\n" + ] + } + ], + "source": [ + "distance_tabs = []\n", + "contacts_tabs = []\n", + "all_pos =[]\n", + "labeled_dict = _make_dict(org_names, org_segs)\n", + "for n in list(map(lambda x:x+2, (range(len(org_names)-1)))):\n", + " all_pos += itertools.combinations(org_names, n)\n", + "possib = [splitter.join(cont) for cont in all_pos]\n", + "if include_contact_dist:\n", + " for conts in possib:\n", + " print(conts)\n", + " cont_tab, dist_tab = _get_contact_metrics_3D(orgs=conts,\n", + " organelle_segs=labeled_dict,\n", + " mask=mask,\n", + " splitter=splitter,\n", + " scale=scale,\n", + " include_dist=include_contact_dist,\n", + " dist_centering_obj=region_segs[masks_file_name.index(dist_centering_obj)],\n", + " dist_num_bins=dist_num_bins,\n", + " dist_zernike_degrees=dist_zernike_degrees,\n", + " dist_center_on=dist_center_on,\n", + " dist_keep_center_as_bin=dist_keep_center_as_bin)\n", + " for tabs in dist_tab:\n", + " distance_tabs.append(tabs)\n", + " contacts_tabs.append(cont_tab)\n", + "else:\n", + " for conts in all_pos:\n", + " cont_tab = _get_contact_metrics_3D(orgs=orgs,\n", + " organelle_segs=labeled_dict,\n", + " mask=mask,\n", + " splitter=splitter,\n", + " scale=scale,\n", + " include_dist=include_contact_dist)\n", + " contacts_tabs.append(cont_tab)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following block of code enables viewing of the contact metrics table." + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
image_nameobjectlabelscalecentroid-0centroid-1centroid-2bbox-0bbox-1bbox-2...bbox-5surface_areavolumeSA_to_volume_ratioequivalent_diameterextenteuler_numbersolidityaxis_major_lengthredundant
020230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER3_1(0.4106, 0.0799, 0.0799)1.64237640.21334140.3503934502504...5070.6807710.01837037.0583700.3273700.7777781inf0.270270False
120230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER4_1(0.4106, 0.0799, 0.0799)1.64237644.47718160.2000914556752...7550.5086530.00787364.6076200.2468200.5000001inf0.328671False
220230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER5_1(0.4106, 0.0799, 0.0799)1.64237659.00088663.1581304738790...7910.1874420.00262471.4250500.1711351.0000001inf0.000000True
320230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER7_1(0.4106, 0.0799, 0.0799)2.01564374.77951768.6890094934858...8610.9733310.02886833.7171690.3806010.45833310.9166670.563715True
420230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER11_1(0.4106, 0.0799, 0.0799)2.05297054.53451462.2360755680777...7811.0786810.03936527.4021570.4220560.7500001inf0.412845True
..................................................................
475520230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso_mito_perox1_34_220_24(0.4106, 0.0799, 0.0799)2.05297074.27076369.1541555928865...8660.4549800.00787357.7901890.2468201.0000001inf0.291925False
475620230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso_mito_perox1_39_144_83(0.4106, 0.0799, 0.0799)2.05297091.57928978.90768951145987...9880.3212110.00524961.1989040.2156171.0000001inf0.178767False
475720230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso_mito_perox1_61_28_104(0.4106, 0.0799, 0.0799)2.46356450.52650458.9209396632737...7380.1874420.00262471.4250500.1711351.0000001inf0.000000False
475820230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso_mito_perox1_14_222_112(0.4106, 0.0799, 0.0799)2.46356484.26413874.67049861054934...9350.1874420.00262471.4250500.1711351.0000001inf0.000000False
475920230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso_mito_perox1_120_222_64(0.4106, 0.0799, 0.0799)2.87415880.90636474.03092271012926...9270.1874420.00262471.4250500.1711351.0000001inf0.000000False
\n", + "

4760 rows × 22 columns

\n", + "
" + ], + "text/plain": [ + " image_name object \\\n", + "0 20230727_C2-121_conditioned_well 2_cell 1_50uM... LD_ER \n", + "1 20230727_C2-121_conditioned_well 2_cell 1_50uM... LD_ER \n", + "2 20230727_C2-121_conditioned_well 2_cell 1_50uM... LD_ER \n", + "3 20230727_C2-121_conditioned_well 2_cell 1_50uM... LD_ER \n", + "4 20230727_C2-121_conditioned_well 2_cell 1_50uM... LD_ER \n", + "... ... ... \n", + "4755 20230727_C2-121_conditioned_well 2_cell 1_50uM... ER_lyso_mito_perox \n", + "4756 20230727_C2-121_conditioned_well 2_cell 1_50uM... ER_lyso_mito_perox \n", + "4757 20230727_C2-121_conditioned_well 2_cell 1_50uM... ER_lyso_mito_perox \n", + "4758 20230727_C2-121_conditioned_well 2_cell 1_50uM... ER_lyso_mito_perox \n", + "4759 20230727_C2-121_conditioned_well 2_cell 1_50uM... ER_lyso_mito_perox \n", + "\n", + " label scale centroid-0 centroid-1 \\\n", + "0 3_1 (0.4106, 0.0799, 0.0799) 1.642376 40.213341 \n", + "1 4_1 (0.4106, 0.0799, 0.0799) 1.642376 44.477181 \n", + "2 5_1 (0.4106, 0.0799, 0.0799) 1.642376 59.000886 \n", + "3 7_1 (0.4106, 0.0799, 0.0799) 2.015643 74.779517 \n", + "4 11_1 (0.4106, 0.0799, 0.0799) 2.052970 54.534514 \n", + "... ... ... ... ... \n", + "4755 1_34_220_24 (0.4106, 0.0799, 0.0799) 2.052970 74.270763 \n", + "4756 1_39_144_83 (0.4106, 0.0799, 0.0799) 2.052970 91.579289 \n", + "4757 1_61_28_104 (0.4106, 0.0799, 0.0799) 2.463564 50.526504 \n", + "4758 1_14_222_112 (0.4106, 0.0799, 0.0799) 2.463564 84.264138 \n", + "4759 1_120_222_64 (0.4106, 0.0799, 0.0799) 2.874158 80.906364 \n", + "\n", + " centroid-2 bbox-0 bbox-1 bbox-2 ... bbox-5 surface_area volume \\\n", + "0 40.350393 4 502 504 ... 507 0.680771 0.018370 \n", + "1 60.200091 4 556 752 ... 755 0.508653 0.007873 \n", + "2 63.158130 4 738 790 ... 791 0.187442 0.002624 \n", + "3 68.689009 4 934 858 ... 861 0.973331 0.028868 \n", + "4 62.236075 5 680 777 ... 781 1.078681 0.039365 \n", + "... ... ... ... ... ... ... ... ... \n", + "4755 69.154155 5 928 865 ... 866 0.454980 0.007873 \n", + "4756 78.907689 5 1145 987 ... 988 0.321211 0.005249 \n", + "4757 58.920939 6 632 737 ... 738 0.187442 0.002624 \n", + "4758 74.670498 6 1054 934 ... 935 0.187442 0.002624 \n", + "4759 74.030922 7 1012 926 ... 927 0.187442 0.002624 \n", + "\n", + " SA_to_volume_ratio equivalent_diameter extent euler_number \\\n", + "0 37.058370 0.327370 0.777778 1 \n", + "1 64.607620 0.246820 0.500000 1 \n", + "2 71.425050 0.171135 1.000000 1 \n", + "3 33.717169 0.380601 0.458333 1 \n", + "4 27.402157 0.422056 0.750000 1 \n", + "... ... ... ... ... \n", + "4755 57.790189 0.246820 1.000000 1 \n", + "4756 61.198904 0.215617 1.000000 1 \n", + "4757 71.425050 0.171135 1.000000 1 \n", + "4758 71.425050 0.171135 1.000000 1 \n", + "4759 71.425050 0.171135 1.000000 1 \n", + "\n", + " solidity axis_major_length redundant \n", + "0 inf 0.270270 False \n", + "1 inf 0.328671 False \n", + "2 inf 0.000000 True \n", + "3 0.916667 0.563715 True \n", + "4 inf 0.412845 True \n", + "... ... ... ... \n", + "4755 inf 0.291925 False \n", + "4756 inf 0.178767 False \n", + "4757 inf 0.000000 False \n", + "4758 inf 0.000000 False \n", + "4759 inf 0.000000 False \n", + "\n", + "[4760 rows x 22 columns]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "final_contact_tab = pd.concat(contacts_tabs, ignore_index=True)\n", + "final_contact_tab['redundant'] = final_contact_tab['redundant'].astype(bool)\n", + "final_contact_tab.insert(loc=0,column='image_name',value=test_img_name.stem)\n", + "display(final_contact_tab)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following block of code enables viewing of the distribution metrics table." + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
image_nameobjectscaleXY_n_binsXY_binsXY_mask_vox_cnt_perbinXY_obj_vox_cnt_perbinXY_center_vox_cnt_perbinXY_n_pix_perbinXY_portion_pix_perbin...XY_area_wedges_perbinZ_n_slicesZ_slicesZ_mask_vox_cntZ_obj_vox_cntZ_center_vox_cntZ_heightZ_mask_volumeZ_obj_volumeZ_center_volume
020230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 18, 12, 107, 39][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 12, 25, 89, 11, 0, 18, 0, 0, 0, 0...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.031491850994862555, 0.0...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
120230727_C2-121_conditioned_well 2_cell 1_50uM...LD_golgi(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
220230727_C2-121_conditioned_well 2_cell 1_50uM...LD_lyso(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 5, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0131216045811...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
320230727_C2-121_conditioned_well 2_cell 1_50uM...LD_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 1, 6][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.015745925497431278, 0.0...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
420230727_C2-121_conditioned_well 2_cell 1_50uM...LD_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 72, 3][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 3, 66, 6, 0, 0, 0, 0, 0, 0, 0,...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.007872962748715639...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
520230727_C2-121_conditioned_well 2_cell 1_50uM...ER_golgi(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][2923, 3707, 6738, 3031, 2443][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 105, 625, 1176, 1713, 2457, 2246,...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.2755536962050474, 1.640...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
620230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][5345, 9459, 7920, 7906, 13009][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 61, 1005, 3962, 4425, 4262, 3638, 36...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.16008357589055133, 2.6374425...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
720230727_C2-121_conditioned_well 2_cell 1_50uM...ER_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][11962, 11282, 13843, 15879, 66503][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 1, 485, 4853, 11044, 13001, 13133, 1234...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0026243209162385463, 1.2727956443...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
820230727_C2-121_conditioned_well 2_cell 1_50uM...ER_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][2289, 1678, 2253, 4150, 6018][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 262, 1810, 3662, 2945, 1494, 1013...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.6875720800544991, 4.750...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
920230727_C2-121_conditioned_well 2_cell 1_50uM...golgi_lyso(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][1841, 2940, 2481, 3411, 3790][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 183, 1056, 1660, 1360, 1228, 1120...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.48025072767165394, 2.77...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1020230727_C2-121_conditioned_well 2_cell 1_50uM...golgi_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][106, 252, 308, 334, 287][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 2, 32, 78, 107, 213, 147, 112, 64...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0052486418324770925, 0....[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1120230727_C2-121_conditioned_well 2_cell 1_50uM...golgi_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][14, 25, 35, 53, 36][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 18, 42, 51, 17, 1, 13, 0, 2, 0...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.04723777649229383,...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1220230727_C2-121_conditioned_well 2_cell 1_50uM...lyso_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][600, 1012, 878, 914, 1844][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 17, 113, 442, 610, 627, 534, 419, 39...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.04461345557605528, 0.2965482...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1320230727_C2-121_conditioned_well 2_cell 1_50uM...lyso_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][115, 44, 125, 324, 271][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 134, 297, 149, 9, 12, 23, 15, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.3516590027759652, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1420230727_C2-121_conditioned_well 2_cell 1_50uM...mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][356, 230, 382, 556, 872][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 23, 208, 473, 502, 231, 110, 116,...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.06035938107348657, 0.54...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1520230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_golgi(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1620230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_lyso(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1720230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 1, 1][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0026243209162385463, 0....[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1820230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 30, 3][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 3, 24, 6, 0, 0, 0, 0, 0, 0, 0,...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.007872962748715639...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
1920230727_C2-121_conditioned_well 2_cell 1_50uM...LD_golgi_lyso(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2020230727_C2-121_conditioned_well 2_cell 1_50uM...LD_golgi_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2120230727_C2-121_conditioned_well 2_cell 1_50uM...LD_golgi_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2220230727_C2-121_conditioned_well 2_cell 1_50uM...LD_lyso_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2320230727_C2-121_conditioned_well 2_cell 1_50uM...LD_lyso_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2420230727_C2-121_conditioned_well 2_cell 1_50uM...LD_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2520230727_C2-121_conditioned_well 2_cell 1_50uM...ER_golgi_lyso(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][1284, 1694, 1718, 1543, 2297][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 105, 609, 992, 755, 833, 891, 691...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.2755536962050474, 1.598...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2620230727_C2-121_conditioned_well 2_cell 1_50uM...ER_golgi_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][72, 157, 192, 167, 217][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 2, 28, 57, 50, 138, 98, 89, 55, 4...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0052486418324770925, 0....[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2720230727_C2-121_conditioned_well 2_cell 1_50uM...ER_golgi_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][2, 1, 12, 14, 14][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 4, 3, 23, 4, 1, 3, 0, 0, 0, 2,...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.010497283664954185...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2820230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][462, 773, 653, 631, 1393][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 12, 64, 300, 485, 495, 391, 367, 361...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.031491850994862555, 0.167956...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
2920230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][41, 14, 58, 58, 78][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 32, 103, 37, 3, 12, 15, 10, 3,...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.08397826931963348,...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3020230727_C2-121_conditioned_well 2_cell 1_50uM...ER_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][216, 103, 122, 184, 492][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 18, 136, 286, 272, 101, 43, 67, 4...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.04723777649229383, 0.35...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3120230727_C2-121_conditioned_well 2_cell 1_50uM...golgi_lyso_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][61, 172, 118, 214, 261][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 2, 29, 78, 58, 124, 70, 98, 44, 5...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0052486418324770925, 0....[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3220230727_C2-121_conditioned_well 2_cell 1_50uM...golgi_lyso_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][14, 15, 8, 37, 23][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 15, 42, 25, 0, 1, 6, 0, 2, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0393648137435782, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3320230727_C2-121_conditioned_well 2_cell 1_50uM...golgi_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 1, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00262432...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3420230727_C2-121_conditioned_well 2_cell 1_50uM...lyso_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][2, 0, 1, 3, 34][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 18, 19, 3, 0, 0, 0, 0, 0, 0, 0...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.04723777649229383,...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3520230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_golgi_lyso(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3620230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_golgi_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3720230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_golgi_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3820230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_lyso_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
3920230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_lyso_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4020230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4120230727_C2-121_conditioned_well 2_cell 1_50uM...LD_golgi_lyso_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4220230727_C2-121_conditioned_well 2_cell 1_50uM...LD_golgi_lyso_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4320230727_C2-121_conditioned_well 2_cell 1_50uM...LD_golgi_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4420230727_C2-121_conditioned_well 2_cell 1_50uM...LD_lyso_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4520230727_C2-121_conditioned_well 2_cell 1_50uM...ER_golgi_lyso_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][51, 109, 85, 84, 192][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 2, 25, 57, 21, 66, 53, 80, 37, 29...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0052486418324770925, 0....[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4620230727_C2-121_conditioned_well 2_cell 1_50uM...ER_golgi_lyso_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][2, 1, 3, 4, 4][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 1, 3, 5, 0, 1, 3, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.002624320916238546...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4720230727_C2-121_conditioned_well 2_cell 1_50uM...ER_golgi_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 1, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00262432...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4820230727_C2-121_conditioned_well 2_cell 1_50uM...ER_lyso_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][2, 0, 1, 1, 4][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 5, 2, 1, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.013121604581192731...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
4920230727_C2-121_conditioned_well 2_cell 1_50uM...golgi_lyso_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
5020230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_golgi_lyso_mito(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
5120230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_golgi_lyso_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
5220230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_golgi_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
5320230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_lyso_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
5420230727_C2-121_conditioned_well 2_cell 1_50uM...LD_golgi_lyso_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
5520230727_C2-121_conditioned_well 2_cell 1_50uM...ER_golgi_lyso_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
5620230727_C2-121_conditioned_well 2_cell 1_50uM...LD_ER_golgi_lyso_mito_perox(0.4106, 0.0799, 0.0799)5[1, 2, 3, 4, 5][391573, 150534, 182433, 203736, 1795494][0, 0, 0, 0, 0][159863, 0, 0, 0, 0][13444.0, 6063.0, 8888.0, 13027.0, 380856.0][0.031836846816552127, 0.01435784009586102, 0.......[[8.794735385184001, 8.813909953611, 7.9574458...39[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...[9, 139, 35897, 119787, 165147, 205238, 238961...[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...[0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6...16.013166[0.023618888246146916, 0.36478060735715795, 94...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...
\n", + "

57 rows × 46 columns

\n", + "
" + ], + "text/plain": [ + " image_name \\\n", + "0 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "1 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "2 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "3 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "4 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "5 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "6 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "7 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "8 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "9 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "10 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "11 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "12 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "13 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "14 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "15 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "16 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "17 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "18 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "19 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "20 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "21 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "22 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "23 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "24 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "25 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "26 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "27 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "28 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "29 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "30 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "31 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "32 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "33 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "34 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "35 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "36 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "37 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "38 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "39 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "40 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "41 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "42 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "43 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "44 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "45 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "46 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "47 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "48 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "49 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "50 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "51 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "52 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "53 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "54 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "55 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "56 20230727_C2-121_conditioned_well 2_cell 1_50uM... \n", + "\n", + " object scale XY_n_bins \\\n", + "0 LD_ER (0.4106, 0.0799, 0.0799) 5 \n", + "1 LD_golgi (0.4106, 0.0799, 0.0799) 5 \n", + "2 LD_lyso (0.4106, 0.0799, 0.0799) 5 \n", + "3 LD_mito (0.4106, 0.0799, 0.0799) 5 \n", + "4 LD_perox (0.4106, 0.0799, 0.0799) 5 \n", + "5 ER_golgi (0.4106, 0.0799, 0.0799) 5 \n", + "6 ER_lyso (0.4106, 0.0799, 0.0799) 5 \n", + "7 ER_mito (0.4106, 0.0799, 0.0799) 5 \n", + "8 ER_perox (0.4106, 0.0799, 0.0799) 5 \n", + "9 golgi_lyso (0.4106, 0.0799, 0.0799) 5 \n", + "10 golgi_mito (0.4106, 0.0799, 0.0799) 5 \n", + "11 golgi_perox (0.4106, 0.0799, 0.0799) 5 \n", + "12 lyso_mito (0.4106, 0.0799, 0.0799) 5 \n", + "13 lyso_perox (0.4106, 0.0799, 0.0799) 5 \n", + "14 mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "15 LD_ER_golgi (0.4106, 0.0799, 0.0799) 5 \n", + "16 LD_ER_lyso (0.4106, 0.0799, 0.0799) 5 \n", + "17 LD_ER_mito (0.4106, 0.0799, 0.0799) 5 \n", + "18 LD_ER_perox (0.4106, 0.0799, 0.0799) 5 \n", + "19 LD_golgi_lyso (0.4106, 0.0799, 0.0799) 5 \n", + "20 LD_golgi_mito (0.4106, 0.0799, 0.0799) 5 \n", + "21 LD_golgi_perox (0.4106, 0.0799, 0.0799) 5 \n", + "22 LD_lyso_mito (0.4106, 0.0799, 0.0799) 5 \n", + "23 LD_lyso_perox (0.4106, 0.0799, 0.0799) 5 \n", + "24 LD_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "25 ER_golgi_lyso (0.4106, 0.0799, 0.0799) 5 \n", + "26 ER_golgi_mito (0.4106, 0.0799, 0.0799) 5 \n", + "27 ER_golgi_perox (0.4106, 0.0799, 0.0799) 5 \n", + "28 ER_lyso_mito (0.4106, 0.0799, 0.0799) 5 \n", + "29 ER_lyso_perox (0.4106, 0.0799, 0.0799) 5 \n", + "30 ER_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "31 golgi_lyso_mito (0.4106, 0.0799, 0.0799) 5 \n", + "32 golgi_lyso_perox (0.4106, 0.0799, 0.0799) 5 \n", + "33 golgi_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "34 lyso_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "35 LD_ER_golgi_lyso (0.4106, 0.0799, 0.0799) 5 \n", + "36 LD_ER_golgi_mito (0.4106, 0.0799, 0.0799) 5 \n", + "37 LD_ER_golgi_perox (0.4106, 0.0799, 0.0799) 5 \n", + "38 LD_ER_lyso_mito (0.4106, 0.0799, 0.0799) 5 \n", + "39 LD_ER_lyso_perox (0.4106, 0.0799, 0.0799) 5 \n", + "40 LD_ER_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "41 LD_golgi_lyso_mito (0.4106, 0.0799, 0.0799) 5 \n", + "42 LD_golgi_lyso_perox (0.4106, 0.0799, 0.0799) 5 \n", + "43 LD_golgi_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "44 LD_lyso_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "45 ER_golgi_lyso_mito (0.4106, 0.0799, 0.0799) 5 \n", + "46 ER_golgi_lyso_perox (0.4106, 0.0799, 0.0799) 5 \n", + "47 ER_golgi_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "48 ER_lyso_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "49 golgi_lyso_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "50 LD_ER_golgi_lyso_mito (0.4106, 0.0799, 0.0799) 5 \n", + "51 LD_ER_golgi_lyso_perox (0.4106, 0.0799, 0.0799) 5 \n", + "52 LD_ER_golgi_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "53 LD_ER_lyso_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "54 LD_golgi_lyso_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "55 ER_golgi_lyso_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "56 LD_ER_golgi_lyso_mito_perox (0.4106, 0.0799, 0.0799) 5 \n", + "\n", + " XY_bins XY_mask_vox_cnt_perbin \\\n", + "0 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "1 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "2 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "3 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "4 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "5 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "6 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "7 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "8 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "9 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "10 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "11 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "12 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "13 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "14 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "15 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "16 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "17 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "18 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "19 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "20 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "21 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "22 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "23 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "24 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "25 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "26 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "27 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "28 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "29 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "30 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "31 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "32 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "33 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "34 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "35 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "36 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "37 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "38 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "39 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "40 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "41 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "42 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "43 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "44 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "45 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "46 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "47 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "48 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "49 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "50 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "51 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "52 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "53 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "54 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "55 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "56 [1, 2, 3, 4, 5] [391573, 150534, 182433, 203736, 1795494] \n", + "\n", + " XY_obj_vox_cnt_perbin XY_center_vox_cnt_perbin \\\n", + "0 [0, 18, 12, 107, 39] [159863, 0, 0, 0, 0] \n", + "1 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "2 [0, 0, 0, 5, 0] [159863, 0, 0, 0, 0] \n", + "3 [0, 0, 0, 1, 6] [159863, 0, 0, 0, 0] \n", + "4 [0, 0, 0, 72, 3] [159863, 0, 0, 0, 0] \n", + "5 [2923, 3707, 6738, 3031, 2443] [159863, 0, 0, 0, 0] \n", + "6 [5345, 9459, 7920, 7906, 13009] [159863, 0, 0, 0, 0] \n", + "7 [11962, 11282, 13843, 15879, 66503] [159863, 0, 0, 0, 0] \n", + "8 [2289, 1678, 2253, 4150, 6018] [159863, 0, 0, 0, 0] \n", + "9 [1841, 2940, 2481, 3411, 3790] [159863, 0, 0, 0, 0] \n", + "10 [106, 252, 308, 334, 287] [159863, 0, 0, 0, 0] \n", + "11 [14, 25, 35, 53, 36] [159863, 0, 0, 0, 0] \n", + "12 [600, 1012, 878, 914, 1844] [159863, 0, 0, 0, 0] \n", + "13 [115, 44, 125, 324, 271] [159863, 0, 0, 0, 0] \n", + "14 [356, 230, 382, 556, 872] [159863, 0, 0, 0, 0] \n", + "15 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "16 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "17 [0, 0, 0, 1, 1] [159863, 0, 0, 0, 0] \n", + "18 [0, 0, 0, 30, 3] [159863, 0, 0, 0, 0] \n", + "19 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "20 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "21 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "22 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "23 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "24 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "25 [1284, 1694, 1718, 1543, 2297] [159863, 0, 0, 0, 0] \n", + "26 [72, 157, 192, 167, 217] [159863, 0, 0, 0, 0] \n", + "27 [2, 1, 12, 14, 14] [159863, 0, 0, 0, 0] \n", + "28 [462, 773, 653, 631, 1393] [159863, 0, 0, 0, 0] \n", + "29 [41, 14, 58, 58, 78] [159863, 0, 0, 0, 0] \n", + "30 [216, 103, 122, 184, 492] [159863, 0, 0, 0, 0] \n", + "31 [61, 172, 118, 214, 261] [159863, 0, 0, 0, 0] \n", + "32 [14, 15, 8, 37, 23] [159863, 0, 0, 0, 0] \n", + "33 [0, 0, 0, 1, 0] [159863, 0, 0, 0, 0] \n", + "34 [2, 0, 1, 3, 34] [159863, 0, 0, 0, 0] \n", + "35 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "36 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "37 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "38 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "39 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "40 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "41 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "42 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "43 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "44 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "45 [51, 109, 85, 84, 192] [159863, 0, 0, 0, 0] \n", + "46 [2, 1, 3, 4, 4] [159863, 0, 0, 0, 0] \n", + "47 [0, 0, 0, 1, 0] [159863, 0, 0, 0, 0] \n", + "48 [2, 0, 1, 1, 4] [159863, 0, 0, 0, 0] \n", + "49 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "50 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "51 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "52 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "53 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "54 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "55 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "56 [0, 0, 0, 0, 0] [159863, 0, 0, 0, 0] \n", + "\n", + " XY_n_pix_perbin \\\n", + "0 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "1 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "2 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "3 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "4 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "5 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "6 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "7 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "8 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "9 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "10 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "11 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "12 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "13 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "14 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "15 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "16 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "17 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "18 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "19 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "20 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "21 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "22 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "23 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "24 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "25 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "26 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "27 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "28 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "29 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "30 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "31 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "32 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "33 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "34 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "35 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "36 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "37 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "38 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "39 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "40 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "41 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "42 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "43 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "44 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "45 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "46 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "47 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "48 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "49 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "50 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "51 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "52 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "53 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "54 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "55 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "56 [13444.0, 6063.0, 8888.0, 13027.0, 380856.0] \n", + "\n", + " XY_portion_pix_perbin ... \\\n", + "0 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "1 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "2 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "3 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "4 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "5 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "6 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "7 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "8 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "9 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "10 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "11 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "12 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "13 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "14 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "15 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "16 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "17 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "18 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "19 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "20 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "21 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "22 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "23 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "24 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "25 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "26 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "27 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "28 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "29 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "30 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "31 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "32 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "33 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "34 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "35 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "36 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "37 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "38 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "39 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "40 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "41 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "42 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "43 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "44 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "45 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "46 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "47 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "48 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "49 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "50 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "51 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "52 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "53 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "54 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "55 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "56 [0.031836846816552127, 0.01435784009586102, 0.... ... \n", + "\n", + " XY_area_wedges_perbin Z_n_slices \\\n", + "0 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "1 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "2 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "3 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "4 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "5 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "6 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "7 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "8 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "9 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "10 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "11 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "12 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "13 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "14 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "15 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "16 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "17 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "18 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "19 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "20 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "21 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "22 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "23 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "24 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "25 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "26 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "27 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "28 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "29 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "30 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "31 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "32 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "33 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "34 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "35 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "36 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "37 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "38 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "39 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "40 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "41 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "42 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "43 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "44 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "45 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "46 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "47 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "48 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "49 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "50 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "51 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "52 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "53 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "54 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "55 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "56 [[8.794735385184001, 8.813909953611, 7.9574458... 39 \n", + "\n", + " Z_slices \\\n", + "0 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "2 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "3 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "4 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "5 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "6 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "7 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "8 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "9 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "10 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "11 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "12 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "13 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "14 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "15 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "16 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "17 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "18 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "19 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "20 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "21 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "22 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "23 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "24 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "25 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "26 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "27 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "28 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "29 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "30 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "31 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "32 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "33 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "34 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "35 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "36 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "37 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "38 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "39 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "40 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "41 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "42 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "43 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "44 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "45 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "46 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "47 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "48 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "49 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "50 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "51 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "52 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "53 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "54 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "55 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "56 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... \n", + "\n", + " Z_mask_vox_cnt \\\n", + "0 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "1 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "2 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "3 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "4 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "5 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "6 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "7 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "8 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "9 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "10 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "11 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "12 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "13 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "14 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "15 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "16 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "17 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "18 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "19 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "20 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "21 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "22 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "23 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "24 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "25 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "26 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "27 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "28 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "29 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "30 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "31 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "32 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "33 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "34 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "35 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "36 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "37 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "38 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "39 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "40 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "41 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "42 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "43 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "44 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "45 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "46 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "47 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "48 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "49 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "50 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "51 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "52 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "53 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "54 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "55 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "56 [9, 139, 35897, 119787, 165147, 205238, 238961... \n", + "\n", + " Z_obj_vox_cnt \\\n", + "0 [0, 0, 0, 0, 12, 25, 89, 11, 0, 18, 0, 0, 0, 0... \n", + "1 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "2 [0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "3 [0, 0, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ... \n", + "4 [0, 0, 0, 0, 0, 3, 66, 6, 0, 0, 0, 0, 0, 0, 0,... \n", + "5 [0, 0, 0, 0, 105, 625, 1176, 1713, 2457, 2246,... \n", + "6 [0, 0, 0, 61, 1005, 3962, 4425, 4262, 3638, 36... \n", + "7 [0, 0, 1, 485, 4853, 11044, 13001, 13133, 1234... \n", + "8 [0, 0, 0, 0, 262, 1810, 3662, 2945, 1494, 1013... \n", + "9 [0, 0, 0, 0, 183, 1056, 1660, 1360, 1228, 1120... \n", + "10 [0, 0, 0, 0, 2, 32, 78, 107, 213, 147, 112, 64... \n", + "11 [0, 0, 0, 0, 0, 18, 42, 51, 17, 1, 13, 0, 2, 0... \n", + "12 [0, 0, 0, 17, 113, 442, 610, 627, 534, 419, 39... \n", + "13 [0, 0, 0, 0, 0, 134, 297, 149, 9, 12, 23, 15, ... \n", + "14 [0, 0, 0, 0, 23, 208, 473, 502, 231, 110, 116,... \n", + "15 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "16 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "17 [0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ... \n", + "18 [0, 0, 0, 0, 0, 3, 24, 6, 0, 0, 0, 0, 0, 0, 0,... \n", + "19 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "20 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "21 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "22 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "23 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "24 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "25 [0, 0, 0, 0, 105, 609, 992, 755, 833, 891, 691... \n", + "26 [0, 0, 0, 0, 2, 28, 57, 50, 138, 98, 89, 55, 4... \n", + "27 [0, 0, 0, 0, 0, 4, 3, 23, 4, 1, 3, 0, 0, 0, 2,... \n", + "28 [0, 0, 0, 12, 64, 300, 485, 495, 391, 367, 361... \n", + "29 [0, 0, 0, 0, 0, 32, 103, 37, 3, 12, 15, 10, 3,... \n", + "30 [0, 0, 0, 0, 18, 136, 286, 272, 101, 43, 67, 4... \n", + "31 [0, 0, 0, 0, 2, 29, 78, 58, 124, 70, 98, 44, 5... \n", + "32 [0, 0, 0, 0, 0, 15, 42, 25, 0, 1, 6, 0, 2, 0, ... \n", + "33 [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ... \n", + "34 [0, 0, 0, 0, 0, 18, 19, 3, 0, 0, 0, 0, 0, 0, 0... \n", + "35 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "36 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "37 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "38 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "39 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "40 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "41 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "42 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "43 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "44 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "45 [0, 0, 0, 0, 2, 25, 57, 21, 66, 53, 80, 37, 29... \n", + "46 [0, 0, 0, 0, 0, 1, 3, 5, 0, 1, 3, 0, 0, 0, 0, ... \n", + "47 [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ... \n", + "48 [0, 0, 0, 0, 0, 5, 2, 1, 0, 0, 0, 0, 0, 0, 0, ... \n", + "49 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "50 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "51 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "52 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "53 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "54 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "55 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "56 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... \n", + "\n", + " Z_center_vox_cnt Z_height \\\n", + "0 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "1 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "2 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "3 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "4 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "5 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "6 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "7 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "9 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "10 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "11 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "12 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "13 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "14 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "15 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "16 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "17 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "18 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "19 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "20 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "21 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "22 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "23 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "24 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "25 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "26 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "27 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "28 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "29 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "30 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "31 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "32 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "33 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "34 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "35 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "36 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "37 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "38 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "39 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "40 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "41 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "42 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "43 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "44 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "45 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "46 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "47 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "48 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "49 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "50 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "51 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "52 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "53 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "54 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "55 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "56 [0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 2171, 3992, 6... 16.013166 \n", + "\n", + " Z_mask_volume \\\n", + "0 [0.023618888246146916, 0.36478060735715795, 94... \n", + "1 [0.023618888246146916, 0.36478060735715795, 94... \n", + "2 [0.023618888246146916, 0.36478060735715795, 94... \n", + "3 [0.023618888246146916, 0.36478060735715795, 94... \n", + "4 [0.023618888246146916, 0.36478060735715795, 94... \n", + "5 [0.023618888246146916, 0.36478060735715795, 94... \n", + "6 [0.023618888246146916, 0.36478060735715795, 94... \n", + "7 [0.023618888246146916, 0.36478060735715795, 94... \n", + "8 [0.023618888246146916, 0.36478060735715795, 94... \n", + "9 [0.023618888246146916, 0.36478060735715795, 94... \n", + "10 [0.023618888246146916, 0.36478060735715795, 94... \n", + "11 [0.023618888246146916, 0.36478060735715795, 94... \n", + "12 [0.023618888246146916, 0.36478060735715795, 94... \n", + "13 [0.023618888246146916, 0.36478060735715795, 94... \n", + "14 [0.023618888246146916, 0.36478060735715795, 94... \n", + "15 [0.023618888246146916, 0.36478060735715795, 94... \n", + "16 [0.023618888246146916, 0.36478060735715795, 94... \n", + "17 [0.023618888246146916, 0.36478060735715795, 94... \n", + "18 [0.023618888246146916, 0.36478060735715795, 94... \n", + "19 [0.023618888246146916, 0.36478060735715795, 94... \n", + "20 [0.023618888246146916, 0.36478060735715795, 94... \n", + "21 [0.023618888246146916, 0.36478060735715795, 94... \n", + "22 [0.023618888246146916, 0.36478060735715795, 94... \n", + "23 [0.023618888246146916, 0.36478060735715795, 94... \n", + "24 [0.023618888246146916, 0.36478060735715795, 94... \n", + "25 [0.023618888246146916, 0.36478060735715795, 94... \n", + "26 [0.023618888246146916, 0.36478060735715795, 94... \n", + "27 [0.023618888246146916, 0.36478060735715795, 94... \n", + "28 [0.023618888246146916, 0.36478060735715795, 94... \n", + "29 [0.023618888246146916, 0.36478060735715795, 94... \n", + "30 [0.023618888246146916, 0.36478060735715795, 94... \n", + "31 [0.023618888246146916, 0.36478060735715795, 94... \n", + "32 [0.023618888246146916, 0.36478060735715795, 94... \n", + "33 [0.023618888246146916, 0.36478060735715795, 94... \n", + "34 [0.023618888246146916, 0.36478060735715795, 94... \n", + "35 [0.023618888246146916, 0.36478060735715795, 94... \n", + "36 [0.023618888246146916, 0.36478060735715795, 94... \n", + "37 [0.023618888246146916, 0.36478060735715795, 94... \n", + "38 [0.023618888246146916, 0.36478060735715795, 94... \n", + "39 [0.023618888246146916, 0.36478060735715795, 94... \n", + "40 [0.023618888246146916, 0.36478060735715795, 94... \n", + "41 [0.023618888246146916, 0.36478060735715795, 94... \n", + "42 [0.023618888246146916, 0.36478060735715795, 94... \n", + "43 [0.023618888246146916, 0.36478060735715795, 94... \n", + "44 [0.023618888246146916, 0.36478060735715795, 94... \n", + "45 [0.023618888246146916, 0.36478060735715795, 94... \n", + "46 [0.023618888246146916, 0.36478060735715795, 94... \n", + "47 [0.023618888246146916, 0.36478060735715795, 94... \n", + "48 [0.023618888246146916, 0.36478060735715795, 94... \n", + "49 [0.023618888246146916, 0.36478060735715795, 94... \n", + "50 [0.023618888246146916, 0.36478060735715795, 94... \n", + "51 [0.023618888246146916, 0.36478060735715795, 94... \n", + "52 [0.023618888246146916, 0.36478060735715795, 94... \n", + "53 [0.023618888246146916, 0.36478060735715795, 94... \n", + "54 [0.023618888246146916, 0.36478060735715795, 94... \n", + "55 [0.023618888246146916, 0.36478060735715795, 94... \n", + "56 [0.023618888246146916, 0.36478060735715795, 94... \n", + "\n", + " Z_obj_volume \\\n", + "0 [0.0, 0.0, 0.0, 0.0, 0.031491850994862555, 0.0... \n", + "1 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "2 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0131216045811... \n", + "3 [0.0, 0.0, 0.0, 0.0, 0.015745925497431278, 0.0... \n", + "4 [0.0, 0.0, 0.0, 0.0, 0.0, 0.007872962748715639... \n", + "5 [0.0, 0.0, 0.0, 0.0, 0.2755536962050474, 1.640... \n", + "6 [0.0, 0.0, 0.0, 0.16008357589055133, 2.6374425... \n", + "7 [0.0, 0.0, 0.0026243209162385463, 1.2727956443... \n", + "8 [0.0, 0.0, 0.0, 0.0, 0.6875720800544991, 4.750... \n", + "9 [0.0, 0.0, 0.0, 0.0, 0.48025072767165394, 2.77... \n", + "10 [0.0, 0.0, 0.0, 0.0, 0.0052486418324770925, 0.... \n", + "11 [0.0, 0.0, 0.0, 0.0, 0.0, 0.04723777649229383,... \n", + "12 [0.0, 0.0, 0.0, 0.04461345557605528, 0.2965482... \n", + "13 [0.0, 0.0, 0.0, 0.0, 0.0, 0.3516590027759652, ... \n", + "14 [0.0, 0.0, 0.0, 0.0, 0.06035938107348657, 0.54... \n", + "15 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "16 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "17 [0.0, 0.0, 0.0, 0.0, 0.0026243209162385463, 0.... \n", + "18 [0.0, 0.0, 0.0, 0.0, 0.0, 0.007872962748715639... \n", + "19 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "20 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "21 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "22 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "23 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "24 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "25 [0.0, 0.0, 0.0, 0.0, 0.2755536962050474, 1.598... \n", + "26 [0.0, 0.0, 0.0, 0.0, 0.0052486418324770925, 0.... \n", + "27 [0.0, 0.0, 0.0, 0.0, 0.0, 0.010497283664954185... \n", + "28 [0.0, 0.0, 0.0, 0.031491850994862555, 0.167956... \n", + "29 [0.0, 0.0, 0.0, 0.0, 0.0, 0.08397826931963348,... \n", + "30 [0.0, 0.0, 0.0, 0.0, 0.04723777649229383, 0.35... \n", + "31 [0.0, 0.0, 0.0, 0.0, 0.0052486418324770925, 0.... \n", + "32 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0393648137435782, ... \n", + "33 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00262432... \n", + "34 [0.0, 0.0, 0.0, 0.0, 0.0, 0.04723777649229383,... \n", + "35 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "36 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "37 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "38 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "39 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "40 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "41 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "42 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "43 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "44 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "45 [0.0, 0.0, 0.0, 0.0, 0.0052486418324770925, 0.... \n", + "46 [0.0, 0.0, 0.0, 0.0, 0.0, 0.002624320916238546... \n", + "47 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00262432... \n", + "48 [0.0, 0.0, 0.0, 0.0, 0.0, 0.013121604581192731... \n", + "49 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "50 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "51 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "52 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "53 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "54 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "55 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "56 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "\n", + " Z_center_volume \n", + "0 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "1 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "2 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "3 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "4 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "5 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "6 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "7 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "8 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "9 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "10 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "11 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "12 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "13 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "14 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "15 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "16 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "17 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "18 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "19 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "20 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "21 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "22 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "23 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "24 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "25 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "26 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "27 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "28 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "29 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "30 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "31 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "32 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "33 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "34 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "35 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "36 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "37 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "38 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "39 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "40 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "41 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "42 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "43 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "44 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "45 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "46 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "47 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "48 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "49 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "50 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "51 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "52 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "53 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "54 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "55 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "56 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ... \n", + "\n", + "[57 rows x 46 columns]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "final_dist_tab = pd.concat(distance_tabs, ignore_index=True)\n", + "final_dist_tab.insert(loc=0,column='image_name',value=test_img_name.stem)\n", + "display(final_dist_tab)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "cohenpy", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.13" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/seg-qualitycheck_running-quant.ipynb b/notebooks/seg-qualitycheck_running-quant.ipynb index 94fbb14..dc35ea2 100644 --- a/notebooks/seg-qualitycheck_running-quant.ipynb +++ b/notebooks/seg-qualitycheck_running-quant.ipynb @@ -1090,6 +1090,19 @@ "## ⚠️ **WORK IN PROGRESS:** Quantifying segmentation" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def check_for_existing_combo(contact, contact_list, splitter):\n", + " for ctc in contact_list:\n", + " if sorted(contact) == sorted(ctc.split(splitter)):\n", + " return(ctc.split(splitter))\n", + " return contact" + ] + }, { "cell_type": "code", "execution_count": 25, @@ -1108,7 +1121,7 @@ " organelle_names: List[str],\n", " organelle_channels: List[int],\n", " region_names: List[str],\n", - " masks_file_name: [str],\n", + " masks_file_name: list[str],\n", " mask: str,\n", " dist_centering_obj:str, \n", " dist_num_bins: int,\n", @@ -1117,7 +1130,8 @@ " dist_zernike_degrees: Union[int, None]=None,\n", " include_contact_dist: bool = True,\n", " scale:bool=True,\n", - " seg_suffix:Union[str, None]=None) -> int :\n", + " seg_suffix:Union[str, None]=None,\n", + " splitter: str = '_') -> int :\n", " \"\"\" \n", " batch process segmentation quantification (morphology, distribution, contacts); this function is currently optimized to process images from one file folder per image type (e.g., raw, segmentation)\n", " the output csv files are saved to the indicated out_path folder\n", @@ -1236,7 +1250,8 @@ " dist_keep_center_as_bin=dist_keep_center_as_bin,\n", " dist_zernike_degrees=dist_zernike_degrees,\n", " scale=scale_tup,\n", - " include_contact_dist=include_contact_dist)\n", + " include_contact_dist=include_contact_dist,\n", + " splitter=splitter)\n", "\n", " org_tabs.append(org_metrics)\n", " contact_tabs.append(contact_metrics)\n", @@ -1629,9 +1644,9 @@ ], "source": [ "seg=_batch_process_quantification(out_file_name= \"20231117_prelim\",\n", - " seg_path=\"D:/Experiments (C2-117 - current)/C2-123/20230922_C2-123_3D-analysis/20231117_images_for_prelim_analysis\",\n", - " out_path=\"D:/Experiments (C2-117 - current)/C2-123/20230922_C2-123_3D-analysis/20231117_prelim_quant\", \n", - " raw_path=\"D:/Experiments (C2-117 - current)/C2-123/C2-123_deconvolution/images for 11-17 prelim seg\",\n", + " seg_path=\"C:/Users/zscoman/Documents/Python Scripts/Infer-subc-2D/out\",\n", + " out_path=\"C:/Users/zscoman/Documents/Python Scripts/Infer-subc-2D/data/test\", \n", + " raw_path=\"C:/Users/zscoman/Documents/Python Scripts/Infer-subc-2D/raw/shannon\",\n", " raw_file_type = \".tiff\",\n", " organelle_names = ['LD', 'ER', 'golgi', 'lyso', 'mito', 'perox'],\n", " organelle_channels= [0,1,2,3,4,5],\n", @@ -1645,7 +1660,8 @@ " dist_zernike_degrees=None,\n", " include_contact_dist= True,\n", " scale=True,\n", - " seg_suffix=\"-\")" + " seg_suffix=\"-\",\n", + " splitter='X')" ] }, { @@ -1664,7 +1680,8 @@ "source": [ "def _batch_summary_stats(csv_path_list: List[str],\n", " out_path: str,\n", - " out_preffix: str):\n", + " out_preffix: str,\n", + " splitter: str='X'):\n", " \"\"\"\" \n", " csv_path_list: List[str],\n", " A list of path strings where .csv files to analyze are located.\n", @@ -1684,6 +1701,7 @@ " region_tabs = []\n", "\n", " for loc in csv_path_list:\n", + " print(loc)\n", " ds_count = ds_count + 1\n", " loc=Path(loc)\n", " files_store = sorted(loc.glob(\"*.csv\"))\n", @@ -1694,7 +1712,7 @@ " org = \"organelles\"\n", " contacts = \"contacts\"\n", " dist = \"distributions\"\n", - " regions = \"_regions\"\n", + " regions = \"regions\"\n", "\n", " if org in stem:\n", " test_orgs = pd.read_csv(file, index_col=0)\n", @@ -1717,51 +1735,47 @@ " contacts_df = pd.concat(contact_tabs,axis=0, join='outer')\n", " dist_df = pd.concat(dist_tabs,axis=0, join='outer')\n", " regions_df = pd.concat(region_tabs,axis=0, join='outer')\n", + " ##########################\n", + " # List organelles in cell\n", + " ###########################\n", + " all_orgs = list(set(org_df.loc[:, 'object'].tolist()))\n", "\n", " ###################\n", " # adding new metrics to the original sheets\n", " ###################\n", " # TODO: include these labels when creating the original sheets\n", " contact_cnt = contacts_df[[\"dataset\", \"image_name\", \"object\", \"label\", \"volume\"]]\n", - " contact_cnt[[\"orgA\", \"orgB\"]] = contact_cnt[\"object\"].str.split('X', expand=True)\n", - " contact_cnt[[\"A_ID\", \"B_ID\"]] = contact_cnt[\"label\"].str.split('_', expand=True)\n", - " contact_cnt[\"A\"] = contact_cnt[\"orgA\"] +\"_\" + contact_cnt[\"A_ID\"].astype(str)\n", - " contact_cnt[\"B\"] = contact_cnt[\"orgB\"] +\"_\" + contact_cnt[\"B_ID\"].astype(str)\n", - "\n", - " contact_cnt_percell = contact_cnt[[\"dataset\", \"image_name\", \"orgA\", \"A_ID\", \"object\", \"volume\"]].groupby([\"dataset\", \"image_name\", \"orgA\", \"A_ID\", \"object\"]).agg([\"count\", \"sum\"])\n", - " contact_cnt_percell.columns = [\"_\".join(col_name).rstrip('_') for col_name in contact_cnt_percell.columns.to_flat_index()]\n", - " unstacked = contact_cnt_percell.unstack(level='object')\n", - " unstacked.columns = [\"_\".join(col_name).rstrip('_') for col_name in unstacked.columns.to_flat_index()]\n", - " unstacked = unstacked.reset_index()\n", - " for col in unstacked.columns:\n", - " if col.startswith(\"volume_count_\"):\n", - " newname = col.split(\"_\")[-1] + \"_count\"\n", - " unstacked.rename(columns={col:newname}, inplace=True)\n", - " if col.startswith(\"volume_sum_\"):\n", - " newname = col.split(\"_\")[-1] + \"_volume\"\n", - " unstacked.rename(columns={col:newname}, inplace=True)\n", - " unstacked.rename(columns={\"orgA\":\"object\", \"A_ID\":\"label\"}, inplace=True)\n", - " unstacked.set_index(['dataset', 'image_name', 'object', 'label'])\n", - "\n", - " contact_percellB = contact_cnt[[\"dataset\", \"image_name\", \"orgB\", \"B_ID\", \"object\", \"volume\"]].groupby([\"dataset\", \"image_name\", \"orgB\", \"B_ID\", \"object\"]).agg([\"count\", \"sum\"])\n", - " contact_percellB.columns = [\"_\".join(col_name).rstrip('_') for col_name in contact_percellB.columns.to_flat_index()]\n", - " unstackedB = contact_percellB.unstack(level='object')\n", - " unstackedB.columns = [\"_\".join(col_name).rstrip('_') for col_name in unstackedB.columns.to_flat_index()]\n", - " unstackedB = unstackedB.reset_index()\n", - " for col in unstackedB.columns:\n", - " if col.startswith(\"volume_count_\"):\n", - " newname = col.split(\"_\")[-1] + \"_count\"\n", - " unstackedB.rename(columns={col:newname}, inplace=True)\n", - " if col.startswith(\"volume_sum_\"):\n", - " newname = col.split(\"_\")[-1] + \"_volume\"\n", - " unstackedB.rename(columns={col:newname}, inplace=True)\n", - " unstackedB.rename(columns={\"orgB\":\"object\", \"B_ID\":\"label\"}, inplace=True)\n", - " unstackedB.set_index(['dataset', 'image_name', 'object', 'label'])\n", - "\n", - " contact_cnt = pd.concat([unstacked, unstackedB], axis=0).sort_index(axis=0)\n", - " contact_cnt = contact_cnt.groupby(['dataset', 'image_name', 'object', 'label']).sum().reset_index()\n", - " contact_cnt['label']=contact_cnt['label'].astype(\"Int64\")\n", - "\n", + " ctc = contact_cnt[\"object\"].values.tolist()\n", + " ##############################################################################\n", + " # Creating New methods of storing A & B\n", + " ###############################################################################\n", + " # len(max(contact_cnt[\"object\"].str.split('X'), key=len))) provides max number of organelles involved in contact\n", + " contact_cnt[[f\"org{cha}\" for cha in string.ascii_uppercase[:(len(max(contact_cnt[\"object\"].str.split(splitter), key=len)))]]] = contact_cnt[\"object\"].str.split(splitter, expand=True)\n", + " contact_cnt[[f\"{cha}_ID\" for cha in string.ascii_uppercase[:(len(max(contact_cnt[\"label\"].str.split('_'), key=len)))]]] = contact_cnt[\"label\"].str.split('_', expand=True)\n", + " #iterating from a to val\n", + " unstacked_cont = []\n", + " for cha in string.ascii_uppercase[:len(max(contact_cnt[\"object\"].str.split(splitter), key=len))]:\n", + " valid = (contact_cnt[f\"org{cha}\"] != None) & (contact_cnt[f\"{cha}_ID\"] != None)\n", + " contact_cnt[f\"{cha}\"] = None\n", + " contact_cnt.loc[valid, f\"{cha}\"] = contact_cnt[f\"org{cha}\"] + \"_\" + contact_cnt[f\"{cha}_ID\"]\n", + " contact_cnt_percell = contact_cnt[[\"dataset\", \"image_name\", f\"org{cha}\", f\"{cha}_ID\", \"object\", \"volume\"]].groupby([\"dataset\", \"image_name\", f\"org{cha}\", f\"{cha}_ID\", \"object\"]).agg([\"count\", \"sum\"])\n", + " contact_cnt_percell.columns = [\"_\".join(col_name).rstrip('_') for col_name in contact_cnt_percell.columns.to_flat_index()]\n", + " unstacked = contact_cnt_percell.unstack(level='object')\n", + " unstacked.columns = [\"_\".join(col_name).rstrip('_') for col_name in unstacked.columns.to_flat_index()]\n", + " unstacked = unstacked.reset_index()\n", + " for col in unstacked.columns:\n", + " if col.startswith(\"volume_count_\"):\n", + " newname = col.split(\"_\")[-1] + \"_count\"\n", + " unstacked.rename(columns={col:newname}, inplace=True)\n", + " if col.startswith(\"volume_sum_\"):\n", + " newname = col.split(\"_\")[-1] + \"_volume\"\n", + " unstacked.rename(columns={col:newname}, inplace=True)\n", + " unstacked.rename(columns={f\"org{cha}\":\"object\", f\"{cha}_ID\":\"label\"}, inplace=True)\n", + " unstacked.set_index(['dataset', 'image_name', 'object', 'label']) \n", + " unstacked_cont.append(unstacked)\n", + " contact_cnt = pd.concat(unstacked_cont, axis=0).sort_index(axis=0)\n", + " contact_cnt = contact_cnt.groupby(['dataset', 'image_name', 'object', 'label']).sum().reset_index() #adds together all duplicates at the index, then resets the index\n", + " contact_cnt['label']=contact_cnt['label'].astype(\"Int64\") \n", " org_df = pd.merge(org_df, contact_cnt, how='left', on=['dataset', 'image_name', 'object', 'label'], sort=True)\n", " org_df[contact_cnt.columns] = org_df[contact_cnt.columns].fillna(0)\n", "\n", @@ -1819,13 +1833,22 @@ " single_df = pd.DataFrame(list(zip(df[\"bins\"].values[0][1:-1].split(\", \"), \n", " df[\"obj\"].values[0][1:-1].split(\", \"), \n", " df[\"masks\"].values[0][1:-1].split(\", \"))), columns =['bins', 'obj', 'mask']).astype(int)\n", - " \n", + "\n", + " if \"Z_\" in prefix:\n", + " single_df = single_df.drop(single_df[single_df['mask'] == 0].index)\n", + " single_df['bins'] = (single_df[\"bins\"]/max(single_df.bins)*10).apply(np.floor)\n", + " \n", " single_df['mask_fract'] = single_df['mask']/single_df['mask'].max()\n", " single_df['obj_norm'] = (single_df[\"obj\"]/single_df[\"mask_fract\"]).fillna(0)\n", " single_df['portion_per_bin'] = (single_df[\"obj\"] / single_df[\"obj\"].sum())*100\n", "\n", - " if \"Z_\" in prefix:\n", - " single_df['bins'] = (single_df[\"bins\"]/max(single_df.bins)*10).apply(np.floor)\n", + " # single_df['mask_fract'] = single_df['mask']/single_df['mask'].max()\n", + " # single_df['obj_norm'] = (single_df[\"obj\"]/single_df[\"mask_fract\"]).fillna(0)\n", + " # single_df['portion_per_bin'] = (single_df[\"obj\"] / single_df[\"obj\"].sum())*100\n", + "\n", + " # if \"Z_\" in prefix:\n", + " # single_df['bins'] = (single_df[\"bins\"]/max(single_df.bins)*10).apply(np.floor)\n", + "\n", "\n", " sumstats_df = pd.DataFrame()\n", "\n", @@ -1868,11 +1891,19 @@ " single_df = pd.DataFrame(list(zip(df[\"bins\"].values[0][1:-1].split(\", \"), \n", " df[\"masks\"].values[0][1:-1].split(\", \"),\n", " df[\"center\"].values[0][1:-1].split(\", \"))), columns =['bins', 'mask', 'obj']).astype(int)\n", + " # single_df['mask_fract'] = single_df['mask']/single_df['mask'].max()\n", + " # single_df['obj_norm'] = (single_df[\"obj\"]/single_df[\"mask_fract\"]).fillna(0)\n", + " # single_df['portion_per_bin'] = (single_df[\"obj\"] / single_df[\"obj\"].sum())*100\n", + " # if \"Z_\" in prefix:\n", + " # single_df['bins'] = (single_df[\"bins\"]/max(single_df.bins)*10).apply(np.floor)\n", + "\n", + " if \"Z_\" in prefix:\n", + " single_df = single_df.drop(single_df[single_df['mask'] == 0].index)\n", + " single_df['bins'] = (single_df[\"bins\"]/max(single_df.bins)*10).apply(np.floor)\n", + " \n", " single_df['mask_fract'] = single_df['mask']/single_df['mask'].max()\n", " single_df['obj_norm'] = (single_df[\"obj\"]/single_df[\"mask_fract\"]).fillna(0)\n", " single_df['portion_per_bin'] = (single_df[\"obj\"] / single_df[\"obj\"].sum())*100\n", - " if \"Z_\" in prefix:\n", - " single_df['bins'] = (single_df[\"bins\"]/max(single_df.bins)*10).apply(np.floor)\n", "\n", " sumstats_df = pd.DataFrame()\n", "\n", @@ -1911,13 +1942,23 @@ " # TODO: add in line to reorder the level=0 columns here\n", "\n", " # contact sites volume normalized\n", - " norm_toA_list = []\n", - " norm_toB_list = []\n", + " # norm_toA_list = []\n", + " # norm_toB_list = []\n", + " norm_to_list = {}\n", " for col in contact_summary.index:\n", - " norm_toA_list.append(contact_summary.loc[col][('volume', 'sum')]/org_summary.loc[col[:-1]+(col[-1].split('X')[0],)][('volume', 'sum')])\n", - " norm_toB_list.append(contact_summary.loc[col][('volume', 'sum')]/org_summary.loc[col[:-1]+(col[-1].split('X')[1],)][('volume', 'sum')])\n", - " contact_summary[('volume', 'norm_to_A')] = norm_toA_list\n", - " contact_summary[('volume', 'norm_to_B')] = norm_toB_list\n", + " for idx, cha in enumerate(string.ascii_uppercase[:len(max(contact_summary.index.get_level_values('object').str.split(splitter), key=len))]):\n", + " if cha not in norm_to_list:\n", + " norm_to_list[f\"{cha}\"] = []\n", + " if ((idx+1) <= len(col[-1].split(splitter))):\n", + " norm_to_list[f\"{cha}\"].append(contact_summary.loc[col][('volume', 'sum')]/org_summary.loc[col[:-1]+(col[-1].split(splitter)[idx],)][('volume', 'sum')])\n", + " else:\n", + " norm_to_list[f\"{cha}\"].append(None)\n", + " for cha in string.ascii_uppercase[:len(max(contact_summary.index.get_level_values('object').str.split(splitter), key=len))]:\n", + " contact_summary[('volume', f'norm_to_{cha}')] = norm_to_list[f\"{cha}\"]\n", + " # norm_toA_list.append(contact_summary.loc[col][('volume', 'sum')]/org_summary.loc[col[:-1]+(col[-1].split(splitter)[0],)][('volume', 'sum')])\n", + " # norm_toB_list.append(contact_summary.loc[col][('volume', 'sum')]/org_summary.loc[col[:-1]+(col[-1].split(splitter)[1],)][('volume', 'sum')])\n", + " # contact_summary[('volume', 'norm_to_A')] = norm_toA_list\n", + " # contact_summary[('volume', 'norm_to_B')] = norm_toB_list\n", "\n", " # number and area of individuals organelle involved in contact\n", " cont_cnt = org_df[group_by]\n", @@ -1940,16 +1981,18 @@ " if col[1] in ('count_in', 'num_fraction_in') or col[0].endswith(('_count', '_volume')):\n", " if col[2] not in col[0]:\n", " org_final.drop(col,axis=1, inplace=True)\n", + " ########################################################################\n", + " # MAKING new_col_order flexible to work with any organelle input values and combo number\n", + " #######################################################################\n", " new_col_order = ['dataset', 'image_name', 'object', 'volume', 'surface_area', 'SA_to_volume_ratio', \n", - " 'equivalent_diameter', 'extent', 'euler_number', 'solidity', 'axis_major_length', \n", - " 'ERXLD', 'ERXLD_count', 'ERXLD_volume', 'golgiXER', 'golgiXER_count', 'golgiXER_volume', \n", - " 'golgiXLD', 'golgiXLD_count', 'golgiXLD_volume', 'golgiXperox', 'golgiXperox_count', 'golgiXperox_volume', \n", - " 'lysoXER', 'lysoXER_count', 'lysoXER_volume', 'lysoXLD', 'lysoXLD_count', 'lysoXLD_volume', \n", - " 'lysoXgolgi', 'lysoXgolgi_count', 'lysoXgolgi_volume', 'lysoXmito', 'lysoXmito_count', 'lysoXmito_volume', \n", - " 'lysoXperox', 'lysoXperox_count', 'lysoXperox_volume', 'mitoXER', 'mitoXER_count', 'mitoXER_volume', \n", - " 'mitoXLD', 'mitoXLD_count', 'mitoXLD_volume', 'mitoXgolgi', 'mitoXgolgi_count', 'mitoXgolgi_volume', \n", - " 'mitoXperox', 'mitoXperox_count', 'mitoXperox_volume', 'peroxXER', 'peroxXER_count', 'peroxXER_volume', \n", - " 'peroxXLD', 'peroxXLD_count', 'peroxXLD_volume']\n", + " 'equivalent_diameter', 'extent', 'euler_number', 'solidity', 'axis_major_length'] \n", + " all_combos = []\n", + " for n in list(map(lambda x:x+2, (range(len(all_orgs)-1)))):\n", + " for o in itertools.combinations(all_orgs, n):\n", + " all_combos.append(check_for_existing_combo(o, ctc, splitter))\n", + " combos = [splitter.join(cont) for cont in all_combos]\n", + " for combo in combos:\n", + " new_col_order += [f\"{combo}\", f\"{combo}_count\", f\"{combo}_volume\"]\n", " new_cols = org_final.columns.reindex(new_col_order, level=0)\n", " org_final = org_final.reindex(columns=new_cols[0])\n", " org_final.columns = [\"_\".join((col_name[-1], col_name[1], col_name[0])) for col_name in org_final.columns.to_flat_index()]\n", @@ -2154,9 +2197,10 @@ } ], "source": [ - "out=_batch_summary_stats(csv_path_list=[\"D:/Experiments (C2-117 - current)/C2-123/20230922_C2-123_3D-analysis/20231117_prelim_quant\"],\n", - " out_path=\"D:/Experiments (C2-117 - current)/C2-123/20230922_C2-123_3D-analysis/20231117_prelim_quant\",\n", - " out_preffix=\"20231117_prelim_\")" + "out=_batch_summary_stats(csv_path_list=[\"C:/Users/zscoman/Documents/Python Scripts/Infer-subc-2D/data/test\"],\n", + " out_path=\"C:/Users/zscoman/Documents/Python Scripts/Infer-subc-2D/data/test/sumstat\",\n", + " out_preffix=\"20231117_prelim_\",\n", + " splitter=\"X\")" ] }, { @@ -2183,7 +2227,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" + "version": "3.10.13" } }, "nbformat": 4,