segger.validation¶
This module handles validation utilities for the Segger tool.
Submodules¶
API Documentation¶
annotate_query_with_reference ¶
annotate_query_with_reference(reference_adata, query_adata, transfer_column)
Annotate query AnnData object using a scRNA-seq reference atlas.
- reference_adata: ad.AnnData Reference AnnData object containing the scRNA-seq atlas data.
- query_adata: ad.AnnData Query AnnData object containing the data to be annotated.
- transfer_column: str
The name of the column in the reference atlas's
obs
to transfer to the query dataset.
- query_adata: ad.AnnData Annotated query AnnData object with transferred labels and UMAP coordinates from the reference.
Source code in src/segger/validation/utils.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
|
calculate_contamination ¶
calculate_contamination(adata, markers, radius=15, n_neighs=10, celltype_column='celltype_major', num_cells=10000)
Calculate normalized contamination from neighboring cells of different cell types based on positive markers.
- adata: ad.AnnData Annotated data object with raw counts and cell type information.
- markers: dict Dictionary where keys are cell types and values are dictionaries containing: 'positive': list of top x% highly expressed genes 'negative': list of top x% lowly expressed genes.
- radius: float, default=15 Radius for spatial neighbor calculation.
- n_neighs: int, default=10 Maximum number of neighbors to consider.
- celltype_column: str, default='celltype_major' Column name in the AnnData object representing cell types.
- num_cells: int, default=10000 Number of cells to randomly select for the calculation.
- contamination_df: pd.DataFrame DataFrame containing the normalized level of contamination from each cell type to each other cell type.
Source code in src/segger/validation/utils.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
|
calculate_sensitivity ¶
calculate_sensitivity(adata, purified_markers, max_cells_per_type=1000)
Calculate the sensitivity of the purified markers for each cell type.
- adata: AnnData Annotated data object containing gene expression data.
- purified_markers: dict Dictionary where keys are cell types and values are lists of purified marker genes.
- max_cells_per_type: int, default=1000 Maximum number of cells to consider per cell type.
- sensitivity_results: dict Dictionary with cell types as keys and lists of sensitivity values for each cell.
Source code in src/segger/validation/utils.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
|
compute_MECR ¶
compute_MECR(adata, gene_pairs)
Compute the Mutually Exclusive Co-expression Rate (MECR) for each gene pair in an AnnData object.
- adata: AnnData Annotated data object containing gene expression data.
- gene_pairs: List[Tuple[str, str]] List of tuples representing gene pairs to evaluate.
- mecr_dict: Dict[Tuple[str, str], float] Dictionary where keys are gene pairs (tuples) and values are MECR values.
Source code in src/segger/validation/utils.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
compute_clustering_scores ¶
compute_clustering_scores(adata, cell_type_column='celltype_major', use_pca=True)
Compute the Calinski-Harabasz and Silhouette scores for an AnnData object based on the assigned cell types.
- adata: AnnData Annotated data object containing gene expression data and cell type assignments.
- cell_type_column: str, default='celltype_major'
Column name in
adata.obs
that specifies cell types. - use_pca: bool, default=True Whether to use PCA components as features. If False, use the raw data.
- ch_score: float The Calinski-Harabasz score.
- sh_score: float The Silhouette score.
Source code in src/segger/validation/utils.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
compute_neighborhood_metrics ¶
compute_neighborhood_metrics(adata, radius=10, celltype_column='celltype_major', n_neighs=20, subset_size=10000)
Compute neighborhood entropy and number of neighbors for each cell in the AnnData object.
- adata: AnnData Annotated data object containing spatial information and cell type assignments.
- radius: int, default=10 Radius for spatial neighbor calculation.
- celltype_column: str, default='celltype_major'
Column name in
adata.obs
that specifies cell types.
Source code in src/segger/validation/utils.py
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
|
compute_quantized_mecr_area ¶
compute_quantized_mecr_area(adata, gene_pairs, quantiles=10)
Compute the average MECR, variance of MECR, and average cell area for quantiles of cell areas.
- adata: AnnData Annotated data object containing gene expression data.
- gene_pairs: List[Tuple[str, str]] List of tuples representing gene pairs to evaluate.
- quantiles: int, default=10 Number of quantiles to divide the data into.
- quantized_data: pd.DataFrame DataFrame containing quantile information, average MECR, variance of MECR, average area, and number of cells.
Source code in src/segger/validation/utils.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
|
compute_quantized_mecr_counts ¶
compute_quantized_mecr_counts(adata, gene_pairs, quantiles=10)
Compute the average MECR, variance of MECR, and average transcript counts for quantiles of transcript counts.
- adata: AnnData Annotated data object containing gene expression data.
- gene_pairs: List[Tuple[str, str]] List of tuples representing gene pairs to evaluate.
- quantiles: int, default=10 Number of quantiles to divide the data into.
- quantized_data: pd.DataFrame DataFrame containing quantile information, average MECR, variance of MECR, average counts, and number of cells.
Source code in src/segger/validation/utils.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
|
compute_transcript_density ¶
compute_transcript_density(adata)
Compute the transcript density for each cell in the AnnData object.
- adata: AnnData Annotated data object containing transcript and cell area information.
Source code in src/segger/validation/utils.py
448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
draw_umap ¶
draw_umap(adata, column='leiden')
Draw UMAP plots for the given AnnData object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
AnnData
|
The AnnData object containing the data. |
required |
column |
str
|
The column to color the UMAP plot by. |
'leiden'
|
Source code in src/segger/validation/xenium_explorer.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
find_markers ¶
find_markers(adata, cell_type_column, pos_percentile=5, neg_percentile=10, percentage=50)
Identify positive and negative markers for each cell type based on gene expression and filter by expression percentage.
- adata: AnnData Annotated data object containing gene expression data.
- cell_type_column: str
Column name in
adata.obs
that specifies cell types. - pos_percentile: float, default=5 Percentile threshold to determine top x% expressed genes.
- neg_percentile: float, default=10 Percentile threshold to determine top x% lowly expressed genes.
- percentage: float, default=50 Minimum percentage of cells expressing the marker within a cell type for it to be considered.
- markers: dict Dictionary where keys are cell types and values are dictionaries containing: 'positive': list of top x% highly expressed genes 'negative': list of top x% lowly expressed genes.
Source code in src/segger/validation/utils.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
find_mutually_exclusive_genes ¶
find_mutually_exclusive_genes(adata, markers, cell_type_column)
Identify mutually exclusive genes based on expression criteria.
- adata: AnnData Annotated data object containing gene expression data.
- markers: dict Dictionary where keys are cell types and values are dictionaries containing: 'positive': list of top x% highly expressed genes 'negative': list of top x% lowly expressed genes.
- cell_type_column: str
Column name in
adata.obs
that specifies cell types.
- exclusive_pairs: list List of mutually exclusive gene pairs.
Source code in src/segger/validation/utils.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
generate_experiment_file ¶
generate_experiment_file(template_path, output_path, cells_name='seg_cells', analysis_name='seg_analysis')
Generate the experiment file for Xenium.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
template_path |
str
|
The path to the template file. |
required |
output_path |
str
|
The path to the output file. |
required |
cells_name |
str
|
The name of the cells file. |
'seg_cells'
|
analysis_name |
str
|
The name of the analysis file. |
'seg_analysis'
|
Source code in src/segger/validation/xenium_explorer.py
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
|
get_flatten_version ¶
get_flatten_version(polygons, max_value=21)
Get the flattened version of polygon vertices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygons |
List[ndarray]
|
List of polygon vertices. |
required |
max_value |
int
|
The maximum number of vertices to keep. |
21
|
Returns:
Type | Description |
---|---|
ndarray
|
np.ndarray: The flattened array of polygon vertices. |
Source code in src/segger/validation/xenium_explorer.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
|
get_indices_indptr ¶
get_indices_indptr(input_array)
Get the indices and indptr arrays for sparse matrix representation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_array |
ndarray
|
The input array containing cluster labels. |
required |
Returns:
Type | Description |
---|---|
Tuple[ndarray, ndarray]
|
Tuple[np.ndarray, np.ndarray]: The indices and indptr arrays. |
Source code in src/segger/validation/xenium_explorer.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
get_leiden_umap ¶
get_leiden_umap(adata, draw=False)
Perform Leiden clustering and UMAP visualization on the given AnnData object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
AnnData
|
The AnnData object containing the data. |
required |
draw |
bool
|
Whether to draw the UMAP plots. |
False
|
Returns:
Name | Type | Description |
---|---|---|
AnnData |
The AnnData object with Leiden clustering and UMAP results. |
Source code in src/segger/validation/xenium_explorer.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
get_median_expression_table ¶
get_median_expression_table(adata, column='leiden')
Get the median expression table for the given AnnData object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
AnnData
|
The AnnData object containing the data. |
required |
column |
str
|
The column to group by. |
'leiden'
|
Returns:
Type | Description |
---|---|
DataFrame
|
pd.DataFrame: The median expression table. |
Source code in src/segger/validation/xenium_explorer.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
load_segmentations ¶
load_segmentations(segmentation_paths)
Load segmentation data from provided paths and handle special cases like separating 'segger' into 'segger_n0' and 'segger_n1'.
Args: segmentation_paths (Dict[str, Path]): Dictionary mapping segmentation method names to their file paths.
Returns: Dict[str, sc.AnnData]: Dictionary mapping segmentation method names to loaded AnnData objects.
Source code in src/segger/validation/utils.py
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 |
|
plot_cell_area ¶
plot_cell_area(segmentations_dict, output_path, palette)
Plot the cell area (log2) for each segmentation method.
Args: segmentations_dict (Dict[str, sc.AnnData]): Dictionary mapping segmentation method names to loaded AnnData objects. output_path (Path): Path to the directory where the plot will be saved.
Source code in src/segger/validation/utils.py
757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 |
|
plot_cell_counts ¶
plot_cell_counts(segmentations_dict, output_path, palette)
Plot the number of cells per segmentation method.
Args: segmentations_dict (Dict[str, sc.AnnData]): Dictionary mapping segmentation method names to loaded AnnData objects. output_path (Path): Path to the directory where the plot will be saved.
Source code in src/segger/validation/utils.py
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 |
|
plot_contamination_boxplots ¶
plot_contamination_boxplots(boxplot_data, output_path, palette)
Plot boxplots for contamination values across different segmentation methods.
Args: boxplot_data (pd.DataFrame): DataFrame containing contamination data for all segmentation methods. output_path (Path): Path to the directory where the plot will be saved. palette (Dict[str, str]): Dictionary mapping segmentation method names to color codes.
Source code in src/segger/validation/utils.py
994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 |
|
plot_contamination_results ¶
plot_contamination_results(contamination_results, output_path, palette)
Plot contamination results for each segmentation method.
Args: contamination_results (Dict[str, pd.DataFrame]): Dictionary of contamination data for each segmentation method. output_path (Path): Path to the directory where the plot will be saved. palette (Dict[str, str]): Dictionary mapping segmentation method names to color codes.
Source code in src/segger/validation/utils.py
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 |
|
plot_counts_per_cell ¶
plot_counts_per_cell(segmentations_dict, output_path, palette)
Plot the counts per cell (log2) for each segmentation method.
Args: segmentations_dict (Dict[str, sc.AnnData]): Dictionary mapping segmentation method names to loaded AnnData objects. output_path (Path): Path to the directory where the plot will be saved.
Source code in src/segger/validation/utils.py
721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 |
|
plot_entropy_boxplots ¶
plot_entropy_boxplots(entropy_boxplot_data, output_path, palette)
Plot boxplots for neighborhood entropy across different segmentation methods by cell type.
Args: entropy_boxplot_data (pd.DataFrame): DataFrame containing neighborhood entropy data for all segmentation methods. output_path (Path): Path to the directory where the plot will be saved. palette (Dict[str, str]): Dictionary mapping segmentation method names to color codes.
Source code in src/segger/validation/utils.py
1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
|
plot_gene_counts ¶
plot_gene_counts(segmentations_dict, output_path, palette)
Plot the normalized gene counts for each segmentation method.
Args: segmentations_dict (Dict[str, sc.AnnData]): Dictionary mapping segmentation method names to loaded AnnData objects. output_path (Path): Path to the directory where the plot will be saved.
Source code in src/segger/validation/utils.py
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 |
|
plot_general_statistics_plots ¶
plot_general_statistics_plots(segmentations_dict, output_path, palette)
Create a summary plot with all the general statistics subplots.
Args: segmentations_dict (Dict[str, sc.AnnData]): Dictionary mapping segmentation method names to loaded AnnData objects. output_path (Path): Path to the directory where the summary plot will be saved.
Source code in src/segger/validation/utils.py
836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
|
plot_mecr_results ¶
plot_mecr_results(mecr_results, output_path, palette)
Plot the MECR (Mutually Exclusive Co-expression Rate) results for each segmentation method.
Args: mecr_results (Dict[str, Dict[Tuple[str, str], float]]): Dictionary of MECR results for each segmentation method. output_path (Path): Path to the directory where the plot will be saved. palette (Dict[str, str]): Dictionary mapping segmentation method names to color codes.
Source code in src/segger/validation/utils.py
867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
|
plot_metric_comparison ¶
plot_metric_comparison(ax, data, metric, label, method1, method2)
Plot a comparison of a specific metric between two methods.
- ax: plt.Axes Matplotlib axis to plot on.
- data: pd.DataFrame DataFrame containing the data for plotting.
- metric: str The metric to compare.
- label: str Label for the metric.
- method1: str The first method to compare.
- method2: str The second method to compare.
Source code in src/segger/validation/utils.py
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 |
|
plot_percent_assigned ¶
plot_percent_assigned(segmentations_dict, output_path, palette)
Plot the percentage of assigned transcripts (normalized) for each segmentation method.
Args: segmentations_dict (Dict[str, sc.AnnData]): Dictionary mapping segmentation method names to loaded AnnData objects. output_path (Path): Path to the directory where the plot will be saved.
Source code in src/segger/validation/utils.py
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
|
plot_quantized_mecr_area ¶
plot_quantized_mecr_area(quantized_mecr_area, output_path, palette)
Plot the quantized MECR values against cell areas for each segmentation method, with point size proportional to the variance of MECR.
Args: quantized_mecr_area (Dict[str, pd.DataFrame]): Dictionary of quantized MECR area data for each segmentation method. output_path (Path): Path to the directory where the plot will be saved. palette (Dict[str, str]): Dictionary mapping segmentation method names to color codes.
Source code in src/segger/validation/utils.py
935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
|
plot_quantized_mecr_counts ¶
plot_quantized_mecr_counts(quantized_mecr_counts, output_path, palette)
Plot the quantized MECR values against transcript counts for each segmentation method, with point size proportional to the variance of MECR.
Args: quantized_mecr_counts (Dict[str, pd.DataFrame]): Dictionary of quantized MECR count data for each segmentation method. output_path (Path): Path to the directory where the plot will be saved. palette (Dict[str, str]): Dictionary mapping segmentation method names to color codes.
Source code in src/segger/validation/utils.py
897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 |
|
plot_sensitivity_boxplots ¶
plot_sensitivity_boxplots(sensitivity_boxplot_data, output_path, palette)
Plot boxplots for sensitivity across different segmentation methods by cell type. Args: sensitivity_boxplot_data (pd.DataFrame): DataFrame containing sensitivity data for all segmentation methods. output_path (Path): Path to the directory where the plot will be saved. palette (Dict[str, str]): Dictionary mapping segmentation method names to color codes.
Source code in src/segger/validation/utils.py
1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 |
|
plot_transcript_density ¶
plot_transcript_density(segmentations_dict, output_path, palette)
Plot the transcript density (log2) for each segmentation method.
Args: segmentations_dict (Dict[str, sc.AnnData]): Dictionary mapping segmentation method names to loaded AnnData objects. output_path (Path): Path to the directory where the plot will be saved.
Source code in src/segger/validation/utils.py
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
|
plot_umaps_with_scores ¶
plot_umaps_with_scores(segmentations_dict, clustering_scores, output_path, palette)
Plot UMAPs colored by cell type for each segmentation method and display clustering scores in the title. Args: segmentations_dict (Dict[str, AnnData]): Dictionary of AnnData objects for each segmentation method. clustering_scores (Dict[str, Tuple[float, float]]): Dictionary of clustering scores for each method. output_path (Path): Path to the directory where the plots will be saved. palette (Dict[str, str]): Dictionary mapping segmentation method names to color codes.
Source code in src/segger/validation/utils.py
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 |
|
save_cell_clustering ¶
save_cell_clustering(merged, zarr_path, columns)
Save cell clustering information to a Zarr file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
merged |
DataFrame
|
The merged dataframe containing cell clustering information. |
required |
zarr_path |
str
|
The path to the Zarr file. |
required |
columns |
List[str]
|
The list of columns to save. |
required |
Source code in src/segger/validation/xenium_explorer.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
seg2explorer ¶
seg2explorer(seg_df, source_path, output_dir, cells_filename='seg_cells', analysis_filename='seg_analysis', xenium_filename='seg_experiment.xenium', analysis_df=None, draw=False, cell_id_columns='seg_cell_id', area_low=10, area_high=100)
Convert seg output to a format compatible with Xenium explorer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seg_df |
DataFrame
|
The seg DataFrame. |
required |
source_path |
str
|
The source path. |
required |
output_dir |
str
|
The output directory. |
required |
cells_filename |
str
|
The filename for cells. |
'seg_cells'
|
analysis_filename |
str
|
The filename for analysis. |
'seg_analysis'
|
xenium_filename |
str
|
The filename for Xenium. |
'seg_experiment.xenium'
|
analysis_df |
Optional[DataFrame]
|
The analysis DataFrame. |
None
|
draw |
bool
|
Whether to draw the plots. |
False
|
cell_id_columns |
str
|
The cell ID columns. |
'seg_cell_id'
|
area_low |
float
|
The lower area threshold. |
10
|
area_high |
float
|
The upper area threshold. |
100
|
Source code in src/segger/validation/xenium_explorer.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
|
str_to_uint32 ¶
str_to_uint32(cell_id_str)
Convert a string cell ID back to uint32 format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cell_id_str |
str
|
The cell ID in string format. |
required |
Returns:
Type | Description |
---|---|
Tuple[int, int]
|
Tuple[int, int]: The cell ID in uint32 format and the dataset suffix. |
Source code in src/segger/validation/xenium_explorer.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|