fusion-tools 2.2.2__tar.gz → 2.2.3__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.2 → fusion_tools-2.2.3}/PKG-INFO +1 -1
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/setup.py +1 -1
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/components/segmentation.py +16 -10
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools.egg-info/PKG-INFO +1 -1
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/LICENSE +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/README.md +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/pyproject.toml +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/setup.cfg +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/__init__.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/components/__init__.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/components/maps.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/components/tools.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/dataset.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/feature_extraction.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/handler.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/tileserver.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/utils/__init__.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/utils/omics.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/utils/shapes.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/utils/stats.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/visualization/__init__.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/visualization/components.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools/visualization/vis_utils.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools.egg-info/SOURCES.txt +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools.egg-info/dependency_links.txt +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools.egg-info/requires.txt +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/src/fusion_tools.egg-info/top_level.txt +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_classification_model.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_custom_component.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_dataset_classes.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_extract_nested_prop.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_feature_annotation.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_feature_extraction.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_generate_property_dict.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_get_gene_info.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_hra_viewer.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_image_overlay.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_model_train.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_multiframe_rgb.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_multiframeslidemap.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_property_plotter.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_read_anndata.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_remote_slide_annotations.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_remote_tileserver.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_segmentation.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_slide_annotations.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_spatial_aggregation.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/tests/test_tile_server.py +0 -0
- {fusion_tools-2.2.2 → fusion_tools-2.2.3}/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.3",
|
|
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",
|
|
@@ -1258,7 +1258,8 @@ class BulkLabels(Tool):
|
|
|
1258
1258
|
State({'type': 'bulk-labels-include-structures','index': ALL},'value'),
|
|
1259
1259
|
State({'type': 'bulk-labels-add-property-div','index': ALL},'children'),
|
|
1260
1260
|
State({'type':'bulk-labels-spatial-query-div','index': ALL},'children'),
|
|
1261
|
-
State({'type': 'map-annotations-store','index': ALL},'data')
|
|
1261
|
+
State({'type': 'map-annotations-store','index': ALL},'data'),
|
|
1262
|
+
State({'type': 'map-slide-information','index': ALL},'data')
|
|
1262
1263
|
]
|
|
1263
1264
|
)(self.update_label_structures)
|
|
1264
1265
|
|
|
@@ -1316,7 +1317,8 @@ class BulkLabels(Tool):
|
|
|
1316
1317
|
State({'type': 'bulk-labels-label-rationale','index': ALL},'value'),
|
|
1317
1318
|
State({'type': 'bulk-labels-label-source','index': ALL},'children'),
|
|
1318
1319
|
State({'type': 'bulk-labels-label-method','index': ALL},'value'),
|
|
1319
|
-
State({'type': 'map-annotations-store','index': ALL},'data')
|
|
1320
|
+
State({'type': 'map-annotations-store','index': ALL},'data'),
|
|
1321
|
+
State({'type':'map-slide-information','index':ALL},'data')
|
|
1320
1322
|
]
|
|
1321
1323
|
)(self.apply_labels)
|
|
1322
1324
|
|
|
@@ -1592,7 +1594,7 @@ class BulkLabels(Tool):
|
|
|
1592
1594
|
|
|
1593
1595
|
return processed_filters
|
|
1594
1596
|
|
|
1595
|
-
def parse_spatial_divs(self, spatial_query_parent: list)->list:
|
|
1597
|
+
def parse_spatial_divs(self, spatial_query_parent: list, slide_information:dict)->list:
|
|
1596
1598
|
"""Parsing through parent div containing all spatial queries and returning them in list form
|
|
1597
1599
|
|
|
1598
1600
|
:param spatial_query_parent: Div containing spatial query child divs
|
|
@@ -1601,6 +1603,7 @@ class BulkLabels(Tool):
|
|
|
1601
1603
|
:rtype: list
|
|
1602
1604
|
"""
|
|
1603
1605
|
processed_queries = []
|
|
1606
|
+
x_scale = slide_information['x_scale']
|
|
1604
1607
|
if not spatial_query_parent is None:
|
|
1605
1608
|
for div in spatial_query_parent:
|
|
1606
1609
|
div_children = div['props']['children'][0]['props']['children']
|
|
@@ -1622,12 +1625,12 @@ class BulkLabels(Tool):
|
|
|
1622
1625
|
processed_queries.append({
|
|
1623
1626
|
'type': query_type,
|
|
1624
1627
|
'structure': query_structure,
|
|
1625
|
-
'distance': query_distance*
|
|
1628
|
+
'distance': query_distance*x_scale
|
|
1626
1629
|
})
|
|
1627
1630
|
|
|
1628
1631
|
return processed_queries
|
|
1629
1632
|
|
|
1630
|
-
def update_label_structures(self, update_structures_click:list, include_structures:list, filter_properties:list, spatial_queries:list, current_features:list):
|
|
1633
|
+
def update_label_structures(self, update_structures_click:list, include_structures:list, filter_properties:list, spatial_queries:list, current_features:list, slide_information:list):
|
|
1631
1634
|
"""Go through current structures and return all those that pass spatial and property filters.
|
|
1632
1635
|
|
|
1633
1636
|
:param update_structures_click: Button clicked
|
|
@@ -1650,11 +1653,13 @@ class BulkLabels(Tool):
|
|
|
1650
1653
|
include_structures = get_pattern_matching_value(include_structures)
|
|
1651
1654
|
current_features = json.loads(get_pattern_matching_value(current_features))
|
|
1652
1655
|
|
|
1656
|
+
slide_information = json.loads(get_pattern_matching_value(slide_information))
|
|
1657
|
+
|
|
1653
1658
|
include_properties = get_pattern_matching_value(filter_properties)
|
|
1654
1659
|
spatial_queries = get_pattern_matching_value(spatial_queries)
|
|
1655
1660
|
|
|
1656
1661
|
processed_filters = self.parse_filter_divs(include_properties)
|
|
1657
|
-
processed_spatial_queries = self.parse_spatial_divs(spatial_queries)
|
|
1662
|
+
processed_spatial_queries = self.parse_spatial_divs(spatial_queries, slide_information)
|
|
1658
1663
|
|
|
1659
1664
|
filtered_geojson, filtered_ref_list = process_filters_queries(processed_filters, processed_spatial_queries, include_structures, current_features)
|
|
1660
1665
|
|
|
@@ -1823,7 +1828,7 @@ class BulkLabels(Tool):
|
|
|
1823
1828
|
|
|
1824
1829
|
return values_selector
|
|
1825
1830
|
|
|
1826
|
-
def parse_marker_div(self, parent_marker_div):
|
|
1831
|
+
def parse_marker_div(self, parent_marker_div,slide_information):
|
|
1827
1832
|
"""Parse div containing markers, extracting position and data from each
|
|
1828
1833
|
|
|
1829
1834
|
:param parent_marker_div: Div containing all current Markers
|
|
@@ -1839,7 +1844,7 @@ class BulkLabels(Tool):
|
|
|
1839
1844
|
data = json.loads(p['props']['children'][-1]['props']['children'])
|
|
1840
1845
|
|
|
1841
1846
|
marker_coords.append(
|
|
1842
|
-
[coords[1]/
|
|
1847
|
+
[coords[1]/slide_information['x_scale'],coords[0]/slide_information['y_scale']]
|
|
1843
1848
|
)
|
|
1844
1849
|
marker_data.append(data)
|
|
1845
1850
|
|
|
@@ -1914,7 +1919,7 @@ class BulkLabels(Tool):
|
|
|
1914
1919
|
|
|
1915
1920
|
return current_labels
|
|
1916
1921
|
|
|
1917
|
-
def apply_labels(self, button_click, current_markers, current_data, label_type, label_text, label_rationale, label_source, label_method, current_annotations):
|
|
1922
|
+
def apply_labels(self, button_click, current_markers, current_data, label_type, label_text, label_rationale, label_source, label_method, current_annotations,slide_information):
|
|
1918
1923
|
"""Applying current label to marked structures
|
|
1919
1924
|
|
|
1920
1925
|
:param button_click: Button clicked
|
|
@@ -1954,8 +1959,9 @@ class BulkLabels(Tool):
|
|
|
1954
1959
|
current_data = json.loads(get_pattern_matching_value(current_data))
|
|
1955
1960
|
current_annotations = json.loads(get_pattern_matching_value(current_annotations))
|
|
1956
1961
|
current_markers = get_pattern_matching_value(current_markers)
|
|
1962
|
+
slide_information = json.loads(get_pattern_matching_value(slide_information))
|
|
1957
1963
|
|
|
1958
|
-
marker_positions, marker_data = self.parse_marker_div(current_markers)
|
|
1964
|
+
marker_positions, marker_data = self.parse_marker_div(current_markers,slide_information)
|
|
1959
1965
|
labeled_items = self.search_labels(marker_positions, current_data, label_type, label_text, label_method)
|
|
1960
1966
|
|
|
1961
1967
|
#TODO: Applying property to structures
|
|
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
|
|
File without changes
|
|
File without changes
|