openms-insight 0.1.12__py3-none-any.whl → 0.1.13__py3-none-any.whl
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.
- openms_insight/components/table.py +30 -9
- {openms_insight-0.1.12.dist-info → openms_insight-0.1.13.dist-info}/METADATA +1 -1
- {openms_insight-0.1.12.dist-info → openms_insight-0.1.13.dist-info}/RECORD +5 -5
- {openms_insight-0.1.12.dist-info → openms_insight-0.1.13.dist-info}/WHEEL +0 -0
- {openms_insight-0.1.12.dist-info → openms_insight-0.1.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -769,13 +769,33 @@ class Table(BaseComponent):
|
|
|
769
769
|
should_navigate = True
|
|
770
770
|
|
|
771
771
|
if should_navigate:
|
|
772
|
-
for
|
|
773
|
-
|
|
772
|
+
# PRIORITY: Use index_field for navigation if available
|
|
773
|
+
# index_field is guaranteed unique, so we get the correct row position
|
|
774
|
+
# Find the interactivity identifier that maps to index_field column
|
|
775
|
+
nav_identifier = None
|
|
776
|
+
nav_column = None
|
|
777
|
+
if self._index_field:
|
|
778
|
+
for ident, col in self._interactivity.items():
|
|
779
|
+
if col == self._index_field:
|
|
780
|
+
nav_identifier = ident
|
|
781
|
+
nav_column = col
|
|
782
|
+
break
|
|
783
|
+
|
|
784
|
+
# Fall back to first interactivity identifier if no index_field match
|
|
785
|
+
if nav_identifier is None:
|
|
786
|
+
for ident, col in self._interactivity.items():
|
|
787
|
+
if state.get(ident) is not None:
|
|
788
|
+
nav_identifier = ident
|
|
789
|
+
nav_column = col
|
|
790
|
+
break
|
|
791
|
+
|
|
792
|
+
if nav_identifier is not None and nav_column is not None:
|
|
793
|
+
selected_value = state.get(nav_identifier)
|
|
774
794
|
if selected_value is not None:
|
|
775
795
|
# Type conversion based on column dtype (same logic as go-to)
|
|
776
796
|
schema = data.collect_schema()
|
|
777
|
-
if
|
|
778
|
-
col_dtype = schema[
|
|
797
|
+
if nav_column in schema:
|
|
798
|
+
col_dtype = schema[nav_column]
|
|
779
799
|
if col_dtype in NUMERIC_DTYPES:
|
|
780
800
|
# Column is numeric - convert value to numeric if possible
|
|
781
801
|
if isinstance(selected_value, str):
|
|
@@ -799,7 +819,7 @@ class Table(BaseComponent):
|
|
|
799
819
|
# with_row_index adds position so we know which page it's on
|
|
800
820
|
search_result = (
|
|
801
821
|
data.with_row_index("_row_num")
|
|
802
|
-
.filter(pl.col(
|
|
822
|
+
.filter(pl.col(nav_column) == selected_value)
|
|
803
823
|
.select("_row_num")
|
|
804
824
|
.head(1)
|
|
805
825
|
.collect()
|
|
@@ -831,10 +851,10 @@ class Table(BaseComponent):
|
|
|
831
851
|
# Update selection to first row's value AND set page to 1
|
|
832
852
|
if sort_filter_changed and not selection_changed:
|
|
833
853
|
first_row_result = (
|
|
834
|
-
data.select(pl.col(
|
|
854
|
+
data.select(pl.col(nav_column)).head(1).collect()
|
|
835
855
|
)
|
|
836
856
|
if len(first_row_result) > 0:
|
|
837
|
-
first_value = first_row_result[
|
|
857
|
+
first_value = first_row_result[nav_column][0]
|
|
838
858
|
if hasattr(first_value, "item"):
|
|
839
859
|
first_value = first_value.item()
|
|
840
860
|
|
|
@@ -845,7 +865,9 @@ class Table(BaseComponent):
|
|
|
845
865
|
state_manager = get_default_state_manager()
|
|
846
866
|
|
|
847
867
|
# Update selection to first row
|
|
848
|
-
state_manager.set_selection(
|
|
868
|
+
state_manager.set_selection(
|
|
869
|
+
nav_identifier, first_value
|
|
870
|
+
)
|
|
849
871
|
|
|
850
872
|
# Update pagination state to page 1
|
|
851
873
|
updated_pagination = {
|
|
@@ -856,7 +878,6 @@ class Table(BaseComponent):
|
|
|
856
878
|
self._pagination_identifier, updated_pagination
|
|
857
879
|
)
|
|
858
880
|
page = 1 # Use page 1 for slicing
|
|
859
|
-
break
|
|
860
881
|
|
|
861
882
|
# Clamp page to valid range
|
|
862
883
|
page = max(1, min(page, total_pages))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openms-insight
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.13
|
|
4
4
|
Summary: Interactive visualization components for mass spectrometry data in Streamlit
|
|
5
5
|
Project-URL: Homepage, https://github.com/t0mdavid-m/OpenMS-Insight
|
|
6
6
|
Project-URL: Documentation, https://github.com/t0mdavid-m/OpenMS-Insight#readme
|
|
@@ -3,7 +3,7 @@ openms_insight/components/__init__.py,sha256=Lcg-D0FILta-YVgMJBlWMKLKC5G5kXOqdy9
|
|
|
3
3
|
openms_insight/components/heatmap.py,sha256=Yek06-TCDformcR42VeUCu0d7WDtRQPCpNQ5kOnfv5w,48372
|
|
4
4
|
openms_insight/components/lineplot.py,sha256=I-JPvDzCr3Nu8Boc1V4D8QQ1bHgTqvM6CbeoIe7zJ-s,30896
|
|
5
5
|
openms_insight/components/sequenceview.py,sha256=ufvtzuU9zaAybsT3pqfqIR0ZHCl7dKJ-jk3kwJALr54,31241
|
|
6
|
-
openms_insight/components/table.py,sha256=
|
|
6
|
+
openms_insight/components/table.py,sha256=XqlScEFCEnudx5ZUqbxLaxm_C3MCpKbuGo7obNWjWPk,43807
|
|
7
7
|
openms_insight/components/volcanoplot.py,sha256=F-cmYxJMKXVK-aYJpifp8be7nB8hkQd2kLi9DrBElD8,15155
|
|
8
8
|
openms_insight/core/__init__.py,sha256=EPjKX_FFQRgO8mWHs59I-o0BiuzEMzEU1Pfu9YOfLC4,338
|
|
9
9
|
openms_insight/core/base.py,sha256=h0OaubHLky8mk7Yfy3HTIimsz-DfuNRgLfotJu3pZVw,20517
|
|
@@ -24,7 +24,7 @@ openms_insight/js-component/dist/assets/materialdesignicons-webfont.eot,sha256=C
|
|
|
24
24
|
openms_insight/js-component/dist/assets/materialdesignicons-webfont.ttf,sha256=YeirpaTpgf4iz3yOi82-oAR251xiw38Bv37jM2HWhCg,1307660
|
|
25
25
|
openms_insight/js-component/dist/assets/materialdesignicons-webfont.woff,sha256=pZKKDVwvYk5G-Y2bFcL2AEU3f3xZTdeKF1kTLqO0Y-s,587984
|
|
26
26
|
openms_insight/js-component/dist/assets/materialdesignicons-webfont.woff2,sha256=Zi_vqPL4qVwYWI0hd0eJwQfGTnccvmWmmvRikcQxGvw,403216
|
|
27
|
-
openms_insight-0.1.
|
|
28
|
-
openms_insight-0.1.
|
|
29
|
-
openms_insight-0.1.
|
|
30
|
-
openms_insight-0.1.
|
|
27
|
+
openms_insight-0.1.13.dist-info/METADATA,sha256=R9XrufvoT8XhAodWID2x0IvJ46QsxzOC0NqrkaE1n8U,17708
|
|
28
|
+
openms_insight-0.1.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
29
|
+
openms_insight-0.1.13.dist-info/licenses/LICENSE,sha256=INFF4rOMmpah7Oi14hLqu7NTOsx56KRRNChAAUcfh2E,1823
|
|
30
|
+
openms_insight-0.1.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|