fusion-tools 2.2.3__tar.gz → 2.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/PKG-INFO +1 -1
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/setup.py +1 -1
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/components/maps.py +0 -2
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/components/segmentation.py +4 -3
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/utils/shapes.py +9 -22
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools.egg-info/PKG-INFO +1 -1
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/LICENSE +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/README.md +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/pyproject.toml +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/setup.cfg +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/__init__.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/components/__init__.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/components/tools.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/dataset.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/feature_extraction.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/handler.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/tileserver.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/utils/__init__.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/utils/omics.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/utils/stats.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/visualization/__init__.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/visualization/components.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools/visualization/vis_utils.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools.egg-info/SOURCES.txt +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools.egg-info/dependency_links.txt +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools.egg-info/requires.txt +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/src/fusion_tools.egg-info/top_level.txt +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_classification_model.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_custom_component.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_dataset_classes.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_extract_nested_prop.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_feature_annotation.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_feature_extraction.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_generate_property_dict.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_get_gene_info.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_hra_viewer.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_image_overlay.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_model_train.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_multiframe_rgb.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_multiframeslidemap.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_property_plotter.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_read_anndata.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_remote_slide_annotations.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_remote_tileserver.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_segmentation.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_slide_annotations.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_spatial_aggregation.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_tile_server.py +0 -0
- {fusion_tools-2.2.3 → fusion_tools-2.2.4}/tests/test_visualization_component.py +0 -0
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="fusion-tools",
|
|
8
|
-
version="2.2.
|
|
8
|
+
version="2.2.4",
|
|
9
9
|
author="Sam Border",
|
|
10
10
|
author_email="sam.border2256@gmail.com",
|
|
11
11
|
description="Modular visualization and analysis dashboard creation for high-resolution microscopy images",
|
|
@@ -1346,8 +1346,6 @@ class MultiFrameSlideMap(SlideMap):
|
|
|
1346
1346
|
else:
|
|
1347
1347
|
frame_names = [f'Frame {i}' for i in range(len(image_metadata['frames']))]
|
|
1348
1348
|
|
|
1349
|
-
print(frame_names)
|
|
1350
|
-
print(len(image_metadata['frames']))
|
|
1351
1349
|
# This is a multi-frame image
|
|
1352
1350
|
if len(image_metadata['frames'])==3:
|
|
1353
1351
|
# Treat this as an RGB image by default
|
|
@@ -2097,9 +2097,10 @@ class BulkLabels(Tool):
|
|
|
2097
2097
|
n_marked = len(get_pattern_matching_value(current_markers))
|
|
2098
2098
|
|
|
2099
2099
|
patched_list = Patch()
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2100
|
+
for v_idx,v in enumerate(clear_click):
|
|
2101
|
+
if v:
|
|
2102
|
+
del patched_list[v_idx]
|
|
2103
|
+
break
|
|
2103
2104
|
|
|
2104
2105
|
new_structures_div = [
|
|
2105
2106
|
dbc.Alert(
|
|
@@ -67,33 +67,30 @@ def load_geojson(geojson_path: str, name:Union[str,None]=None) -> dict:
|
|
|
67
67
|
with open(geojson_path,'r') as f:
|
|
68
68
|
geojson_anns = json.load(f)
|
|
69
69
|
f.close()
|
|
70
|
-
|
|
71
|
-
print(type(geojson_anns))
|
|
72
|
-
print(len(geojson_anns))
|
|
73
70
|
|
|
74
71
|
if type(geojson_anns)==list:
|
|
75
72
|
for g in geojson_anns:
|
|
76
73
|
if not 'properties' in g:
|
|
77
74
|
g['properties'] = {}
|
|
75
|
+
else:
|
|
76
|
+
if 'name' in g['properties'] and name is None:
|
|
77
|
+
name = g['properties']['name']
|
|
78
78
|
|
|
79
79
|
geo_id = uuid.uuid4().hex[:24] if not '_id' in g['properties'] else g['properties']['_id']
|
|
80
80
|
g['properties'] = g['properties'] | {'name': name if not name is None else geo_id, '_id': geo_id}
|
|
81
81
|
|
|
82
|
-
|
|
83
82
|
for f_idx, f in enumerate(g['features']):
|
|
84
83
|
f['properties'] = f['properties'] | {'name': name if not name is None else geo_id, '_id': uuid.uuid4().hex[:24], '_index': f_idx}
|
|
85
84
|
|
|
86
85
|
elif type(geojson_anns)==dict:
|
|
87
86
|
if not 'properties' in geojson_anns:
|
|
88
87
|
geojson_anns['properties'] = {}
|
|
89
|
-
geo_id = uuid.uuid4().hex[:24] if not '_id' in g['properties'] else geojson_anns['properties']['_id']
|
|
90
|
-
geojson_anns['properties'] = geojson_anns['properties'] | {'name': name if not name is None else geo_id, '_id': geo_id}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
for f_idx, f in enumerate(geojson_anns['features']):
|
|
94
|
-
f['properties'] = f['properties'] | {'name': name if not name is None else geo_id, '_id': uuid.uuid4().hex[:24], '_index': f_idx}
|
|
95
88
|
|
|
89
|
+
geo_id = uuid.uuid4().hex[:24] if not '_id' in g['properties'] else geojson_anns['properties']['_id']
|
|
90
|
+
geojson_anns['properties'] = geojson_anns['properties'] | {'name': name if not name is None else geo_id, '_id': geo_id}
|
|
96
91
|
|
|
92
|
+
for f_idx, f in enumerate(geojson_anns['features']):
|
|
93
|
+
f['properties'] = f['properties'] | {'name': name if not name is None else geo_id, '_id': uuid.uuid4().hex[:24], '_index': f_idx}
|
|
97
94
|
|
|
98
95
|
return geojson_anns
|
|
99
96
|
|
|
@@ -1016,8 +1013,6 @@ def process_filters_queries(filter_list:list, spatial_list:list, structures:list
|
|
|
1016
1013
|
structure_filtered = [gpd.GeoDataFrame.from_features(i['features']) for i in all_geo_list]
|
|
1017
1014
|
name_order = [i['properties']['name'] for i in all_geo_list]
|
|
1018
1015
|
|
|
1019
|
-
#all_names = [i['properties']['name'] for i in all_geo_list]
|
|
1020
|
-
|
|
1021
1016
|
# Now going through spatial queries
|
|
1022
1017
|
filter_reference_list = {
|
|
1023
1018
|
n: {}
|
|
@@ -1048,6 +1043,8 @@ def process_filters_queries(filter_list:list, spatial_list:list, structures:list
|
|
|
1048
1043
|
)
|
|
1049
1044
|
|
|
1050
1045
|
intermediate_gdf = intermediate_gdf.drop([i for i in ['index_left','index_right'] if i in intermediate_gdf], axis = 1)
|
|
1046
|
+
intermediate_gdf = intermediate_gdf.drop([i for i in intermediate_gdf if '_right' in i],axis=1)
|
|
1047
|
+
intermediate_gdf.columns = [i.replace('_left','') if '_left' in i else i for i in intermediate_gdf ]
|
|
1051
1048
|
|
|
1052
1049
|
remainder_structures.append(intermediate_gdf)
|
|
1053
1050
|
else:
|
|
@@ -1060,21 +1057,11 @@ def process_filters_queries(filter_list:list, spatial_list:list, structures:list
|
|
|
1060
1057
|
}
|
|
1061
1058
|
for g,name in zip(remainder_structures,name_order):
|
|
1062
1059
|
g_json = g.to_geo_dict(show_bbox=True)
|
|
1063
|
-
#feature_geos = [i['geometry'] for i in g_json['features']]
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
1060
|
filter_reference_list[name] = {
|
|
1067
1061
|
i+len(combined_geojson['features']):j['properties']['_index']
|
|
1068
1062
|
for i,j in enumerate(g_json['features'])
|
|
1069
1063
|
}
|
|
1070
1064
|
combined_geojson['features'].extend(g_json['features'])
|
|
1071
|
-
"""
|
|
1072
|
-
if len(g_json['features'])>0:
|
|
1073
|
-
for idx, i in enumerate(all_geo_list[all_names.index(name)]['features']):
|
|
1074
|
-
if i['geometry'] in feature_geos:
|
|
1075
|
-
filter_reference_list[name][len(combined_geojson['features'])] = idx
|
|
1076
|
-
combined_geojson['features'].append(g_json['features'][feature_geos.index(i['geometry'])])
|
|
1077
|
-
"""
|
|
1078
1065
|
|
|
1079
1066
|
# Going through property filters:
|
|
1080
1067
|
if len(filter_list)>0:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|