├── .DS_Store ├── LICENSE ├── README.md ├── data ├── .DS_Store ├── 1.2_E2 │ └── 1.2_E2_celltype_area.csv ├── 1.2_F3 │ └── 1.2_F3_celltype_area.csv ├── 1.5_B2 │ └── 1.5_B2_celltype_area.csv └── Subburst_Chart_data.csv ├── img ├── .DS_Store ├── Fig 1.jpg ├── Fig 2.jpg └── Fig 3.jpg ├── requirements.txt ├── result ├── 1.2_E2 │ ├── .DS_Store │ ├── 1.2_E2_cell_type_area.png │ ├── 1.2_E2_contours_list.pkl │ ├── 1.2_E2_core_Whole_Core_Contour.jpg │ ├── 1.2_E2_image_cell.csv │ ├── Process_text │ │ ├── 1.2_E2_B cell.jpg │ │ ├── 1.2_E2_Cytotoxic T cell.jpg │ │ ├── 1.2_E2_Dendritic cell.jpg │ │ ├── 1.2_E2_Endothelial cell.jpg │ │ ├── 1.2_E2_Macrophage.jpg │ │ ├── 1.2_E2_Macrophage_show.jpg │ │ ├── 1.2_E2_NK cell.jpg │ │ ├── 1.2_E2_NK-like T.jpg │ │ ├── 1.2_E2_NK-like_show.jpg │ │ ├── 1.2_E2_Neutrophil.jpg │ │ ├── 1.2_E2_SCLC_A_show.jpg │ │ ├── 1.2_E2_T helper.jpg │ │ ├── 1.2_E2_T other.jpg │ │ ├── 1.2_E2_T reg.jpg │ │ ├── 1.2_E2_Unclassified.jpg │ │ ├── 1.2_E2_cancer cell quadruple neg.jpg │ │ ├── 1.2_E2_cancer cell type1.jpg │ │ ├── 1.2_E2_cancer cell type2.jpg │ │ ├── 1.2_E2_cancer cell type4.jpg │ │ └── 1.2_E2_mixed tumor cell.jpg │ └── image │ │ ├── 1.2_E2_B cell.jpg │ │ ├── 1.2_E2_Cytotoxic T cell.jpg │ │ ├── 1.2_E2_Dendritic cell.jpg │ │ ├── 1.2_E2_Endothelial cell.jpg │ │ ├── 1.2_E2_Macrophage.jpg │ │ ├── 1.2_E2_NK cell.jpg │ │ ├── 1.2_E2_NK-like T.jpg │ │ ├── 1.2_E2_Neutrophil.jpg │ │ ├── 1.2_E2_T helper.jpg │ │ ├── 1.2_E2_T other.jpg │ │ ├── 1.2_E2_T reg.jpg │ │ ├── 1.2_E2_Unclassified.jpg │ │ ├── 1.2_E2_cancer cell quadruple neg.jpg │ │ ├── 1.2_E2_cancer cell type1.jpg │ │ ├── 1.2_E2_cancer cell type2.jpg │ │ ├── 1.2_E2_cancer cell type4.jpg │ │ └── 1.2_E2_mixed tumor cell.jpg ├── 1.2_F3 │ ├── .DS_Store │ ├── 1.2_F3_cell_type_area.png │ ├── 1.2_F3_contours_list.pkl │ ├── 1.2_F3_core_Whole_Core_Contour.jpg │ ├── 1.2_F3_image_cell.csv │ ├── Process_text │ │ ├── 1.2_F3_B cell.jpg │ │ ├── 1.2_F3_Cytotoxic T cell.jpg │ │ ├── 1.2_F3_Dendritic cell.jpg │ │ ├── 1.2_F3_Endothelial cell.jpg │ │ ├── 1.2_F3_Macrophage.jpg │ │ ├── 1.2_F3_Macrophage_show.jpg │ │ ├── 1.2_F3_NK cell.jpg │ │ ├── 1.2_F3_NK-like T.jpg │ │ ├── 1.2_F3_NK-like_show.jpg │ │ ├── 1.2_F3_Neutrophil.jpg │ │ ├── 1.2_F3_SCLC_A_show.jpg │ │ ├── 1.2_F3_T helper.jpg │ │ ├── 1.2_F3_T other.jpg │ │ ├── 1.2_F3_T reg.jpg │ │ ├── 1.2_F3_Unclassified.jpg │ │ ├── 1.2_F3_cancer cell quadruple neg.jpg │ │ ├── 1.2_F3_cancer cell type1.jpg │ │ ├── 1.2_F3_cancer cell type2.jpg │ │ ├── 1.2_F3_cancer cell type3.jpg │ │ ├── 1.2_F3_cancer cell type4.jpg │ │ └── 1.2_F3_mixed tumor cell.jpg │ └── image │ │ ├── 1.2_F3_B cell.jpg │ │ ├── 1.2_F3_Cytotoxic T cell.jpg │ │ ├── 1.2_F3_Dendritic cell.jpg │ │ ├── 1.2_F3_Endothelial cell.jpg │ │ ├── 1.2_F3_Macrophage.jpg │ │ ├── 1.2_F3_NK cell.jpg │ │ ├── 1.2_F3_NK-like T.jpg │ │ ├── 1.2_F3_Neutrophil.jpg │ │ ├── 1.2_F3_T helper.jpg │ │ ├── 1.2_F3_T other.jpg │ │ ├── 1.2_F3_T reg.jpg │ │ ├── 1.2_F3_Unclassified.jpg │ │ ├── 1.2_F3_cancer cell quadruple neg.jpg │ │ ├── 1.2_F3_cancer cell type1.jpg │ │ ├── 1.2_F3_cancer cell type2.jpg │ │ ├── 1.2_F3_cancer cell type3.jpg │ │ ├── 1.2_F3_cancer cell type4.jpg │ │ └── 1.2_F3_mixed tumor cell.jpg ├── 1.5_B2 │ ├── .DS_Store │ ├── 1.5_B2_cell_type_area.png │ ├── 1.5_B2_contours_list.pkl │ ├── 1.5_B2_core_Whole_Core_Contour.jpg │ ├── 1.5_B2_image_cell.csv │ ├── Process_text │ │ ├── 1.5_B2_B cell.jpg │ │ ├── 1.5_B2_Cytotoxic T cell.jpg │ │ ├── 1.5_B2_Dendritic cell.jpg │ │ ├── 1.5_B2_Endothelial cell.jpg │ │ ├── 1.5_B2_Macrophage.jpg │ │ ├── 1.5_B2_Macrophage_show.jpg │ │ ├── 1.5_B2_NK cell.jpg │ │ ├── 1.5_B2_NK-like T.jpg │ │ ├── 1.5_B2_NK-like_show.jpg │ │ ├── 1.5_B2_Neutrophil.jpg │ │ ├── 1.5_B2_SCLC_A_show.jpg │ │ ├── 1.5_B2_T helper.jpg │ │ ├── 1.5_B2_T other.jpg │ │ ├── 1.5_B2_T reg.jpg │ │ ├── 1.5_B2_Unclassified.jpg │ │ ├── 1.5_B2_cancer cell quadruple neg.jpg │ │ ├── 1.5_B2_cancer cell type1.jpg │ │ ├── 1.5_B2_cancer cell type4.jpg │ │ └── 1.5_B2_mixed tumor cell.jpg │ └── image │ │ ├── 1.5_B2_B cell.jpg │ │ ├── 1.5_B2_Cytotoxic T cell.jpg │ │ ├── 1.5_B2_Dendritic cell.jpg │ │ ├── 1.5_B2_Endothelial cell.jpg │ │ ├── 1.5_B2_Macrophage.jpg │ │ ├── 1.5_B2_NK cell.jpg │ │ ├── 1.5_B2_NK-like T.jpg │ │ ├── 1.5_B2_Neutrophil.jpg │ │ ├── 1.5_B2_T helper.jpg │ │ ├── 1.5_B2_T other.jpg │ │ ├── 1.5_B2_T reg.jpg │ │ ├── 1.5_B2_Unclassified.jpg │ │ ├── 1.5_B2_cancer cell quadruple neg.jpg │ │ ├── 1.5_B2_cancer cell type1.jpg │ │ ├── 1.5_B2_cancer cell type4.jpg │ │ └── 1.5_B2_mixed tumor cell.jpg ├── Subburst_Chart.html └── Subburst_Chart_files │ ├── crosstalk-1.2.1 │ ├── css │ │ └── crosstalk.min.css │ ├── js │ │ ├── crosstalk.js │ │ ├── crosstalk.js.map │ │ ├── crosstalk.min.js │ │ └── crosstalk.min.js.map │ └── scss │ │ └── crosstalk.scss │ ├── htmlwidgets-1.5.4 │ └── htmlwidgets.js │ ├── jquery-3.5.1 │ ├── jquery-AUTHORS.txt │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map │ ├── plotly-binding-4.10.3 │ └── plotly.js │ ├── plotly-htmlwidgets-css-2.11.1 │ └── plotly-htmlwidgets.css │ ├── plotly-main-2.11.1 │ └── plotly-latest.min.js │ └── typedarray-0.1 │ └── typedarray.min.js └── script ├── .DS_Store ├── Cell-cell_Pairwise_Interaction_Analysis.R ├── Cellular_Neighborhood_ldentification.py ├── Code_for_genomic_correlation.R ├── Colony_NK-like_T_show.py ├── Colony_SCLC-A_show.py ├── Colony_macrophage_show.py ├── Colony_recognition.py ├── Statistical_Analysis.R ├── Subburst_Chart.R └── cosmx_code.ipynb /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ColonyMap: A spatial cell colony analysis algorithm 2 | 3 | 4 | 5 |

6 | 7 | Fig 1 8 | 9 | 10 | 11 |
Fig1 : Schematic diagram of ColonyMap algorithm
12 | 13 |
14 |
15 | 16 | 17 | This repository includes codes and data example used in the 'Integrative Spatial Analysis Reveals Tumor Heterogeneity and Immune Colony Niche Related to Clinical-outcomes in Small Cell Lung Cancer' paper. 18 | 19 |
20 | 21 |
22 | 23 | ## Summary📖 24 | 25 | Structured cell colonies (CC) and dispersed cells within tissues exhibit distinctly different physiological functions. In situ CCs, coordinated with homogeneous cells, have proven to be invaluable for histopathological detection and diagnosis. Cell neighborhood method clustering cell composition to cell pattern (CN) by traversal small regional tissue. In contrast, the colony perspective excels at pinpointing intercellular boundary and interactions regions. To analyze cell colonies in CODEX data, we developed ColonyMap, a spatial cell colony analysis algorithm. 26 | 27 |

28 | 29 |
30 | 31 | ## Requirements🌸 32 | 33 | ●**Python (version 3.8.17)** 34 | 35 | - [ ] opencv package(version 4.5.1.48) 36 | 37 | - [ ] numpy package(version 1.24.3) 38 | 39 | - [ ] matplotlib package(version 3.7.1) 40 | 41 | - [ ] pickle package(version 4.0) 42 | 43 | ●**R (version version 4.3.1)** 44 | 45 | - [ ] spatstat (version 3.0_6) 46 | 47 |

48 | 49 | ☞ More details in **requirements.txt** 50 | 51 | 52 | 53 |

54 | 55 |
56 | 57 | ## Usage👻 58 | 59 | To run this analysis pipline, you need to first create a python virtual environment (Python : 3.8.17 & R : 4.3.1) where you can install all the required packages. If you are using the conda platform to create your virtual environment. These are the steps you need to follow. 60 | 61 |
62 | 63 | #### Virtual environment construction 64 | 65 | All operations are completed in your terminal. 66 | 67 | First, let us create the virtual environment with all packages: 68 | 69 | ``` 70 | conda create -n [virtual_environment_name] --file requirements.txt 71 | ``` 72 | 73 | Next, you need to activate the virtual environment: 74 | 75 | ``` 76 | conda activate [virtual_environment_name] 77 | ``` 78 | 79 | Once you have the `[virtual_environment_name]` ready, you can run all scripts! 80 | 81 |
82 | 83 | #### Script Description 84 | 85 | ●`Colony_recognition.py` is used to identify the colony contours of all cell types in the image, which is the cornerstone of subsequent analysis. So you need to run it first. 86 | 87 | ``` 88 | cd [your_path]/script 89 | ``` 90 | 91 | and then 92 | 93 | ``` 94 | python Colony_recognition.py "../data" 95 | ``` 96 | 97 | It takes approximately 20 seconds to identify the contours of all cell types on an image of approximately 40000 cells. (Computing machine: Macbook Air M1 core) 98 | 99 |

100 | 101 | ●`Colony_show.py` is used to display the spatial distribution of cellt colonies , such as macrophage colonies. 102 | 103 | ``` 104 | cd [your_path]/script 105 | ``` 106 | 107 | and then 108 | 109 | ``` 110 | python Colony_macrophage_show.py "../data" 111 | ``` 112 | 113 | It takes only 1 second to visualize the macrophage colonies on an image. (Computing machine: Macbook Air M1 core) 114 | 115 |
116 | 117 | 118 | 119 | Fig 2 120 | 121 | 122 | 123 |
Fig2 : Macrophage colonies (left) & SCLA-A cancer cell colonies (right)
124 | 125 |

126 | 127 | 128 | 129 | ●`Subburst_Chart.R` is used to visualize the strength of interactions between different cell colonies. 130 | 131 | ``` 132 | Rscript Subburst_Chart.R 133 | ``` 134 | 135 |
136 | 137 | 138 | 139 | Fig 3 140 | 141 |
Fig3 : The interaction intensity in different immune celltypes
142 | 143 |

144 | 145 | ☞ You can scan this file for dynamic click interaction [Subburst_Chart.html](result/Subburst_Chart.html) 146 | 147 | 148 | 149 | 150 | 151 |

152 | 153 | 154 | 155 | # Supplementary analysis pipeline 156 | 157 | ## Computational lmage Processing 158 | 159 | - Software:[qupath v0.3.2](Bankhead, P. et al. QuPath: Open source software for digital pathology image analysis. Scientific Reports (2017),https://doi.org/10.1038/s41598-017-17204-5.) 160 | 161 | - Methods: 162 | 163 | - Before initiating data analysis, quality control was performed on each individual image by visual assessment across the whole slide; each marker was qualitatively evaluated based on signal intensity compared with the background and for staining specificity. Other artifacts such as out-of-focus regions, tissue folding, and debris were manually annotated and excluded from the analysis. 164 | 165 | - Organize the segmentation using[Pixel classification — QuPath 0.5.1 documentation](https://qupath.readthedocs.io/en/stable/docs/tutorials/pixel_classification.html). First, multiple small regions belonging to the tumor, mesenchymal, and necrotic categories are annotated, and the correct tissue classification is judged by experts. If there is an error in the result, add a category annotation to improve the accuracy until the HE result is met. 166 | 167 |
168 | 169 |
170 | 171 | ## Single-cell Segmentation 172 | 173 | - Software:[qupath v0.3.2](Bankhead, P. et al. QuPath: Open source software for digital pathology image analysis. Scientific Reports (2017),https://doi.org/10.1038/s41598-017-17204-5.),[StarDist v0.3.2](Uwe Schmidt, Martin Weigert, Coleman Broaddus, and Gene Myers. Cell Detection with Star-convex Polygons. International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), Granada, Spain, September 2018.) 174 | 175 | - Methods:Nuclear segmentation was first performed using the deep learning method StarDist, utilizing its default parameters, and applying the [2D_dsb2018 model to the DAPI image](Schmidt U, Weigert M, Broaddus C, et al. Cell detection with star-convex polygons. In: Medical Image Computing and Computer AssistedIntervention—MICCAI 2018. (Frangi AF, Schnabel JA, Davatzikos C, et al.eds.) Lecture Notes in Computer Science Springer International Publishing:Cham; 2018; pp. 265–273; doi: 10.1007/978-3-030-00934-2_30).To align with the training set’s image resolution and enhance image contrast for prediction, preprocessing steps were implemented, which included reducing the image size by 50% and applying Contrast Limited Adaptive Histogram Equalization.The cytoplasmic segmentation was established by expanding the nuclei through a morphological dilation of 5 μm, which was applied to the labeled nuclear mask. The centroid of each cell was subsequently determined using the x-y coordinates of the nuclear object’s centroid within the image. A comprehensive qualitative assessment of the segmentation was carried out for each individual slide, and it yielded consistently satisfactory results, affirming the robustness and reliability of the segmentation process. 176 | 177 |
178 | 179 |
180 | 181 | ## Single-cell Lineage Assignment 182 | 183 | - Software:[qupath v0.3.2](Bankhead, P. et al. QuPath: Open source software for digital pathology image analysis. Scientific Reports (2017),https://doi.org/10.1038/s41598-017-17204-5.) 184 | 185 | - Methods: After cell segmentation, calculate the average fluorescence intensity of each marker in each cell based on the mask segmentation mask and fluorescence image. Reference [qupath machine learning process]([Multiplexed analysis — QuPath 0.5.1 documentation](https://qupath.readthedocs.io/en/stable/docs/tutorials/multiplex_analysis.html#create-training-images)). Based on the co expression and hierarchical relationship between markers, multiple classifiers are established, including `PanCK-CD68-CD3e-CD20`、`ASCL1`、`NEUROD1`、`POU2F3`、`YAP1`、`CD4-CD8-CD15-CD31`、`CD56`、`CD11c`、`Foxp3` . After the model is applied, it is confirmed by experts for a second time. If there are false positives or false negatives, the accuracy of cell typing can be improved by increasing the training dataset and setting a threshold (gating) method. For functional markers, set thresholds to determine their expression based on their expression status. 186 | 187 |
188 | 189 |
190 | 191 | ## Cell-cell Pairwise Interaction Analysis 192 | 193 | - Software: [imcRtools 1.8.0](Windhager, J., Zanotelli, V.R.T., Schulz, D. et al. An end-to-end workflow for multiplexed image processing and analysis. Nat Protoc (2023). https://doi.org/10.1038/s41596-023-00881-0) 194 | 195 | - Principle: Define each cell and its surrounding neighbors through the Euclidean distance between X/Y coordinates. The increase or decrease in interactions between cell types is compared using random tissues matched with each image, and the permutation test method of Monte Carlo sampling is used to test whether interactions are significantly enriched or decreased. 196 | 197 | - Code: You can scan this script for more details [Cell-cell_Pairwise_Interaction_Analysis.R](script/Cell-cell_Pairwise_Interaction_Analysis.R) 198 | 199 | 200 | 201 |
202 | 203 |
204 | 205 | ## Cellular Neighborhood ldentification and Voronoi Diagram Generation 206 | 207 | - Software:[python 3.11.5]()、[scikit-learn 1.3.0]([Scikit-learn: Machine Learning in Python](https://jmlr.csail.mit.edu/papers/v12/pedregosa11a.html), Pedregosa *et al.*, JMLR 12, pp. 2825-2830, 2011.) 208 | 209 | - Principle: Obtain a window consisting of 20 nearest neighboring cells using the Euclidean distance between X/Y coordinates, and then cluster the window using Python's scikit learn MiniBatchKMeans (k=20) function based on the composition of cell types. Then determine the cell neighborhood where each cell is located. 210 | 211 | - Reference: [Coordinated Cellular Neighborhoods Orchestrate Antitumoral Immunity at the Colorectal Cancer Invasive Front.](Schürch, C. M., Bhate, S. S., Barlow, G. L., Phillips, D. J., Noti, L., Zlobec, I., Chu, P., Black, S., Demeter, J., McIlwain, D. R., Kinoshita, S., Samusik, N., Goltsev, Y., & Nolan, G. P. (2020). Coordinated Cellular Neighborhoods Orchestrate Antitumoral Immunity at the Colorectal Cancer Invasive Front. *Cell*, *182*(5), 1341–1359.e19. https://doi.org/10.1016/j.cell.2020.07.005) 212 | 213 | - Code: You can scan this script for more details [Cellular_Neighborhood_ldentification.py](script/Cellular_Neighborhood_ldentification.py) 214 | 215 |
216 | 217 |
218 | 219 | ## Statistical Analysis 220 | 221 | - Software: [R 4.2.3](R Core Team (2023). _R: A Language and Environment for 222 | Statistical Computing_. R Foundation for Statistical 223 | Computing, Vienna, Austria. .) 224 | 225 | - Cell proportion correlation analysis 226 | 227 | - Methods: Calculate the proportion of each cell type in each core separately, and then calculate the Spearman correlation coefficient according to the type of core. 228 | - Code: You can scan this script for more details [Statistical_Analysis.R](script/Statistical_Analysis.R) 229 | 230 |
231 | 232 | 233 | # Data 234 | 235 | All data have been uploaded to the GSA (https://ngdc.cncb.ac.cn/gsa/) and Zenodo (https://zenodo.org/) and will be available for download upon acceptance for publication. 236 | 237 | 238 | 239 |
240 | 241 | # Citation 242 | 243 | **Chen, Haiquan et al. “Integrative spatial analysis reveals tumor heterogeneity and immune colony niche related to clinical outcomes in small cell lung cancer.” Cancer cell, S1535-6108(25)00030-3. 14 Feb. 2025, doi:10.1016/j.ccell.2025.01.012** 244 | 245 | -------------------------------------------------------------------------------- /data/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/data/.DS_Store -------------------------------------------------------------------------------- /data/Subburst_Chart_data.csv: -------------------------------------------------------------------------------- 1 | label,parent,value 2 | B cell,Immune,0 3 | CTL,Immune,0 4 | Dendritic cell,Immune,0 5 | Macrophage,Immune,0 6 | Neutrophil,Immune,0 7 | NK cell,Immune,0 8 | NK-like T,Immune,0 9 | T helper,Immune,0 10 | T other,Immune,0 11 | T reg,Immune,0 12 | B cell_CTL,B cell,53367.69058 13 | B cell_Macrophage,B cell,37491.32444 14 | B cell_Others,B cell,43944.12677 15 | B cell_T helper,B cell,59172.24215 16 | B cell_T other,B cell,36119.13004 17 | CTL_B cell,CTL,53367.69058 18 | CTL_Macrophage,CTL,101434.2664 19 | CTL_NK cell,CTL,36424.18852 20 | CTL_NK-like T,CTL,41623.73418 21 | CTL_Others,CTL,26792.15897 22 | CTL_T helper,CTL,124883.6563 23 | CTL_T other,CTL,96969.96094 24 | CTL_T reg,CTL,32311.18876 25 | Dendritic cell_NK cell,Dendritic cell,52120.8595 26 | Dendritic cell_Others,Dendritic cell,75486.07514 27 | Dendritic cell_T helper,Dendritic cell,25790.04418 28 | Dendritic cell_T other,Dendritic cell,26271.07229 29 | Macrophage_B cell,Macrophage,37491.32444 30 | Macrophage_CTL,Macrophage,101434.2664 31 | Macrophage_NK cell,Macrophage,29227.484 32 | Macrophage_NK-like T,Macrophage,38890.53333 33 | Macrophage_Others,Macrophage,29617.78426 34 | Macrophage_T helper,Macrophage,108694.4692 35 | Macrophage_T other,Macrophage,113922.7838 36 | Macrophage_T reg,Macrophage,25748.52569 37 | NK cell_CTL,NK cell,36424.18852 38 | NK cell_Dendritic cell,NK cell,52120.8595 39 | NK cell_Macrophage,NK cell,29227.484 40 | NK cell_NK-like T,NK cell,28072.43162 41 | NK cell_Others,NK cell,50630.84144 42 | NK cell_T helper,NK cell,34305.0449 43 | NK-like T_CTL,NK-like T,41623.73418 44 | NK-like T_Macrophage,NK-like T,38890.53333 45 | NK-like T_NK cell,NK-like T,28072.43162 46 | NK-like T_Others,NK-like T,34667.76564 47 | NK-like T_T helper,NK-like T,40092.72034 48 | NK-like T_T other,NK-like T,35054.55745 49 | T helper_B cell,T helper,59172.24215 50 | T helper_CTL,T helper,124883.6563 51 | T helper_Macrophage,T helper,108694.4692 52 | T helper_NK cell,T helper,34305.0449 53 | T helper_NK-like T,T helper,40092.72034 54 | T helper_Others,T helper,29227.09582 55 | T helper_T other,T helper,117484.9844 56 | T helper_T reg,T helper,36325.872 57 | T other_B cell,T other,36119.13004 58 | T other_CTL,T other,96969.96094 59 | T other_Dendritic cell,T other,26271.07229 60 | T other_Macrophage,T other,113922.7838 61 | T other_NK-like T,T other,35054.55745 62 | T other_Others,T other,54491.31335 63 | T other_T helper,T other,117484.9844 64 | T reg_CTL,T reg,32311.18876 65 | T reg_Macrophage,T reg,25748.52569 66 | T reg_Others,T reg,67888.0292 67 | T reg_T helper,T reg,36325.872 68 | Neutrophil_Others,Neutrophil,38602.52 69 | -------------------------------------------------------------------------------- /img/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/img/.DS_Store -------------------------------------------------------------------------------- /img/Fig 1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/img/Fig 1.jpg -------------------------------------------------------------------------------- /img/Fig 2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/img/Fig 2.jpg -------------------------------------------------------------------------------- /img/Fig 3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/img/Fig 3.jpg -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # This file may be used to create an environment using: 2 | # $ conda create --name --file 3 | # platform: linux-64 4 | _libgcc_mutex=0.1=main 5 | _openmp_mutex=5.1=1_gnu 6 | _r-mutex=1.0.0=anacondar_1 7 | _sysroot_linux-64_curr_repodata_hack=3=haa98f57_10 8 | binutils_impl_linux-64=2.38=h2a08ee3_1 9 | binutils_linux-64=2.38.0=hc2dff05_0 10 | blas=1.0=openblas 11 | brotli=1.0.9=h5eee18b_7 12 | brotli-bin=1.0.9=h5eee18b_7 13 | bwidget=1.9.11=1 14 | bzip2=1.0.8=h7b6447c_0 15 | c-ares=1.19.1=h5eee18b_0 16 | ca-certificates=2023.12.12=h06a4308_0 17 | cairo=1.16.0=hb05425b_5 18 | contourpy=1.0.5=py38hdb19cb5_0 19 | curl=8.5.0=hdbd6064_0 20 | cycler=0.11.0=pyhd3eb1b0_0 21 | cyrus-sasl=2.1.28=h52b45da_1 22 | dbus=1.13.18=hb2f20db_0 23 | expat=2.4.9=h6a678d5_0 24 | fontconfig=2.14.1=h4c34cd2_2 25 | fonttools=4.25.0=pyhd3eb1b0_0 26 | freetype=2.12.1=h4a9f257_0 27 | fribidi=1.0.10=h7b6447c_0 28 | gcc_impl_linux-64=11.2.0=h1234567_1 29 | gcc_linux-64=11.2.0=h5c386dc_0 30 | gfortran_impl_linux-64=11.2.0=h1234567_1 31 | gfortran_linux-64=11.2.0=hc2dff05_0 32 | giflib=5.2.1=h5eee18b_3 33 | glib=2.69.1=he621ea3_2 34 | graphite2=1.3.14=h295c915_1 35 | gst-plugins-base=1.14.1=h6a678d5_1 36 | gstreamer=1.14.1=h5eee18b_1 37 | gxx_impl_linux-64=11.2.0=h1234567_1 38 | gxx_linux-64=11.2.0=hc2dff05_0 39 | harfbuzz=4.3.0=hf52aaf7_2 40 | icu=73.1=h6a678d5_0 41 | importlib_resources=5.2.0=pyhd3eb1b0_1 42 | intel-openmp=2023.1.0=hdb19cb5_46305 43 | jpeg=9e=h5eee18b_1 44 | kernel-headers_linux-64=3.10.0=h57e8cba_10 45 | kiwisolver=1.4.4=py38h6a678d5_0 46 | krb5=1.20.1=h143b758_1 47 | lcms2=2.12=h3be6417_0 48 | ld_impl_linux-64=2.38=h1181459_1 49 | lerc=3.0=h295c915_0 50 | libbrotlicommon=1.0.9=h5eee18b_7 51 | libbrotlidec=1.0.9=h5eee18b_7 52 | libbrotlienc=1.0.9=h5eee18b_7 53 | libclang=14.0.6=default_hc6dbbc7_1 54 | libclang13=14.0.6=default_he11475f_1 55 | libcups=2.4.2=h2d74bed_1 56 | libcurl=8.5.0=h251f7ec_0 57 | libdeflate=1.17=h5eee18b_0 58 | libedit=3.1.20221030=h5eee18b_0 59 | libev=4.33=h7f8727e_1 60 | libevent=2.1.12=hdbd6064_1 61 | libffi=3.4.4=h6a678d5_0 62 | libgcc-devel_linux-64=11.2.0=h1234567_1 63 | libgcc-ng=11.2.0=h1234567_1 64 | libgfortran-ng=11.2.0=h00389a5_1 65 | libgfortran5=11.2.0=h1234567_1 66 | libgomp=11.2.0=h1234567_1 67 | libllvm10=10.0.1=hbcb73fb_5 68 | libllvm14=14.0.6=hdb19cb5_3 69 | libnghttp2=1.57.0=h2d74bed_0 70 | libopenblas=0.3.21=h043d6bf_0 71 | libpng=1.6.39=h5eee18b_0 72 | libpq=12.15=hdbd6064_1 73 | libssh2=1.10.0=hdbd6064_2 74 | libstdcxx-devel_linux-64=11.2.0=h1234567_1 75 | libstdcxx-ng=11.2.0=h1234567_1 76 | libtiff=4.5.1=h6a678d5_0 77 | libuuid=1.41.5=h5eee18b_0 78 | libwebp=1.2.4=h11a3e52_1 79 | libwebp-base=1.2.4=h5eee18b_1 80 | libxcb=1.15=h7f8727e_0 81 | libxkbcommon=1.0.1=h5eee18b_1 82 | libxml2=2.10.4=hf1b16e4_1 83 | lz4-c=1.9.4=h6a678d5_0 84 | make=4.2.1=h1bed415_1 85 | matplotlib=3.7.1=py38h06a4308_1 86 | matplotlib-base=3.7.1=py38h417a72b_1 87 | mkl=2023.1.0=h6d00ec8_46342 88 | mkl-service=2.4.0=py38h5eee18b_1 89 | munkres=1.1.4=py_0 90 | mysql=5.7.24=h721c034_2 91 | ncurses=6.4=h6a678d5_0 92 | nspr=4.35=h6a678d5_0 93 | nss=3.89.1=h6a678d5_0 94 | numpy=1.24.3=py38hf838250_0 95 | numpy-base=1.24.3=py38h1e6e340_0 96 | opencv-python=4.5.1.48=pypi_0 97 | openssl=3.0.12=h7f8727e_0 98 | packaging=23.0=py38h06a4308_0 99 | pango=1.50.7=h05da053_0 100 | pcre=8.45=h295c915_0 101 | pcre2=10.42=hebb0a14_0 102 | pillow=9.4.0=py38h6a678d5_0 103 | pip=23.2.1=py38h06a4308_0 104 | pixman=0.40.0=h7f8727e_1 105 | ply=3.11=py38_0 106 | pyparsing=3.0.9=py38h06a4308_0 107 | pyqt=5.15.10=py38h6a678d5_0 108 | pyqt5-sip=12.13.0=py38h5eee18b_0 109 | python=3.8.17=h955ad1f_0 110 | python-dateutil=2.8.2=pyhd3eb1b0_0 111 | qt-main=5.15.2=h53bd1ea_10 112 | r-abind=1.4_5=r43h142f84f_0 113 | r-base=4.3.1=h1ae530e_0 114 | r-cli=3.6.1=r43h884c59f_0 115 | r-deldir=1.0_9=r43h640688f_1 116 | r-dplyr=1.1.3=r43h884c59f_0 117 | r-fansi=1.0.5=r43h76d94ec_0 118 | r-generics=0.1.3=r43h142f84f_0 119 | r-getopt=1.20.4=r43h6115d3f_0 120 | r-glue=1.6.2=r43h76d94ec_0 121 | r-goftest=1.2_3=r43h76d94ec_0 122 | r-jsonlite=1.8.7=r43h76d94ec_0 123 | r-lattice=0.22_5=r43h76d94ec_0 124 | r-lifecycle=1.0.3=r43h142f84f_0 125 | r-magrittr=2.0.3=r43h76d94ec_0 126 | r-matrix=1.6_1.1=r43h76d94ec_0 127 | r-mgcv=1.9_0=r43h76d94ec_0 128 | r-nlme=3.1_163=r43h640688f_0 129 | r-optparse=1.7.3=r43h142f84f_0 130 | r-pillar=1.9.0=r43h6115d3f_0 131 | r-pkgconfig=2.0.3=r43h6115d3f_0 132 | r-polyclip=1.10_6=r43h884c59f_0 133 | r-r6=2.5.1=r43h6115d3f_0 134 | r-rlang=1.1.1=r43h884c59f_0 135 | r-rpart=4.1.21=r43h76d94ec_0 136 | r-spatstat=3.0_6=r43h142f84f_0 137 | r-spatstat.data=3.0_1=r43h6115d3f_0 138 | r-spatstat.explore=3.2_3=r43h76d94ec_0 139 | r-spatstat.geom=3.2_5=r43h76d94ec_0 140 | r-spatstat.linnet=3.1_1=r43h76d94ec_0 141 | r-spatstat.model=3.2_6=r43h76d94ec_0 142 | r-spatstat.random=3.1_6=r43h884c59f_0 143 | r-spatstat.sparse=3.0_2=r43h76d94ec_0 144 | r-spatstat.utils=3.0_3=r43h76d94ec_0 145 | r-tensor=1.5=r43h142f84f_0 146 | r-tibble=3.2.1=r43h76d94ec_0 147 | r-tidyselect=1.2.0=r43h6115d3f_0 148 | r-utf8=1.2.4=r43h76d94ec_0 149 | r-vctrs=0.6.4=r43h884c59f_0 150 | r-withr=2.5.1=r43h6115d3f_0 151 | readline=8.2=h5eee18b_0 152 | setuptools=68.0.0=py38h06a4308_0 153 | sip=6.7.12=py38h6a678d5_0 154 | six=1.16.0=pyhd3eb1b0_1 155 | sqlite=3.41.2=h5eee18b_0 156 | sysroot_linux-64=2.17=h57e8cba_10 157 | tbb=2021.8.0=hdb19cb5_0 158 | tk=8.6.12=h1ccaba5_0 159 | tktable=2.10=h14c3975_0 160 | toml=0.10.2=pyhd3eb1b0_0 161 | tomli=2.0.1=py38h06a4308_0 162 | tornado=6.3.2=py38h5eee18b_0 163 | wheel=0.38.4=py38h06a4308_0 164 | xz=5.4.2=h5eee18b_0 165 | zipp=3.11.0=py38h06a4308_0 166 | zlib=1.2.13=h5eee18b_0 167 | zstd=1.5.5=hc292b87_0 168 | -------------------------------------------------------------------------------- /result/1.2_E2/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/.DS_Store -------------------------------------------------------------------------------- /result/1.2_E2/1.2_E2_cell_type_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/1.2_E2_cell_type_area.png -------------------------------------------------------------------------------- /result/1.2_E2/1.2_E2_contours_list.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/1.2_E2_contours_list.pkl -------------------------------------------------------------------------------- /result/1.2_E2/1.2_E2_core_Whole_Core_Contour.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/1.2_E2_core_Whole_Core_Contour.jpg -------------------------------------------------------------------------------- /result/1.2_E2/1.2_E2_image_cell.csv: -------------------------------------------------------------------------------- 1 | 1.2_E2_B cell.jpg1.2_E2_T reg.jpg1.2_E2_cancer cell type2.jpg1.2_E2_Endothelial cell.jpg1.2_E2_Neutrophil.jpg1.2_E2_Macrophage.jpg1.2_E2_cancer cell type1.jpg1.2_E2_cancer cell quadruple neg.jpg1.2_E2_cancer cell type4.jpg1.2_E2_Unclassified.jpg1.2_E2_NK cell.jpg1.2_E2_T helper.jpg1.2_E2_NK-like T.jpg1.2_E2_mixed tumor cell.jpg1.2_E2_Dendritic cell.jpg1.2_E2_Cytotoxic T cell.jpg1.2_E2_T other.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_B cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_B cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_Cytotoxic T cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_Cytotoxic T cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_Dendritic cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_Dendritic cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_Endothelial cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_Endothelial cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_Macrophage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_Macrophage.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_Macrophage_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_Macrophage_show.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_NK cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_NK cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_NK-like T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_NK-like T.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_NK-like_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_NK-like_show.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_Neutrophil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_Neutrophil.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_SCLC_A_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_SCLC_A_show.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_T helper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_T helper.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_T other.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_T other.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_T reg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_T reg.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_Unclassified.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_Unclassified.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_cancer cell quadruple neg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_cancer cell quadruple neg.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_cancer cell type1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_cancer cell type1.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_cancer cell type2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_cancer cell type2.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_cancer cell type4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_cancer cell type4.jpg -------------------------------------------------------------------------------- /result/1.2_E2/Process_text/1.2_E2_mixed tumor cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/Process_text/1.2_E2_mixed tumor cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_B cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_B cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_Cytotoxic T cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_Cytotoxic T cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_Dendritic cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_Dendritic cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_Endothelial cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_Endothelial cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_Macrophage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_Macrophage.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_NK cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_NK cell.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_NK-like T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_NK-like T.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_Neutrophil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_Neutrophil.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_T helper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_T helper.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_T other.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_T other.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_T reg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_T reg.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_Unclassified.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_Unclassified.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_cancer cell quadruple neg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_cancer cell quadruple neg.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_cancer cell type1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_cancer cell type1.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_cancer cell type2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_cancer cell type2.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_cancer cell type4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_cancer cell type4.jpg -------------------------------------------------------------------------------- /result/1.2_E2/image/1.2_E2_mixed tumor cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_E2/image/1.2_E2_mixed tumor cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/.DS_Store -------------------------------------------------------------------------------- /result/1.2_F3/1.2_F3_cell_type_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/1.2_F3_cell_type_area.png -------------------------------------------------------------------------------- /result/1.2_F3/1.2_F3_contours_list.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/1.2_F3_contours_list.pkl -------------------------------------------------------------------------------- /result/1.2_F3/1.2_F3_core_Whole_Core_Contour.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/1.2_F3_core_Whole_Core_Contour.jpg -------------------------------------------------------------------------------- /result/1.2_F3/1.2_F3_image_cell.csv: -------------------------------------------------------------------------------- 1 | 1.2_F3_NK cell.jpg1.2_F3_NK-like T.jpg1.2_F3_Cytotoxic T cell.jpg1.2_F3_Dendritic cell.jpg1.2_F3_mixed tumor cell.jpg1.2_F3_Unclassified.jpg1.2_F3_T helper.jpg1.2_F3_T other.jpg1.2_F3_T reg.jpg1.2_F3_Endothelial cell.jpg1.2_F3_Neutrophil.jpg1.2_F3_Macrophage.jpg1.2_F3_cancer cell type4.jpg1.2_F3_B cell.jpg1.2_F3_cancer cell type3.jpg1.2_F3_cancer cell quadruple neg.jpg1.2_F3_cancer cell type2.jpg1.2_F3_cancer cell type1.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_B cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_B cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_Cytotoxic T cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_Cytotoxic T cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_Dendritic cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_Dendritic cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_Endothelial cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_Endothelial cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_Macrophage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_Macrophage.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_Macrophage_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_Macrophage_show.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_NK cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_NK cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_NK-like T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_NK-like T.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_NK-like_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_NK-like_show.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_Neutrophil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_Neutrophil.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_SCLC_A_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_SCLC_A_show.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_T helper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_T helper.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_T other.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_T other.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_T reg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_T reg.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_Unclassified.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_Unclassified.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_cancer cell quadruple neg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_cancer cell quadruple neg.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_cancer cell type1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_cancer cell type1.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_cancer cell type2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_cancer cell type2.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_cancer cell type3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_cancer cell type3.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_cancer cell type4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_cancer cell type4.jpg -------------------------------------------------------------------------------- /result/1.2_F3/Process_text/1.2_F3_mixed tumor cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/Process_text/1.2_F3_mixed tumor cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_B cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_B cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_Cytotoxic T cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_Cytotoxic T cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_Dendritic cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_Dendritic cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_Endothelial cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_Endothelial cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_Macrophage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_Macrophage.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_NK cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_NK cell.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_NK-like T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_NK-like T.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_Neutrophil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_Neutrophil.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_T helper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_T helper.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_T other.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_T other.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_T reg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_T reg.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_Unclassified.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_Unclassified.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_cancer cell quadruple neg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_cancer cell quadruple neg.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_cancer cell type1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_cancer cell type1.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_cancer cell type2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_cancer cell type2.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_cancer cell type3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_cancer cell type3.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_cancer cell type4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_cancer cell type4.jpg -------------------------------------------------------------------------------- /result/1.2_F3/image/1.2_F3_mixed tumor cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.2_F3/image/1.2_F3_mixed tumor cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/.DS_Store -------------------------------------------------------------------------------- /result/1.5_B2/1.5_B2_cell_type_area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/1.5_B2_cell_type_area.png -------------------------------------------------------------------------------- /result/1.5_B2/1.5_B2_contours_list.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/1.5_B2_contours_list.pkl -------------------------------------------------------------------------------- /result/1.5_B2/1.5_B2_core_Whole_Core_Contour.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/1.5_B2_core_Whole_Core_Contour.jpg -------------------------------------------------------------------------------- /result/1.5_B2/1.5_B2_image_cell.csv: -------------------------------------------------------------------------------- 1 | 1.5_B2_mixed tumor cell.jpg1.5_B2_Dendritic cell.jpg1.5_B2_Unclassified.jpg1.5_B2_Macrophage.jpg1.5_B2_Neutrophil.jpg1.5_B2_NK-like T.jpg1.5_B2_cancer cell quadruple neg.jpg1.5_B2_T reg.jpg1.5_B2_NK cell.jpg1.5_B2_Cytotoxic T cell.jpg1.5_B2_T helper.jpg1.5_B2_B cell.jpg1.5_B2_cancer cell type4.jpg1.5_B2_Endothelial cell.jpg1.5_B2_cancer cell type1.jpg1.5_B2_T other.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_B cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_B cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_Cytotoxic T cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_Cytotoxic T cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_Dendritic cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_Dendritic cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_Endothelial cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_Endothelial cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_Macrophage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_Macrophage.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_Macrophage_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_Macrophage_show.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_NK cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_NK cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_NK-like T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_NK-like T.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_NK-like_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_NK-like_show.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_Neutrophil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_Neutrophil.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_SCLC_A_show.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_SCLC_A_show.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_T helper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_T helper.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_T other.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_T other.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_T reg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_T reg.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_Unclassified.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_Unclassified.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_cancer cell quadruple neg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_cancer cell quadruple neg.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_cancer cell type1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_cancer cell type1.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_cancer cell type4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_cancer cell type4.jpg -------------------------------------------------------------------------------- /result/1.5_B2/Process_text/1.5_B2_mixed tumor cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/Process_text/1.5_B2_mixed tumor cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_B cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_B cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_Cytotoxic T cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_Cytotoxic T cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_Dendritic cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_Dendritic cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_Endothelial cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_Endothelial cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_Macrophage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_Macrophage.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_NK cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_NK cell.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_NK-like T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_NK-like T.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_Neutrophil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_Neutrophil.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_T helper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_T helper.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_T other.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_T other.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_T reg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_T reg.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_Unclassified.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_Unclassified.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_cancer cell quadruple neg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_cancer cell quadruple neg.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_cancer cell type1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_cancer cell type1.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_cancer cell type4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_cancer cell type4.jpg -------------------------------------------------------------------------------- /result/1.5_B2/image/1.5_B2_mixed tumor cell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangjun-hub/CODEX_SCLC/6d2749bfc1e4c94642a0124a3538633e83cff280/result/1.5_B2/image/1.5_B2_mixed tumor cell.jpg -------------------------------------------------------------------------------- /result/Subburst_Chart.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: plotly 3 | header-include: |- 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | head: '' 13 | background-color: white 14 | 15 | --- 16 |
17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /result/Subburst_Chart_files/crosstalk-1.2.1/css/crosstalk.min.css: -------------------------------------------------------------------------------- 1 | .container-fluid.crosstalk-bscols{margin-left:-30px;margin-right:-30px;white-space:normal}body>.container-fluid.crosstalk-bscols{margin-left:auto;margin-right:auto}.crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column{display:inline-block;padding-right:12px;vertical-align:top}@media only screen and (max-width: 480px){.crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column{display:block;padding-right:inherit}}.crosstalk-input{margin-bottom:15px}.crosstalk-input .control-label{margin-bottom:0;vertical-align:middle}.crosstalk-input input[type="checkbox"]{margin:4px 0 0;margin-top:1px;line-height:normal}.crosstalk-input .checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.crosstalk-input .checkbox>label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.crosstalk-input .checkbox input[type="checkbox"],.crosstalk-input .checkbox-inline input[type="checkbox"]{position:absolute;margin-top:2px;margin-left:-20px}.crosstalk-input .checkbox+.checkbox{margin-top:-5px}.crosstalk-input .checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.crosstalk-input .checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px} 2 | -------------------------------------------------------------------------------- /result/Subburst_Chart_files/crosstalk-1.2.1/js/crosstalk.min.js: -------------------------------------------------------------------------------- 1 | !function o(u,a,l){function s(n,e){if(!a[n]){if(!u[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(f)return f(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=a[n]={exports:{}};u[n][0].call(i.exports,function(e){var t=u[n][1][e];return s(t||e)},i,i.exports,o,u,a,l)}return a[n].exports}for(var f="function"==typeof require&&require,e=0;e?@[\\\]^`{|}~])/g,"\\$1")+"']"),r=JSON.parse(n[0].innerText),i=e.factory(t,r);o(t).data("crosstalk-instance",i),o(t).addClass("crosstalk-input-bound")}if(t.Shiny){var e=new t.Shiny.InputBinding,u=t.jQuery;u.extend(e,{find:function(e){return u(e).find(".crosstalk-input")},initialize:function(e){var t,n;u(e).hasClass("crosstalk-input-bound")||(n=o(t=e),Object.keys(r).forEach(function(e){n.hasClass(e)&&!n.hasClass("crosstalk-input-bound")&&i(r[e],t)}))},getId:function(e){return e.id},getValue:function(e){},setValue:function(e,t){},receiveMessage:function(e,t){},subscribe:function(e,t){u(e).data("crosstalk-instance").resume()},unsubscribe:function(e){u(e).data("crosstalk-instance").suspend()}}),t.Shiny.inputBindings.register(e,"crosstalk.inputBinding")}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(r,e,t){(function(e){"use strict";var t=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(r("./input")),n=r("./filter");var a=e.jQuery;t.register({className:"crosstalk-input-checkboxgroup",factory:function(e,r){var i=new n.FilterHandle(r.group),o=void 0,u=a(e);return u.on("change","input[type='checkbox']",function(){var e=u.find("input[type='checkbox']:checked");if(0===e.length)o=null,i.clear();else{var t={};e.each(function(){r.map[this.value].forEach(function(e){t[e]=!0})});var n=Object.keys(t);n.sort(),o=n,i.set(n)}}),{suspend:function(){i.clear()},resume:function(){o&&i.set(o)}}}})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./filter":2,"./input":6}],8:[function(r,e,t){(function(e){"use strict";var t=n(r("./input")),l=n(r("./util")),s=r("./filter");function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var f=e.jQuery;t.register({className:"crosstalk-input-select",factory:function(e,n){var t=l.dataframeToD3(n.items),r={options:[{value:"",label:"(All)"}].concat(t),valueField:"value",labelField:"label",searchField:"label"},i=f(e).find("select")[0],o=f(i).selectize(r)[0].selectize,u=new s.FilterHandle(n.group),a=void 0;return o.on("change",function(){if(0===o.items.length)a=null,u.clear();else{var t={};o.items.forEach(function(e){n.map[e].forEach(function(e){t[e]=!0})});var e=Object.keys(t);e.sort(),a=e,u.set(e)}}),{suspend:function(){u.clear()},resume:function(){a&&u.set(a)}}}})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./filter":2,"./input":6,"./util":11}],9:[function(n,e,t){(function(e){"use strict";var d=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},t=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(n("./input")),a=n("./filter");var v=e.jQuery,p=e.strftime;function y(e,t){for(var n=e.toString();n.length .container-fluid.crosstalk-bscols { 12 | margin-left: auto; 13 | margin-right: auto; 14 | } 15 | 16 | .crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column { 17 | display: inline-block; 18 | padding-right: 12px; 19 | vertical-align: top; 20 | } 21 | 22 | @media only screen and (max-width:480px) { 23 | .crosstalk-input-checkboxgroup .crosstalk-options-group .crosstalk-options-column { 24 | display: block; 25 | padding-right: inherit; 26 | } 27 | } 28 | 29 | /* Relevant BS3 styles to make filter_checkbox() look reasonable without Bootstrap */ 30 | .crosstalk-input { 31 | margin-bottom: 15px; /* a la .form-group */ 32 | .control-label { 33 | margin-bottom: 0; 34 | vertical-align: middle; 35 | } 36 | input[type="checkbox"] { 37 | margin: 4px 0 0; 38 | margin-top: 1px; 39 | line-height: normal; 40 | } 41 | .checkbox { 42 | position: relative; 43 | display: block; 44 | margin-top: 10px; 45 | margin-bottom: 10px; 46 | } 47 | .checkbox > label{ 48 | padding-left: 20px; 49 | margin-bottom: 0; 50 | font-weight: 400; 51 | cursor: pointer; 52 | } 53 | .checkbox input[type="checkbox"], 54 | .checkbox-inline input[type="checkbox"] { 55 | position: absolute; 56 | margin-top: 2px; 57 | margin-left: -20px; 58 | } 59 | .checkbox + .checkbox { 60 | margin-top: -5px; 61 | } 62 | .checkbox-inline { 63 | position: relative; 64 | display: inline-block; 65 | padding-left: 20px; 66 | margin-bottom: 0; 67 | font-weight: 400; 68 | vertical-align: middle; 69 | cursor: pointer; 70 | } 71 | .checkbox-inline + .checkbox-inline { 72 | margin-top: 0; 73 | margin-left: 10px; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /result/Subburst_Chart_files/htmlwidgets-1.5.4/htmlwidgets.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | // If window.HTMLWidgets is already defined, then use it; otherwise create a 3 | // new object. This allows preceding code to set options that affect the 4 | // initialization process (though none currently exist). 5 | window.HTMLWidgets = window.HTMLWidgets || {}; 6 | 7 | // See if we're running in a viewer pane. If not, we're in a web browser. 8 | var viewerMode = window.HTMLWidgets.viewerMode = 9 | /\bviewer_pane=1\b/.test(window.location); 10 | 11 | // See if we're running in Shiny mode. If not, it's a static document. 12 | // Note that static widgets can appear in both Shiny and static modes, but 13 | // obviously, Shiny widgets can only appear in Shiny apps/documents. 14 | var shinyMode = window.HTMLWidgets.shinyMode = 15 | typeof(window.Shiny) !== "undefined" && !!window.Shiny.outputBindings; 16 | 17 | // We can't count on jQuery being available, so we implement our own 18 | // version if necessary. 19 | function querySelectorAll(scope, selector) { 20 | if (typeof(jQuery) !== "undefined" && scope instanceof jQuery) { 21 | return scope.find(selector); 22 | } 23 | if (scope.querySelectorAll) { 24 | return scope.querySelectorAll(selector); 25 | } 26 | } 27 | 28 | function asArray(value) { 29 | if (value === null) 30 | return []; 31 | if ($.isArray(value)) 32 | return value; 33 | return [value]; 34 | } 35 | 36 | // Implement jQuery's extend 37 | function extend(target /*, ... */) { 38 | if (arguments.length == 1) { 39 | return target; 40 | } 41 | for (var i = 1; i < arguments.length; i++) { 42 | var source = arguments[i]; 43 | for (var prop in source) { 44 | if (source.hasOwnProperty(prop)) { 45 | target[prop] = source[prop]; 46 | } 47 | } 48 | } 49 | return target; 50 | } 51 | 52 | // IE8 doesn't support Array.forEach. 53 | function forEach(values, callback, thisArg) { 54 | if (values.forEach) { 55 | values.forEach(callback, thisArg); 56 | } else { 57 | for (var i = 0; i < values.length; i++) { 58 | callback.call(thisArg, values[i], i, values); 59 | } 60 | } 61 | } 62 | 63 | // Replaces the specified method with the return value of funcSource. 64 | // 65 | // Note that funcSource should not BE the new method, it should be a function 66 | // that RETURNS the new method. funcSource receives a single argument that is 67 | // the overridden method, it can be called from the new method. The overridden 68 | // method can be called like a regular function, it has the target permanently 69 | // bound to it so "this" will work correctly. 70 | function overrideMethod(target, methodName, funcSource) { 71 | var superFunc = target[methodName] || function() {}; 72 | var superFuncBound = function() { 73 | return superFunc.apply(target, arguments); 74 | }; 75 | target[methodName] = funcSource(superFuncBound); 76 | } 77 | 78 | // Add a method to delegator that, when invoked, calls 79 | // delegatee.methodName. If there is no such method on 80 | // the delegatee, but there was one on delegator before 81 | // delegateMethod was called, then the original version 82 | // is invoked instead. 83 | // For example: 84 | // 85 | // var a = { 86 | // method1: function() { console.log('a1'); } 87 | // method2: function() { console.log('a2'); } 88 | // }; 89 | // var b = { 90 | // method1: function() { console.log('b1'); } 91 | // }; 92 | // delegateMethod(a, b, "method1"); 93 | // delegateMethod(a, b, "method2"); 94 | // a.method1(); 95 | // a.method2(); 96 | // 97 | // The output would be "b1", "a2". 98 | function delegateMethod(delegator, delegatee, methodName) { 99 | var inherited = delegator[methodName]; 100 | delegator[methodName] = function() { 101 | var target = delegatee; 102 | var method = delegatee[methodName]; 103 | 104 | // The method doesn't exist on the delegatee. Instead, 105 | // call the method on the delegator, if it exists. 106 | if (!method) { 107 | target = delegator; 108 | method = inherited; 109 | } 110 | 111 | if (method) { 112 | return method.apply(target, arguments); 113 | } 114 | }; 115 | } 116 | 117 | // Implement a vague facsimilie of jQuery's data method 118 | function elementData(el, name, value) { 119 | if (arguments.length == 2) { 120 | return el["htmlwidget_data_" + name]; 121 | } else if (arguments.length == 3) { 122 | el["htmlwidget_data_" + name] = value; 123 | return el; 124 | } else { 125 | throw new Error("Wrong number of arguments for elementData: " + 126 | arguments.length); 127 | } 128 | } 129 | 130 | // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex 131 | function escapeRegExp(str) { 132 | return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); 133 | } 134 | 135 | function hasClass(el, className) { 136 | var re = new RegExp("\\b" + escapeRegExp(className) + "\\b"); 137 | return re.test(el.className); 138 | } 139 | 140 | // elements - array (or array-like object) of HTML elements 141 | // className - class name to test for 142 | // include - if true, only return elements with given className; 143 | // if false, only return elements *without* given className 144 | function filterByClass(elements, className, include) { 145 | var results = []; 146 | for (var i = 0; i < elements.length; i++) { 147 | if (hasClass(elements[i], className) == include) 148 | results.push(elements[i]); 149 | } 150 | return results; 151 | } 152 | 153 | function on(obj, eventName, func) { 154 | if (obj.addEventListener) { 155 | obj.addEventListener(eventName, func, false); 156 | } else if (obj.attachEvent) { 157 | obj.attachEvent(eventName, func); 158 | } 159 | } 160 | 161 | function off(obj, eventName, func) { 162 | if (obj.removeEventListener) 163 | obj.removeEventListener(eventName, func, false); 164 | else if (obj.detachEvent) { 165 | obj.detachEvent(eventName, func); 166 | } 167 | } 168 | 169 | // Translate array of values to top/right/bottom/left, as usual with 170 | // the "padding" CSS property 171 | // https://developer.mozilla.org/en-US/docs/Web/CSS/padding 172 | function unpackPadding(value) { 173 | if (typeof(value) === "number") 174 | value = [value]; 175 | if (value.length === 1) { 176 | return {top: value[0], right: value[0], bottom: value[0], left: value[0]}; 177 | } 178 | if (value.length === 2) { 179 | return {top: value[0], right: value[1], bottom: value[0], left: value[1]}; 180 | } 181 | if (value.length === 3) { 182 | return {top: value[0], right: value[1], bottom: value[2], left: value[1]}; 183 | } 184 | if (value.length === 4) { 185 | return {top: value[0], right: value[1], bottom: value[2], left: value[3]}; 186 | } 187 | } 188 | 189 | // Convert an unpacked padding object to a CSS value 190 | function paddingToCss(paddingObj) { 191 | return paddingObj.top + "px " + paddingObj.right + "px " + paddingObj.bottom + "px " + paddingObj.left + "px"; 192 | } 193 | 194 | // Makes a number suitable for CSS 195 | function px(x) { 196 | if (typeof(x) === "number") 197 | return x + "px"; 198 | else 199 | return x; 200 | } 201 | 202 | // Retrieves runtime widget sizing information for an element. 203 | // The return value is either null, or an object with fill, padding, 204 | // defaultWidth, defaultHeight fields. 205 | function sizingPolicy(el) { 206 | var sizingEl = document.querySelector("script[data-for='" + el.id + "'][type='application/htmlwidget-sizing']"); 207 | if (!sizingEl) 208 | return null; 209 | var sp = JSON.parse(sizingEl.textContent || sizingEl.text || "{}"); 210 | if (viewerMode) { 211 | return sp.viewer; 212 | } else { 213 | return sp.browser; 214 | } 215 | } 216 | 217 | // @param tasks Array of strings (or falsy value, in which case no-op). 218 | // Each element must be a valid JavaScript expression that yields a 219 | // function. Or, can be an array of objects with "code" and "data" 220 | // properties; in this case, the "code" property should be a string 221 | // of JS that's an expr that yields a function, and "data" should be 222 | // an object that will be added as an additional argument when that 223 | // function is called. 224 | // @param target The object that will be "this" for each function 225 | // execution. 226 | // @param args Array of arguments to be passed to the functions. (The 227 | // same arguments will be passed to all functions.) 228 | function evalAndRun(tasks, target, args) { 229 | if (tasks) { 230 | forEach(tasks, function(task) { 231 | var theseArgs = args; 232 | if (typeof(task) === "object") { 233 | theseArgs = theseArgs.concat([task.data]); 234 | task = task.code; 235 | } 236 | var taskFunc = tryEval(task); 237 | if (typeof(taskFunc) !== "function") { 238 | throw new Error("Task must be a function! Source:\n" + task); 239 | } 240 | taskFunc.apply(target, theseArgs); 241 | }); 242 | } 243 | } 244 | 245 | // Attempt eval() both with and without enclosing in parentheses. 246 | // Note that enclosing coerces a function declaration into 247 | // an expression that eval() can parse 248 | // (otherwise, a SyntaxError is thrown) 249 | function tryEval(code) { 250 | var result = null; 251 | try { 252 | result = eval("(" + code + ")"); 253 | } catch(error) { 254 | if (!(error instanceof SyntaxError)) { 255 | throw error; 256 | } 257 | try { 258 | result = eval(code); 259 | } catch(e) { 260 | if (e instanceof SyntaxError) { 261 | throw error; 262 | } else { 263 | throw e; 264 | } 265 | } 266 | } 267 | return result; 268 | } 269 | 270 | function initSizing(el) { 271 | var sizing = sizingPolicy(el); 272 | if (!sizing) 273 | return; 274 | 275 | var cel = document.getElementById("htmlwidget_container"); 276 | if (!cel) 277 | return; 278 | 279 | if (typeof(sizing.padding) !== "undefined") { 280 | document.body.style.margin = "0"; 281 | document.body.style.padding = paddingToCss(unpackPadding(sizing.padding)); 282 | } 283 | 284 | if (sizing.fill) { 285 | document.body.style.overflow = "hidden"; 286 | document.body.style.width = "100%"; 287 | document.body.style.height = "100%"; 288 | document.documentElement.style.width = "100%"; 289 | document.documentElement.style.height = "100%"; 290 | if (cel) { 291 | cel.style.position = "absolute"; 292 | var pad = unpackPadding(sizing.padding); 293 | cel.style.top = pad.top + "px"; 294 | cel.style.right = pad.right + "px"; 295 | cel.style.bottom = pad.bottom + "px"; 296 | cel.style.left = pad.left + "px"; 297 | el.style.width = "100%"; 298 | el.style.height = "100%"; 299 | } 300 | 301 | return { 302 | getWidth: function() { return cel.offsetWidth; }, 303 | getHeight: function() { return cel.offsetHeight; } 304 | }; 305 | 306 | } else { 307 | el.style.width = px(sizing.width); 308 | el.style.height = px(sizing.height); 309 | 310 | return { 311 | getWidth: function() { return el.offsetWidth; }, 312 | getHeight: function() { return el.offsetHeight; } 313 | }; 314 | } 315 | } 316 | 317 | // Default implementations for methods 318 | var defaults = { 319 | find: function(scope) { 320 | return querySelectorAll(scope, "." + this.name); 321 | }, 322 | renderError: function(el, err) { 323 | var $el = $(el); 324 | 325 | this.clearError(el); 326 | 327 | // Add all these error classes, as Shiny does 328 | var errClass = "shiny-output-error"; 329 | if (err.type !== null) { 330 | // use the classes of the error condition as CSS class names 331 | errClass = errClass + " " + $.map(asArray(err.type), function(type) { 332 | return errClass + "-" + type; 333 | }).join(" "); 334 | } 335 | errClass = errClass + " htmlwidgets-error"; 336 | 337 | // Is el inline or block? If inline or inline-block, just display:none it 338 | // and add an inline error. 339 | var display = $el.css("display"); 340 | $el.data("restore-display-mode", display); 341 | 342 | if (display === "inline" || display === "inline-block") { 343 | $el.hide(); 344 | if (err.message !== "") { 345 | var errorSpan = $("").addClass(errClass); 346 | errorSpan.text(err.message); 347 | $el.after(errorSpan); 348 | } 349 | } else if (display === "block") { 350 | // If block, add an error just after the el, set visibility:none on the 351 | // el, and position the error to be on top of the el. 352 | // Mark it with a unique ID and CSS class so we can remove it later. 353 | $el.css("visibility", "hidden"); 354 | if (err.message !== "") { 355 | var errorDiv = $("
").addClass(errClass).css("position", "absolute") 356 | .css("top", el.offsetTop) 357 | .css("left", el.offsetLeft) 358 | // setting width can push out the page size, forcing otherwise 359 | // unnecessary scrollbars to appear and making it impossible for 360 | // the element to shrink; so use max-width instead 361 | .css("maxWidth", el.offsetWidth) 362 | .css("height", el.offsetHeight); 363 | errorDiv.text(err.message); 364 | $el.after(errorDiv); 365 | 366 | // Really dumb way to keep the size/position of the error in sync with 367 | // the parent element as the window is resized or whatever. 368 | var intId = setInterval(function() { 369 | if (!errorDiv[0].parentElement) { 370 | clearInterval(intId); 371 | return; 372 | } 373 | errorDiv 374 | .css("top", el.offsetTop) 375 | .css("left", el.offsetLeft) 376 | .css("maxWidth", el.offsetWidth) 377 | .css("height", el.offsetHeight); 378 | }, 500); 379 | } 380 | } 381 | }, 382 | clearError: function(el) { 383 | var $el = $(el); 384 | var display = $el.data("restore-display-mode"); 385 | $el.data("restore-display-mode", null); 386 | 387 | if (display === "inline" || display === "inline-block") { 388 | if (display) 389 | $el.css("display", display); 390 | $(el.nextSibling).filter(".htmlwidgets-error").remove(); 391 | } else if (display === "block"){ 392 | $el.css("visibility", "inherit"); 393 | $(el.nextSibling).filter(".htmlwidgets-error").remove(); 394 | } 395 | }, 396 | sizing: {} 397 | }; 398 | 399 | // Called by widget bindings to register a new type of widget. The definition 400 | // object can contain the following properties: 401 | // - name (required) - A string indicating the binding name, which will be 402 | // used by default as the CSS classname to look for. 403 | // - initialize (optional) - A function(el) that will be called once per 404 | // widget element; if a value is returned, it will be passed as the third 405 | // value to renderValue. 406 | // - renderValue (required) - A function(el, data, initValue) that will be 407 | // called with data. Static contexts will cause this to be called once per 408 | // element; Shiny apps will cause this to be called multiple times per 409 | // element, as the data changes. 410 | window.HTMLWidgets.widget = function(definition) { 411 | if (!definition.name) { 412 | throw new Error("Widget must have a name"); 413 | } 414 | if (!definition.type) { 415 | throw new Error("Widget must have a type"); 416 | } 417 | // Currently we only support output widgets 418 | if (definition.type !== "output") { 419 | throw new Error("Unrecognized widget type '" + definition.type + "'"); 420 | } 421 | // TODO: Verify that .name is a valid CSS classname 422 | 423 | // Support new-style instance-bound definitions. Old-style class-bound 424 | // definitions have one widget "object" per widget per type/class of 425 | // widget; the renderValue and resize methods on such widget objects 426 | // take el and instance arguments, because the widget object can't 427 | // store them. New-style instance-bound definitions have one widget 428 | // object per widget instance; the definition that's passed in doesn't 429 | // provide renderValue or resize methods at all, just the single method 430 | // factory(el, width, height) 431 | // which returns an object that has renderValue(x) and resize(w, h). 432 | // This enables a far more natural programming style for the widget 433 | // author, who can store per-instance state using either OO-style 434 | // instance fields or functional-style closure variables (I guess this 435 | // is in contrast to what can only be called C-style pseudo-OO which is 436 | // what we required before). 437 | if (definition.factory) { 438 | definition = createLegacyDefinitionAdapter(definition); 439 | } 440 | 441 | if (!definition.renderValue) { 442 | throw new Error("Widget must have a renderValue function"); 443 | } 444 | 445 | // For static rendering (non-Shiny), use a simple widget registration 446 | // scheme. We also use this scheme for Shiny apps/documents that also 447 | // contain static widgets. 448 | window.HTMLWidgets.widgets = window.HTMLWidgets.widgets || []; 449 | // Merge defaults into the definition; don't mutate the original definition. 450 | var staticBinding = extend({}, defaults, definition); 451 | overrideMethod(staticBinding, "find", function(superfunc) { 452 | return function(scope) { 453 | var results = superfunc(scope); 454 | // Filter out Shiny outputs, we only want the static kind 455 | return filterByClass(results, "html-widget-output", false); 456 | }; 457 | }); 458 | window.HTMLWidgets.widgets.push(staticBinding); 459 | 460 | if (shinyMode) { 461 | // Shiny is running. Register the definition with an output binding. 462 | // The definition itself will not be the output binding, instead 463 | // we will make an output binding object that delegates to the 464 | // definition. This is because we foolishly used the same method 465 | // name (renderValue) for htmlwidgets definition and Shiny bindings 466 | // but they actually have quite different semantics (the Shiny 467 | // bindings receive data that includes lots of metadata that it 468 | // strips off before calling htmlwidgets renderValue). We can't 469 | // just ignore the difference because in some widgets it's helpful 470 | // to call this.renderValue() from inside of resize(), and if 471 | // we're not delegating, then that call will go to the Shiny 472 | // version instead of the htmlwidgets version. 473 | 474 | // Merge defaults with definition, without mutating either. 475 | var bindingDef = extend({}, defaults, definition); 476 | 477 | // This object will be our actual Shiny binding. 478 | var shinyBinding = new Shiny.OutputBinding(); 479 | 480 | // With a few exceptions, we'll want to simply use the bindingDef's 481 | // version of methods if they are available, otherwise fall back to 482 | // Shiny's defaults. NOTE: If Shiny's output bindings gain additional 483 | // methods in the future, and we want them to be overrideable by 484 | // HTMLWidget binding definitions, then we'll need to add them to this 485 | // list. 486 | delegateMethod(shinyBinding, bindingDef, "getId"); 487 | delegateMethod(shinyBinding, bindingDef, "onValueChange"); 488 | delegateMethod(shinyBinding, bindingDef, "onValueError"); 489 | delegateMethod(shinyBinding, bindingDef, "renderError"); 490 | delegateMethod(shinyBinding, bindingDef, "clearError"); 491 | delegateMethod(shinyBinding, bindingDef, "showProgress"); 492 | 493 | // The find, renderValue, and resize are handled differently, because we 494 | // want to actually decorate the behavior of the bindingDef methods. 495 | 496 | shinyBinding.find = function(scope) { 497 | var results = bindingDef.find(scope); 498 | 499 | // Only return elements that are Shiny outputs, not static ones 500 | var dynamicResults = results.filter(".html-widget-output"); 501 | 502 | // It's possible that whatever caused Shiny to think there might be 503 | // new dynamic outputs, also caused there to be new static outputs. 504 | // Since there might be lots of different htmlwidgets bindings, we 505 | // schedule execution for later--no need to staticRender multiple 506 | // times. 507 | if (results.length !== dynamicResults.length) 508 | scheduleStaticRender(); 509 | 510 | return dynamicResults; 511 | }; 512 | 513 | // Wrap renderValue to handle initialization, which unfortunately isn't 514 | // supported natively by Shiny at the time of this writing. 515 | 516 | shinyBinding.renderValue = function(el, data) { 517 | Shiny.renderDependencies(data.deps); 518 | // Resolve strings marked as javascript literals to objects 519 | if (!(data.evals instanceof Array)) data.evals = [data.evals]; 520 | for (var i = 0; data.evals && i < data.evals.length; i++) { 521 | window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]); 522 | } 523 | if (!bindingDef.renderOnNullValue) { 524 | if (data.x === null) { 525 | el.style.visibility = "hidden"; 526 | return; 527 | } else { 528 | el.style.visibility = "inherit"; 529 | } 530 | } 531 | if (!elementData(el, "initialized")) { 532 | initSizing(el); 533 | 534 | elementData(el, "initialized", true); 535 | if (bindingDef.initialize) { 536 | var result = bindingDef.initialize(el, el.offsetWidth, 537 | el.offsetHeight); 538 | elementData(el, "init_result", result); 539 | } 540 | } 541 | bindingDef.renderValue(el, data.x, elementData(el, "init_result")); 542 | evalAndRun(data.jsHooks.render, elementData(el, "init_result"), [el, data.x]); 543 | }; 544 | 545 | // Only override resize if bindingDef implements it 546 | if (bindingDef.resize) { 547 | shinyBinding.resize = function(el, width, height) { 548 | // Shiny can call resize before initialize/renderValue have been 549 | // called, which doesn't make sense for widgets. 550 | if (elementData(el, "initialized")) { 551 | bindingDef.resize(el, width, height, elementData(el, "init_result")); 552 | } 553 | }; 554 | } 555 | 556 | Shiny.outputBindings.register(shinyBinding, bindingDef.name); 557 | } 558 | }; 559 | 560 | var scheduleStaticRenderTimerId = null; 561 | function scheduleStaticRender() { 562 | if (!scheduleStaticRenderTimerId) { 563 | scheduleStaticRenderTimerId = setTimeout(function() { 564 | scheduleStaticRenderTimerId = null; 565 | window.HTMLWidgets.staticRender(); 566 | }, 1); 567 | } 568 | } 569 | 570 | // Render static widgets after the document finishes loading 571 | // Statically render all elements that are of this widget's class 572 | window.HTMLWidgets.staticRender = function() { 573 | var bindings = window.HTMLWidgets.widgets || []; 574 | forEach(bindings, function(binding) { 575 | var matches = binding.find(document.documentElement); 576 | forEach(matches, function(el) { 577 | var sizeObj = initSizing(el, binding); 578 | 579 | if (hasClass(el, "html-widget-static-bound")) 580 | return; 581 | el.className = el.className + " html-widget-static-bound"; 582 | 583 | var initResult; 584 | if (binding.initialize) { 585 | initResult = binding.initialize(el, 586 | sizeObj ? sizeObj.getWidth() : el.offsetWidth, 587 | sizeObj ? sizeObj.getHeight() : el.offsetHeight 588 | ); 589 | elementData(el, "init_result", initResult); 590 | } 591 | 592 | if (binding.resize) { 593 | var lastSize = { 594 | w: sizeObj ? sizeObj.getWidth() : el.offsetWidth, 595 | h: sizeObj ? sizeObj.getHeight() : el.offsetHeight 596 | }; 597 | var resizeHandler = function(e) { 598 | var size = { 599 | w: sizeObj ? sizeObj.getWidth() : el.offsetWidth, 600 | h: sizeObj ? sizeObj.getHeight() : el.offsetHeight 601 | }; 602 | if (size.w === 0 && size.h === 0) 603 | return; 604 | if (size.w === lastSize.w && size.h === lastSize.h) 605 | return; 606 | lastSize = size; 607 | binding.resize(el, size.w, size.h, initResult); 608 | }; 609 | 610 | on(window, "resize", resizeHandler); 611 | 612 | // This is needed for cases where we're running in a Shiny 613 | // app, but the widget itself is not a Shiny output, but 614 | // rather a simple static widget. One example of this is 615 | // an rmarkdown document that has runtime:shiny and widget 616 | // that isn't in a render function. Shiny only knows to 617 | // call resize handlers for Shiny outputs, not for static 618 | // widgets, so we do it ourselves. 619 | if (window.jQuery) { 620 | window.jQuery(document).on( 621 | "shown.htmlwidgets shown.bs.tab.htmlwidgets shown.bs.collapse.htmlwidgets", 622 | resizeHandler 623 | ); 624 | window.jQuery(document).on( 625 | "hidden.htmlwidgets hidden.bs.tab.htmlwidgets hidden.bs.collapse.htmlwidgets", 626 | resizeHandler 627 | ); 628 | } 629 | 630 | // This is needed for the specific case of ioslides, which 631 | // flips slides between display:none and display:block. 632 | // Ideally we would not have to have ioslide-specific code 633 | // here, but rather have ioslides raise a generic event, 634 | // but the rmarkdown package just went to CRAN so the 635 | // window to getting that fixed may be long. 636 | if (window.addEventListener) { 637 | // It's OK to limit this to window.addEventListener 638 | // browsers because ioslides itself only supports 639 | // such browsers. 640 | on(document, "slideenter", resizeHandler); 641 | on(document, "slideleave", resizeHandler); 642 | } 643 | } 644 | 645 | var scriptData = document.querySelector("script[data-for='" + el.id + "'][type='application/json']"); 646 | if (scriptData) { 647 | var data = JSON.parse(scriptData.textContent || scriptData.text); 648 | // Resolve strings marked as javascript literals to objects 649 | if (!(data.evals instanceof Array)) data.evals = [data.evals]; 650 | for (var k = 0; data.evals && k < data.evals.length; k++) { 651 | window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]); 652 | } 653 | binding.renderValue(el, data.x, initResult); 654 | evalAndRun(data.jsHooks.render, initResult, [el, data.x]); 655 | } 656 | }); 657 | }); 658 | 659 | invokePostRenderHandlers(); 660 | } 661 | 662 | 663 | function has_jQuery3() { 664 | if (!window.jQuery) { 665 | return false; 666 | } 667 | var $version = window.jQuery.fn.jquery; 668 | var $major_version = parseInt($version.split(".")[0]); 669 | return $major_version >= 3; 670 | } 671 | 672 | /* 673 | / Shiny 1.4 bumped jQuery from 1.x to 3.x which means jQuery's 674 | / on-ready handler (i.e., $(fn)) is now asyncronous (i.e., it now 675 | / really means $(setTimeout(fn)). 676 | / https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronous 677 | / 678 | / Since Shiny uses $() to schedule initShiny, shiny>=1.4 calls initShiny 679 | / one tick later than it did before, which means staticRender() is 680 | / called renderValue() earlier than (advanced) widget authors might be expecting. 681 | / https://github.com/rstudio/shiny/issues/2630 682 | / 683 | / For a concrete example, leaflet has some methods (e.g., updateBounds) 684 | / which reference Shiny methods registered in initShiny (e.g., setInputValue). 685 | / Since leaflet is privy to this life-cycle, it knows to use setTimeout() to 686 | / delay execution of those methods (until Shiny methods are ready) 687 | / https://github.com/rstudio/leaflet/blob/18ec981/javascript/src/index.js#L266-L268 688 | / 689 | / Ideally widget authors wouldn't need to use this setTimeout() hack that 690 | / leaflet uses to call Shiny methods on a staticRender(). In the long run, 691 | / the logic initShiny should be broken up so that method registration happens 692 | / right away, but binding happens later. 693 | */ 694 | function maybeStaticRenderLater() { 695 | if (shinyMode && has_jQuery3()) { 696 | window.jQuery(window.HTMLWidgets.staticRender); 697 | } else { 698 | window.HTMLWidgets.staticRender(); 699 | } 700 | } 701 | 702 | if (document.addEventListener) { 703 | document.addEventListener("DOMContentLoaded", function() { 704 | document.removeEventListener("DOMContentLoaded", arguments.callee, false); 705 | maybeStaticRenderLater(); 706 | }, false); 707 | } else if (document.attachEvent) { 708 | document.attachEvent("onreadystatechange", function() { 709 | if (document.readyState === "complete") { 710 | document.detachEvent("onreadystatechange", arguments.callee); 711 | maybeStaticRenderLater(); 712 | } 713 | }); 714 | } 715 | 716 | 717 | window.HTMLWidgets.getAttachmentUrl = function(depname, key) { 718 | // If no key, default to the first item 719 | if (typeof(key) === "undefined") 720 | key = 1; 721 | 722 | var link = document.getElementById(depname + "-" + key + "-attachment"); 723 | if (!link) { 724 | throw new Error("Attachment " + depname + "/" + key + " not found in document"); 725 | } 726 | return link.getAttribute("href"); 727 | }; 728 | 729 | window.HTMLWidgets.dataframeToD3 = function(df) { 730 | var names = []; 731 | var length; 732 | for (var name in df) { 733 | if (df.hasOwnProperty(name)) 734 | names.push(name); 735 | if (typeof(df[name]) !== "object" || typeof(df[name].length) === "undefined") { 736 | throw new Error("All fields must be arrays"); 737 | } else if (typeof(length) !== "undefined" && length !== df[name].length) { 738 | throw new Error("All fields must be arrays of the same length"); 739 | } 740 | length = df[name].length; 741 | } 742 | var results = []; 743 | var item; 744 | for (var row = 0; row < length; row++) { 745 | item = {}; 746 | for (var col = 0; col < names.length; col++) { 747 | item[names[col]] = df[names[col]][row]; 748 | } 749 | results.push(item); 750 | } 751 | return results; 752 | }; 753 | 754 | window.HTMLWidgets.transposeArray2D = function(array) { 755 | if (array.length === 0) return array; 756 | var newArray = array[0].map(function(col, i) { 757 | return array.map(function(row) { 758 | return row[i] 759 | }) 760 | }); 761 | return newArray; 762 | }; 763 | // Split value at splitChar, but allow splitChar to be escaped 764 | // using escapeChar. Any other characters escaped by escapeChar 765 | // will be included as usual (including escapeChar itself). 766 | function splitWithEscape(value, splitChar, escapeChar) { 767 | var results = []; 768 | var escapeMode = false; 769 | var currentResult = ""; 770 | for (var pos = 0; pos < value.length; pos++) { 771 | if (!escapeMode) { 772 | if (value[pos] === splitChar) { 773 | results.push(currentResult); 774 | currentResult = ""; 775 | } else if (value[pos] === escapeChar) { 776 | escapeMode = true; 777 | } else { 778 | currentResult += value[pos]; 779 | } 780 | } else { 781 | currentResult += value[pos]; 782 | escapeMode = false; 783 | } 784 | } 785 | if (currentResult !== "") { 786 | results.push(currentResult); 787 | } 788 | return results; 789 | } 790 | // Function authored by Yihui/JJ Allaire 791 | window.HTMLWidgets.evaluateStringMember = function(o, member) { 792 | var parts = splitWithEscape(member, '.', '\\'); 793 | for (var i = 0, l = parts.length; i < l; i++) { 794 | var part = parts[i]; 795 | // part may be a character or 'numeric' member name 796 | if (o !== null && typeof o === "object" && part in o) { 797 | if (i == (l - 1)) { // if we are at the end of the line then evalulate 798 | if (typeof o[part] === "string") 799 | o[part] = tryEval(o[part]); 800 | } else { // otherwise continue to next embedded object 801 | o = o[part]; 802 | } 803 | } 804 | } 805 | }; 806 | 807 | // Retrieve the HTMLWidget instance (i.e. the return value of an 808 | // HTMLWidget binding's initialize() or factory() function) 809 | // associated with an element, or null if none. 810 | window.HTMLWidgets.getInstance = function(el) { 811 | return elementData(el, "init_result"); 812 | }; 813 | 814 | // Finds the first element in the scope that matches the selector, 815 | // and returns the HTMLWidget instance (i.e. the return value of 816 | // an HTMLWidget binding's initialize() or factory() function) 817 | // associated with that element, if any. If no element matches the 818 | // selector, or the first matching element has no HTMLWidget 819 | // instance associated with it, then null is returned. 820 | // 821 | // The scope argument is optional, and defaults to window.document. 822 | window.HTMLWidgets.find = function(scope, selector) { 823 | if (arguments.length == 1) { 824 | selector = scope; 825 | scope = document; 826 | } 827 | 828 | var el = scope.querySelector(selector); 829 | if (el === null) { 830 | return null; 831 | } else { 832 | return window.HTMLWidgets.getInstance(el); 833 | } 834 | }; 835 | 836 | // Finds all elements in the scope that match the selector, and 837 | // returns the HTMLWidget instances (i.e. the return values of 838 | // an HTMLWidget binding's initialize() or factory() function) 839 | // associated with the elements, in an array. If elements that 840 | // match the selector don't have an associated HTMLWidget 841 | // instance, the returned array will contain nulls. 842 | // 843 | // The scope argument is optional, and defaults to window.document. 844 | window.HTMLWidgets.findAll = function(scope, selector) { 845 | if (arguments.length == 1) { 846 | selector = scope; 847 | scope = document; 848 | } 849 | 850 | var nodes = scope.querySelectorAll(selector); 851 | var results = []; 852 | for (var i = 0; i < nodes.length; i++) { 853 | results.push(window.HTMLWidgets.getInstance(nodes[i])); 854 | } 855 | return results; 856 | }; 857 | 858 | var postRenderHandlers = []; 859 | function invokePostRenderHandlers() { 860 | while (postRenderHandlers.length) { 861 | var handler = postRenderHandlers.shift(); 862 | if (handler) { 863 | handler(); 864 | } 865 | } 866 | } 867 | 868 | // Register the given callback function to be invoked after the 869 | // next time static widgets are rendered. 870 | window.HTMLWidgets.addPostRenderHandler = function(callback) { 871 | postRenderHandlers.push(callback); 872 | }; 873 | 874 | // Takes a new-style instance-bound definition, and returns an 875 | // old-style class-bound definition. This saves us from having 876 | // to rewrite all the logic in this file to accomodate both 877 | // types of definitions. 878 | function createLegacyDefinitionAdapter(defn) { 879 | var result = { 880 | name: defn.name, 881 | type: defn.type, 882 | initialize: function(el, width, height) { 883 | return defn.factory(el, width, height); 884 | }, 885 | renderValue: function(el, x, instance) { 886 | return instance.renderValue(x); 887 | }, 888 | resize: function(el, width, height, instance) { 889 | return instance.resize(width, height); 890 | } 891 | }; 892 | 893 | if (defn.find) 894 | result.find = defn.find; 895 | if (defn.renderError) 896 | result.renderError = defn.renderError; 897 | if (defn.clearError) 898 | result.clearError = defn.clearError; 899 | 900 | return result; 901 | } 902 | })(); 903 | 904 | -------------------------------------------------------------------------------- /result/Subburst_Chart_files/jquery-3.5.1/jquery-AUTHORS.txt: -------------------------------------------------------------------------------- 1 | Authors ordered by first contribution. 2 | 3 | John Resig 4 | Gilles van den Hoven 5 | Michael Geary 6 | Stefan Petre 7 | Yehuda Katz 8 | Corey Jewett 9 | Klaus Hartl 10 | Franck Marcia 11 | Jörn Zaefferer 12 | Paul Bakaus 13 | Brandon Aaron 14 | Mike Alsup 15 | Dave Methvin 16 | Ed Engelhardt 17 | Sean Catchpole 18 | Paul Mclanahan 19 | David Serduke 20 | Richard D. Worth 21 | Scott González 22 | Ariel Flesler 23 | Cheah Chu Yeow 24 | Andrew Chalkley 25 | Fabio Buffoni 26 | Stefan Bauckmeier  27 | Jon Evans 28 | TJ Holowaychuk 29 | Riccardo De Agostini 30 | Michael Bensoussan 31 | Louis-Rémi Babé 32 | Robert Katić 33 | Damian Janowski 34 | Anton Kovalyov 35 | Dušan B. Jovanovic 36 | Earle Castledine 37 | Rich Dougherty 38 | Kim Dalsgaard 39 | Andrea Giammarchi 40 | Fabian Jakobs 41 | Mark Gibson 42 | Karl Swedberg 43 | Justin Meyer 44 | Ben Alman 45 | James Padolsey 46 | David Petersen 47 | Batiste Bieler 48 | Jake Archibald 49 | Alexander Farkas 50 | Filipe Fortes 51 | Rick Waldron 52 | Neeraj Singh 53 | Paul Irish 54 | Iraê Carvalho 55 | Matt Curry 56 | Michael Monteleone 57 | Noah Sloan 58 | Tom Viner 59 | J. Ryan Stinnett 60 | Douglas Neiner 61 | Adam J. Sontag 62 | Heungsub Lee 63 | Dave Reed 64 | Carl Fürstenberg 65 | Jacob Wright 66 | Ralph Whitbeck 67 | unknown 68 | temp01 69 | Colin Snover 70 | Jared Grippe 71 | Ryan W Tenney 72 | Alex Sexton 73 | Pinhook 74 | Ron Otten 75 | Jephte Clain 76 | Anton Matzneller 77 | Dan Heberden 78 | Henri Wiechers 79 | Russell Holbrook 80 | Julian Aubourg 81 | Gianni Alessandro Chiappetta 82 | Scott Jehl 83 | James Burke 84 | Jonas Pfenniger 85 | Xavi Ramirez 86 | Sylvester Keil 87 | Brandon Sterne 88 | Mathias Bynens 89 | Lee Carpenter 90 | Timmy Willison <4timmywil@gmail.com> 91 | Corey Frang 92 | Digitalxero 93 | David Murdoch 94 | Josh Varner 95 | Charles McNulty 96 | Jordan Boesch 97 | Jess Thrysoee 98 | Michael Murray 99 | Alexis Abril 100 | Rob Morgan 101 | John Firebaugh 102 | Sam Bisbee 103 | Gilmore Davidson 104 | Brian Brennan 105 | Xavier Montillet 106 | Daniel Pihlstrom 107 | Sahab Yazdani 108 | avaly 109 | Scott Hughes 110 | Mike Sherov 111 | Greg Hazel 112 | Schalk Neethling 113 | Denis Knauf 114 | Timo Tijhof 115 | Steen Nielsen 116 | Anton Ryzhov 117 | Shi Chuan 118 | Matt Mueller 119 | Berker Peksag 120 | Toby Brain 121 | Justin 122 | Daniel Herman 123 | Oleg Gaidarenko 124 | Rock Hymas 125 | Richard Gibson 126 | Rafaël Blais Masson 127 | cmc3cn <59194618@qq.com> 128 | Joe Presbrey 129 | Sindre Sorhus 130 | Arne de Bree 131 | Vladislav Zarakovsky 132 | Andrew E Monat 133 | Oskari 134 | Joao Henrique de Andrade Bruni 135 | tsinha 136 | Dominik D. Geyer 137 | Matt Farmer 138 | Trey Hunner 139 | Jason Moon 140 | Jeffery To 141 | Kris Borchers 142 | Vladimir Zhuravlev 143 | Jacob Thornton 144 | Chad Killingsworth 145 | Vitya Muhachev 146 | Nowres Rafid 147 | David Benjamin 148 | Alan Plum 149 | Uri Gilad 150 | Chris Faulkner 151 | Marcel Greter 152 | Elijah Manor 153 | Daniel Chatfield 154 | Daniel Gálvez 155 | Nikita Govorov 156 | Wesley Walser 157 | Mike Pennisi 158 | Matthias Jäggli 159 | Devin Cooper 160 | Markus Staab 161 | Dave Riddle 162 | Callum Macrae 163 | Jonathan Sampson 164 | Benjamin Truyman 165 | Jay Merrifield 166 | James Huston 167 | Sai Lung Wong 168 | Erick Ruiz de Chávez 169 | David Bonner 170 | Allen J Schmidt Jr 171 | Akintayo Akinwunmi 172 | MORGAN 173 | Ismail Khair 174 | Carl Danley 175 | Mike Petrovich 176 | Greg Lavallee 177 | Tom H Fuertes 178 | Roland Eckl 179 | Yiming He 180 | David Fox 181 | Bennett Sorbo 182 | Paul Ramos 183 | Rod Vagg 184 | Sebastian Burkhard 185 | Zachary Adam Kaplan 186 | Adam Coulombe 187 | nanto_vi 188 | nanto 189 | Danil Somsikov 190 | Ryunosuke SATO 191 | Diego Tres 192 | Jean Boussier 193 | Andrew Plummer 194 | Mark Raddatz 195 | Pascal Borreli 196 | Isaac Z. Schlueter 197 | Karl Sieburg 198 | Nguyen Phuc Lam 199 | Dmitry Gusev 200 | Steven Benner 201 | Li Xudong 202 | Michał Gołębiowski-Owczarek 203 | Renato Oliveira dos Santos 204 | Frederic Junod 205 | Tom H Fuertes 206 | Mitch Foley 207 | ros3cin 208 | Kyle Robinson Young 209 | John Paul 210 | Jason Bedard 211 | Chris Talkington 212 | Eddie Monge 213 | Terry Jones 214 | Jason Merino 215 | Dan Burzo 216 | Jeremy Dunck 217 | Chris Price 218 | Guy Bedford 219 | njhamann 220 | Goare Mao 221 | Amey Sakhadeo 222 | Mike Sidorov 223 | Anthony Ryan 224 | Lihan Li 225 | George Kats 226 | Dongseok Paeng 227 | Ronny Springer 228 | Ilya Kantor 229 | Marian Sollmann 230 | Chris Antaki 231 | David Hong 232 | Jakob Stoeck 233 | Christopher Jones 234 | Forbes Lindesay 235 | S. Andrew Sheppard 236 | Leonardo Balter 237 | Rodrigo Rosenfeld Rosas 238 | Daniel Husar 239 | Philip Jägenstedt 240 | John Hoven 241 | Roman Reiß 242 | Benjy Cui 243 | Christian Kosmowski 244 | David Corbacho 245 | Liang Peng 246 | TJ VanToll 247 | Aurelio De Rosa 248 | Senya Pugach 249 | Dan Hart 250 | Nazar Mokrynskyi 251 | Benjamin Tan 252 | Amit Merchant 253 | Jason Bedard 254 | Veaceslav Grimalschi 255 | Richard McDaniel 256 | Arthur Verschaeve 257 | Shivaji Varma 258 | Ben Toews 259 | Bin Xin 260 | Neftaly Hernandez 261 | T.J. Crowder 262 | Nicolas HENRY 263 | Frederic Hemberger 264 | Victor Homyakov 265 | Aditya Raghavan 266 | Anne-Gaelle Colom 267 | Leonardo Braga 268 | George Mauer 269 | Stephen Edgar 270 | Thomas Tortorini 271 | Jörn Wagner 272 | Jon Hester 273 | Colin Frick 274 | Winston Howes 275 | Alexander O'Mara 276 | Chris Rebert 277 | Bastian Buchholz 278 | Mu Haibao 279 | Calvin Metcalf 280 | Arthur Stolyar 281 | Gabriel Schulhof 282 | Gilad Peleg 283 | Julian Alexander Murillo 284 | Kevin Kirsche 285 | Martin Naumann 286 | Yongwoo Jeon 287 | John-David Dalton 288 | Marek Lewandowski 289 | Bruno Pérel 290 | Daniel Nill 291 | Reed Loden 292 | Sean Henderson 293 | Gary Ye 294 | Richard Kraaijenhagen 295 | Connor Atherton 296 | Christian Grete 297 | Tom von Clef 298 | Liza Ramo 299 | Joelle Fleurantin 300 | Steve Mao 301 | Jon Dufresne 302 | Jae Sung Park 303 | Josh Soref 304 | Saptak Sengupta 305 | Henry Wong 306 | Jun Sun 307 | Martijn W. van der Lee 308 | Devin Wilson 309 | Damian Senn 310 | Zack Hall 311 | Vitaliy Terziev 312 | Todor Prikumov 313 | Bernhard M. Wiedemann 314 | Jha Naman 315 | Alexander Lisianoi 316 | William Robinet 317 | Joe Trumbull 318 | Alexander K 319 | Ralin Chimev 320 | Felipe Sateler 321 | Christophe Tafani-Dereeper 322 | Manoj Kumar 323 | David Broder-Rodgers 324 | Alex Louden 325 | Alex Padilla 326 | karan-96 327 | 南漂一卒 328 | Erik Lax 329 | Boom Lee 330 | Andreas Solleder 331 | Pierre Spring 332 | Shashanka Nataraj 333 | CDAGaming 334 | Matan Kotler-Berkowitz <205matan@gmail.com> 335 | Jordan Beland 336 | Henry Zhu 337 | Nilton Cesar 338 | basil.belokon 339 | Andrey Meshkov 340 | tmybr11 341 | Luis Emilio Velasco Sanchez 342 | Ed S 343 | Bert Zhang 344 | Sébastien Règne 345 | wartmanm <3869625+wartmanm@users.noreply.github.com> 346 | Siddharth Dungarwal 347 | abnud1 348 | Andrei Fangli 349 | Marja Hölttä 350 | buddh4 351 | Hoang 352 | Wonseop Kim 353 | Pat O'Callaghan 354 | JuanMa Ruiz 355 | Ahmed.S.ElAfifi 356 | Sean Robinson 357 | Christian Oliff 358 | -------------------------------------------------------------------------------- /result/Subburst_Chart_files/plotly-htmlwidgets-css-2.11.1/plotly-htmlwidgets.css: -------------------------------------------------------------------------------- 1 | /* 2 | just here so that plotly works 3 | correctly with ioslides. 4 | see https://github.com/ropensci/plotly/issues/463 5 | */ 6 | 7 | slide:not(.current) .plotly.html-widget{ 8 | display: none; 9 | } 10 | -------------------------------------------------------------------------------- /result/Subburst_Chart_files/typedarray-0.1/typedarray.min.js: -------------------------------------------------------------------------------- 1 | (function(global){"use strict";var undefined=void 0;var MAX_ARRAY_LENGTH=1e5;function Type(v){switch(typeof v){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return v===null?"null":"object"}}function Class(v){return Object.prototype.toString.call(v).replace(/^\[object *|\]$/g,"")}function IsCallable(o){return typeof o==="function"}function ToObject(v){if(v===null||v===undefined)throw TypeError();return Object(v)}function ToInt32(v){return v>>0}function ToUint32(v){return v>>>0}var LN2=Math.LN2,abs=Math.abs,floor=Math.floor,log=Math.log,max=Math.max,min=Math.min,pow=Math.pow,round=Math.round;(function(){var orig=Object.defineProperty;var dom_only=!function(){try{return Object.defineProperty({},"x",{})}catch(_){return false}}();if(!orig||dom_only){Object.defineProperty=function(o,prop,desc){if(orig)try{return orig(o,prop,desc)}catch(_){}if(o!==Object(o))throw TypeError("Object.defineProperty called on non-object");if(Object.prototype.__defineGetter__&&"get"in desc)Object.prototype.__defineGetter__.call(o,prop,desc.get);if(Object.prototype.__defineSetter__&&"set"in desc)Object.prototype.__defineSetter__.call(o,prop,desc.set);if("value"in desc)o[prop]=desc.value;return o}}})();function makeArrayAccessors(obj){if(obj.length>MAX_ARRAY_LENGTH)throw RangeError("Array too large for polyfill");function makeArrayAccessor(index){Object.defineProperty(obj,index,{get:function(){return obj._getter(index)},set:function(v){obj._setter(index,v)},enumerable:true,configurable:false})}var i;for(i=0;i>s}function as_unsigned(value,bits){var s=32-bits;return value<>>s}function packI8(n){return[n&255]}function unpackI8(bytes){return as_signed(bytes[0],8)}function packU8(n){return[n&255]}function unpackU8(bytes){return as_unsigned(bytes[0],8)}function packU8Clamped(n){n=round(Number(n));return[n<0?0:n>255?255:n&255]}function packI16(n){return[n>>8&255,n&255]}function unpackI16(bytes){return as_signed(bytes[0]<<8|bytes[1],16)}function packU16(n){return[n>>8&255,n&255]}function unpackU16(bytes){return as_unsigned(bytes[0]<<8|bytes[1],16)}function packI32(n){return[n>>24&255,n>>16&255,n>>8&255,n&255]}function unpackI32(bytes){return as_signed(bytes[0]<<24|bytes[1]<<16|bytes[2]<<8|bytes[3],32)}function packU32(n){return[n>>24&255,n>>16&255,n>>8&255,n&255]}function unpackU32(bytes){return as_unsigned(bytes[0]<<24|bytes[1]<<16|bytes[2]<<8|bytes[3],32)}function packIEEE754(v,ebits,fbits){var bias=(1<.5)return w+1;return w%2?w+1:w}if(v!==v){e=(1<=pow(2,1-bias)){e=min(floor(log(v)/LN2),1023);f=roundToEven(v/pow(2,e)*pow(2,fbits));if(f/pow(2,fbits)>=2){e=e+1;f=1}if(e>bias){e=(1<>1}}bits.reverse();str=bits.join("");bias=(1<0){return s*pow(2,e-bias)*(1+f/pow(2,fbits))}else if(f!==0){return s*pow(2,-(bias-1))*(f/pow(2,fbits))}else{return s<0?-0:0}}function unpackF64(b){return unpackIEEE754(b,11,52)}function packF64(v){return packIEEE754(v,11,52)}function unpackF32(b){return unpackIEEE754(b,8,23)}function packF32(v){return packIEEE754(v,8,23)}(function(){function ArrayBuffer(length){length=ToInt32(length);if(length<0)throw RangeError("ArrayBuffer size is not a small enough positive integer.");Object.defineProperty(this,"byteLength",{value:length});Object.defineProperty(this,"_bytes",{value:Array(length)});for(var i=0;i=1&&Type(arguments[0])==="object"&&arguments[0]instanceof $TypedArray$){return function(typedArray){if(this.constructor!==typedArray.constructor)throw TypeError();var byteLength=typedArray.length*this.BYTES_PER_ELEMENT;Object.defineProperty(this,"buffer",{value:new ArrayBuffer(byteLength)});Object.defineProperty(this,"byteLength",{value:byteLength});Object.defineProperty(this,"byteOffset",{value:0});Object.defineProperty(this,"length",{value:typedArray.length});for(var i=0;i=1&&Type(arguments[0])==="object"&&!(arguments[0]instanceof $TypedArray$)&&!(arguments[0]instanceof ArrayBuffer||Class(arguments[0])==="ArrayBuffer")){return function(array){var byteLength=array.length*this.BYTES_PER_ELEMENT;Object.defineProperty(this,"buffer",{value:new ArrayBuffer(byteLength)});Object.defineProperty(this,"byteLength",{value:byteLength});Object.defineProperty(this,"byteOffset",{value:0});Object.defineProperty(this,"length",{value:array.length});for(var i=0;i=1&&Type(arguments[0])==="object"&&(arguments[0]instanceof ArrayBuffer||Class(arguments[0])==="ArrayBuffer")){return function(buffer,byteOffset,length){byteOffset=ToUint32(byteOffset);if(byteOffset>buffer.byteLength)throw RangeError("byteOffset out of range");if(byteOffset%this.BYTES_PER_ELEMENT)throw RangeError("buffer length minus the byteOffset is not a multiple of the element size.");if(length===undefined){var byteLength=buffer.byteLength-byteOffset;if(byteLength%this.BYTES_PER_ELEMENT)throw RangeError("length of buffer minus byteOffset not a multiple of the element size");length=byteLength/this.BYTES_PER_ELEMENT}else{length=ToUint32(length);byteLength=length*this.BYTES_PER_ELEMENT}if(byteOffset+byteLength>buffer.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:buffer});Object.defineProperty(this,"byteLength",{value:byteLength});Object.defineProperty(this,"byteOffset",{value:byteOffset});Object.defineProperty(this,"length",{value:length})}.apply(this,arguments)}throw TypeError()}Object.defineProperty($TypedArray$,"from",{value:function(iterable){return new this(iterable)}});Object.defineProperty($TypedArray$,"of",{value:function(){return new this(arguments)}});var $TypedArrayPrototype$={};$TypedArray$.prototype=$TypedArrayPrototype$;Object.defineProperty($TypedArray$.prototype,"_getter",{value:function(index){if(arguments.length<1)throw SyntaxError("Not enough arguments");index=ToUint32(index);if(index>=this.length)return undefined;var bytes=[],i,o;for(i=0,o=this.byteOffset+index*this.BYTES_PER_ELEMENT;i=this.length)return;var bytes=this._pack(value),i,o;for(i=0,o=this.byteOffset+index*this.BYTES_PER_ELEMENT;i0){o._setter(to,o._getter(from));from=from+direction;to=to+direction;count=count-1}return o}});Object.defineProperty($TypedArray$.prototype,"every",{value:function(callbackfn){if(this===undefined||this===null)throw TypeError();var t=Object(this);var len=ToUint32(t.length);if(!IsCallable(callbackfn))throw TypeError();var thisArg=arguments[1];for(var i=0;i1?arguments[1]:undefined;var k=0;while(k1?arguments[1]:undefined;var k=0;while(k0){n=Number(arguments[1]);if(n!==n){n=0}else if(n!==0&&n!==1/0&&n!==-(1/0)){n=(n>0||-1)*floor(abs(n))}}if(n>=len)return-1;var k=n>=0?n:max(len-abs(n),0);for(;k1){n=Number(arguments[1]);if(n!==n){n=0}else if(n!==0&&n!==1/0&&n!==-(1/0)){n=(n>0||-1)*floor(abs(n))}}var k=n>=0?min(n,len-1):len-abs(n);for(;k>=0;k--){if(t._getter(k)===searchElement)return k}return-1}});Object.defineProperty($TypedArray$.prototype,"map",{value:function(callbackfn){if(this===undefined||this===null)throw TypeError();var t=Object(this);var len=ToUint32(t.length);if(!IsCallable(callbackfn))throw TypeError();var res=[];res.length=len;var thisp=arguments[1];for(var i=0;i=2){accumulator=arguments[1]}else{accumulator=t._getter(k++)}while(k=2){accumulator=arguments[1]}else{accumulator=t._getter(k--)}while(k>=0){accumulator=callbackfn.call(undefined,accumulator,t._getter(k),k,t);k--}return accumulator}});Object.defineProperty($TypedArray$.prototype,"reverse",{value:function(){if(this===undefined||this===null)throw TypeError();var t=Object(this);var len=ToUint32(t.length);var half=floor(len/2);for(var i=0,j=len-1;ithis.length){throw RangeError("Offset plus length of array is out of range")}byteOffset=this.byteOffset+offset*this.BYTES_PER_ELEMENT;byteLength=array.length*this.BYTES_PER_ELEMENT;if(array.buffer===this.buffer){tmp=[];for(i=0,s=array.byteOffset;ithis.length){throw RangeError("Offset plus length of array is out of range")}for(i=0;imax?max:v}start=ToInt32(start);end=ToInt32(end);if(arguments.length<1){start=0}if(arguments.length<2){end=this.length}if(start<0){start=this.length+start}if(end<0){end=this.length+end}start=clamp(start,0,this.length);end=clamp(end,0,this.length);var len=end-start;if(len<0){len=0}return new this.constructor(this.buffer,this.byteOffset+start*this.BYTES_PER_ELEMENT,len)}});function makeTypedArray(elementSize,pack,unpack){var TypedArray=function(){Object.defineProperty(this,"constructor",{value:TypedArray});$TypedArray$.apply(this,arguments);makeArrayAccessors(this)};if("__proto__"in TypedArray){TypedArray.__proto__=$TypedArray$}else{TypedArray.from=$TypedArray$.from;TypedArray.of=$TypedArray$.of}TypedArray.BYTES_PER_ELEMENT=elementSize;var TypedArrayPrototype=function(){};TypedArrayPrototype.prototype=$TypedArrayPrototype$;TypedArray.prototype=new TypedArrayPrototype;Object.defineProperty(TypedArray.prototype,"BYTES_PER_ELEMENT",{value:elementSize});Object.defineProperty(TypedArray.prototype,"_pack",{value:pack});Object.defineProperty(TypedArray.prototype,"_unpack",{value:unpack});return TypedArray}var Int8Array=makeTypedArray(1,packI8,unpackI8);var Uint8Array=makeTypedArray(1,packU8,unpackU8);var Uint8ClampedArray=makeTypedArray(1,packU8Clamped,unpackU8);var Int16Array=makeTypedArray(2,packI16,unpackI16);var Uint16Array=makeTypedArray(2,packU16,unpackU16);var Int32Array=makeTypedArray(4,packI32,unpackI32);var Uint32Array=makeTypedArray(4,packU32,unpackU32);var Float32Array=makeTypedArray(4,packF32,unpackF32);var Float64Array=makeTypedArray(8,packF64,unpackF64);global.Int8Array=global.Int8Array||Int8Array;global.Uint8Array=global.Uint8Array||Uint8Array;global.Uint8ClampedArray=global.Uint8ClampedArray||Uint8ClampedArray;global.Int16Array=global.Int16Array||Int16Array;global.Uint16Array=global.Uint16Array||Uint16Array;global.Int32Array=global.Int32Array||Int32Array;global.Uint32Array=global.Uint32Array||Uint32Array;global.Float32Array=global.Float32Array||Float32Array;global.Float64Array=global.Float64Array||Float64Array})();(function(){function r(array,index){return IsCallable(array.get)?array.get(index):array[index]}var IS_BIG_ENDIAN=function(){var u16array=new Uint16Array([4660]),u8array=new Uint8Array(u16array.buffer);return r(u8array,0)===18}();function DataView(buffer,byteOffset,byteLength){if(!(buffer instanceof ArrayBuffer||Class(buffer)==="ArrayBuffer"))throw TypeError();byteOffset=ToUint32(byteOffset);if(byteOffset>buffer.byteLength)throw RangeError("byteOffset out of range");if(byteLength===undefined)byteLength=buffer.byteLength-byteOffset;else byteLength=ToUint32(byteLength);if(byteOffset+byteLength>buffer.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:buffer});Object.defineProperty(this,"byteLength",{value:byteLength});Object.defineProperty(this,"byteOffset",{value:byteOffset})}function makeGetter(arrayType){return function GetViewValue(byteOffset,littleEndian){byteOffset=ToUint32(byteOffset);if(byteOffset+arrayType.BYTES_PER_ELEMENT>this.byteLength)throw RangeError("Array index out of range");byteOffset+=this.byteOffset;var uint8Array=new Uint8Array(this.buffer,byteOffset,arrayType.BYTES_PER_ELEMENT),bytes=[];for(var i=0;ithis.byteLength)throw RangeError("Array index out of range");var typeArray=new arrayType([value]),byteArray=new Uint8Array(typeArray.buffer),bytes=[],i,byteView;for(i=0;i= 0 for v in vertices): 202 | # finite region 203 | new_regions.append(vertices) 204 | continue 205 | 206 | # reconstruct a non-finite region 207 | ridges = all_ridges[p1] 208 | new_region = [v for v in vertices if v >= 0] 209 | 210 | for p2, v1, v2 in ridges: 211 | if v2 < 0: 212 | v1, v2 = v2, v1 213 | if v1 >= 0: 214 | # finite ridge: already in the region 215 | continue 216 | 217 | # Compute the missing endpoint of an infinite ridge 218 | 219 | t = vor.points[p2] - vor.points[p1] # tangent 220 | t /= np.linalg.norm(t) 221 | n = np.array([-t[1], t[0]]) # normal 222 | 223 | midpoint = vor.points[[p1, p2]].mean(axis=0) 224 | direction = np.sign(np.dot(midpoint - center, n)) * n 225 | far_point = vor.vertices[v2] + direction * radius 226 | 227 | new_region.append(len(new_vertices)) 228 | new_vertices.append(far_point.tolist()) 229 | 230 | # sort region counterclockwise 231 | vs = np.asarray([new_vertices[v] for v in new_region]) 232 | c = vs.mean(axis=0) 233 | angles = np.arctan2(vs[:,1] - c[1], vs[:,0] - c[0]) 234 | new_region = np.array(new_region)[np.argsort(angles)] 235 | 236 | # finish 237 | new_regions.append(new_region.tolist()) 238 | 239 | return new_regions, np.asarray(new_vertices) 240 | 241 | def plot_voronoi(points,colors,invert_y = True,edge_color = 'facecolor',line_width = .1,alpha = 1,size_max=np.inf): 242 | 243 | # spot_samp = spot#.sample#(n=100,random_state = 0) 244 | # points = spot_samp[['X:X','Y:Y']].values 245 | # colors = [sns.color_palette('bright')[i] for i in spot_samp['neighborhood10']] 246 | 247 | if invert_y: 248 | points[:,1] = max(points[:,1])-points[:,1] 249 | vor = Voronoi(points) 250 | 251 | regions, vertices = voronoi_finite_polygons_2d(vor) 252 | 253 | pts = MultiPoint([Point(i) for i in points]) 254 | mask = pts.convex_hull 255 | new_vertices = [] 256 | if type(alpha)!=list: 257 | alpha = [alpha]*len(points) 258 | areas = [] 259 | for i,(region,alph) in enumerate(zip(regions,alpha)): 260 | polygon = vertices[region] 261 | shape = list(polygon.shape) 262 | shape[0] += 1 263 | p = Polygon(np.append(polygon, polygon[0]).reshape(*shape)).intersection(mask) 264 | areas+=[p.area] 265 | if p.area 0: 298 | neigh_alpha = .3 299 | else: 300 | neigh_alpha = 1 301 | 302 | voronoi_kwargs = {**{'alpha':neigh_alpha},**voronoi_kwargs} 303 | scatter_kwargs = {**{'s':50,'alpha':1,'marker':'.'},**scatter_kwargs} 304 | 305 | plt.figure(figsize = figsize) 306 | colors = [voronoi_palette[i] for i in spot[voronoi_hue]] 307 | a = plot_voronoi(spot[[X,Y]].values, 308 | colors,#[{0:'white',1:'red',2:'purple'}[i] for i in spot['color']], 309 | **voronoi_kwargs) 310 | 311 | if len(c)>0: 312 | if 'c' not in scatter_kwargs: 313 | colors = [scatter_palette[i] for i in c[scatter_hue]] 314 | scatter_kwargs['c'] = colors 315 | 316 | plt.scatter(x = c[X],y = (max(spot[Y])-c[Y].values), 317 | **scatter_kwargs 318 | ) 319 | plt.axis('off'); 320 | return a 321 | 322 | 323 | 324 | 325 | 326 | #### 327 | 328 | import pandas as pd 329 | from voronoi import draw_voronoi_scatter 330 | cells2 = pd.read_csv("nh.csv") 331 | 332 | spot = cells2[cells2['File Name']=='I1'] 333 | _ = draw_voronoi_scatter(spot,[],) 334 | 335 | 336 | 337 | 338 | -------------------------------------------------------------------------------- /script/Code_for_genomic_correlation.R: -------------------------------------------------------------------------------- 1 | 2 | rm(list = ls()) 3 | load("./outres.list.rda") 4 | library(ggplot2) 5 | library(patchwork) 6 | 7 | cnlist = paste0("CN", 1:20) 8 | names(cnlist) = cnlist 9 | p.list = lapply(cnlist, function(i){ 10 | dat = outres.list[[i]] 11 | dat$gene = factor(dat$gene, levels = dat$gene) 12 | dat = dat[1:10,] 13 | dat$accuracy = 1/dat$SE 14 | dat$pval = ifelse(dat$P < 0.05, "sig", "non.sig") 15 | p1 = ggplot(dat, aes(coef,gene))+ 16 | geom_point(aes(size=accuracy,fill=type, colour = pval),shape = 21)+ 17 | scale_fill_manual(values = c("Gain" = "#D95745", "Loss" = "#5A8FC3", 18 | "SNV"= "#019A74") 19 | )+ 20 | scale_color_manual(values = c("sig" = "black", "non.sig"= "white")) + 21 | scale_y_discrete(position = "right") + 22 | scale_x_continuous(position = "top",limits = c(0,3),breaks = c(0,3), 23 | expand = c(0,0))+ 24 | labs(y = element_blank(), x = "Coefficient",title = i) + 25 | #theme_bw() + 26 | theme(panel.grid = element_blank(), 27 | panel.background = element_blank(), 28 | axis.text.x = element_text(colour = "black"), 29 | axis.text.y = element_text(colour = "black",size = 10), 30 | axis.line.x.top = element_line(), 31 | plot.title = element_text(hjust = 0.5,size = 15), 32 | #panel.border = element_rect(fill = NA,color="grey", linetype="solid"), 33 | legend.position = "none") 34 | 35 | 36 | p2 = ggplot(dat, aes(prop,gene))+geom_bar(aes(fill=type),stat = "identity")+ 37 | scale_fill_manual(values = c("Gain" = "#D95745", "Loss" = "#5A8FC3", 38 | "SNV"= "#019A74") 39 | )+ 40 | scale_y_discrete(position = "left") + 41 | scale_x_continuous(limits = c(0,0.7),breaks = c(0,0.7), 42 | expand = c(0,0))+ 43 | labs(y = element_blank())+ 44 | theme(panel.grid = element_blank(), 45 | axis.text.y = element_blank(), 46 | axis.title.x = element_blank(), 47 | axis.line.x.bottom = element_line(), 48 | axis.ticks.y.right = element_blank() 49 | ) 50 | 51 | p = p1 + p2 52 | return(p) 53 | } 54 | ) 55 | p.merge = (p.list$CN1|p.list$CN2|p.list$CN3|p.list$CN4|p.list$CN5|plot_layout(nrow = 1))/ 56 | (p.list$CN6|p.list$CN7|p.list$CN8|p.list$CN9|p.list$CN10|plot_layout(nrow = 1))/ 57 | (p.list$CN11|p.list$CN12|p.list$CN13|p.list$CN14|p.list$CN15|plot_layout(nrow = 1))/ 58 | (p.list$CN16|p.list$CN17|p.list$CN18|p.list$CN19|p.list$CN20|plot_layout(nrow = 1))+ 59 | guide_area()+plot_layout(guides = "collect") 60 | ggsave(p.merge, file = "p.merge.pdf", width = 16,height = 12) 61 | 62 | -------------------------------------------------------------------------------- /script/Colony_NK-like_T_show.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import cv2 as cv 3 | import os 4 | import pickle 5 | import argparse 6 | import time 7 | from math import * 8 | 9 | # Start time 10 | start_time = time.time() 11 | 12 | 13 | # Capture parameters 14 | parser = argparse.ArgumentParser(description='Script for colony contour visualization') 15 | parser.add_argument('path', type=str, help='your data path') 16 | args = parser.parse_args() 17 | print("First parameter:", args.path) 18 | 19 | # Get all folders in this directory 20 | path = args.path 21 | os.chdir(path) 22 | 23 | print("Working directory set to:", path) 24 | 25 | # Get image directories 26 | image_dir = [i for i in os.listdir("./") if i[3] == "_" and i[0] != "."] 27 | 28 | for s in image_dir: 29 | print(s) 30 | 31 | # Read cell type names 32 | image_cell=open(f'../result/{s}/{s}_image_cell.csv',"r") 33 | image_cell_list=[] 34 | 35 | for i in image_cell: 36 | orig=i.strip().split(".jpg") 37 | image_cell_list=orig[:-1] 38 | 39 | # Read contour files 40 | with open(f'../result/{s}/{s}_contours_list.pkl', 'rb') as file: 41 | contours_list = pickle.load(file) 42 | 43 | # Filter desired cell type combinations 44 | cell_type1 = 'NK-like T' 45 | file_names_group_1 = [i for i in image_cell_list if cell_type1 in i] 46 | 47 | print("---------Read coordinate files---------") 48 | print(s) 49 | 50 | # Read file 51 | with open(f"./{s}/{s}_celltype_area.csv", "r") as in_put1: 52 | data_result = [line.strip().split(",") for line in in_put1] 53 | 54 | # Calculate the maximum and minimum coordinate ranges 55 | a = max(float(i[3]) for i in data_result) 56 | b = max(float(i[4]) for i in data_result) 57 | a1 = min(float(i[3]) for i in data_result) 58 | b1 = min(float(i[4]) for i in data_result) 59 | 60 | y_max = 100 * ceil(round(a / 100, 1)) + 200 61 | x_max = 100 * ceil(round(b / 100, 1)) + 200 62 | 63 | print("x-max: ", x_max) 64 | print("y-max: ", y_max) 65 | 66 | # Get cell types 67 | cells = [i[6] for i in data_result] 68 | cell_type = list(set(cells)) 69 | 70 | # Calculate cell areas and coordinates 71 | area = [[] for _ in range(len(set(i[6] for i in data_result)))] 72 | data_points = [[] for _ in range(len(area))] 73 | 74 | for i in data_result: 75 | data_point = [int(round(float(i[3]))), int(round(float(i[4])))] 76 | area[cell_type.index(i[6])].append(float(i[5])) 77 | data_points[cell_type.index(i[6])].append(data_point) 78 | 79 | print("---------Generate corresponding cell point images---------") 80 | 81 | # Create white image 82 | image = np.ones((x_max, y_max), np.uint8) * 255 83 | 84 | f = f"../result/{s}/Process_text/{s}_NK-like_show.jpg" 85 | cv.imwrite(f, image) # Save image 86 | img = cv.imread(f) 87 | 88 | contours_1 = contours_list[image_cell_list.index(file_names_group_1[0])] 89 | cv.drawContours(img, contours_1, -1, (87, 139, 46), 10) 90 | 91 | cell_type_new = [i.strip('"') for i in cell_type] 92 | 93 | for i in range(len(cell_type)): 94 | r = round(np.sqrt(np.median(area[i]) / np.pi), 1) 95 | print(cell_type[i], ":", r) 96 | for data_point in data_points[i]: 97 | cv.circle(img, tuple(data_point), int(r), (195, 192, 192), -1) 98 | 99 | # Overlay NK-like T cells 100 | if file_names_group_1: 101 | i = cell_type_new.index(cell_type1) 102 | r = round(np.sqrt(np.median(area[i]) / np.pi), 1) 103 | for data_point in data_points[i]: 104 | cv.circle(img, tuple(data_point), int(r), (87, 139, 46), -1) 105 | 106 | print("---------Save recognized contour images---------") 107 | f = f"../result/{s}/Process_text/{s}_NK-like_show.jpg" 108 | cv.imwrite(f, img) 109 | 110 | print(file_names_group_1) 111 | 112 | # End time 113 | end_time = time.time() 114 | print(s + " Finished!: ", round((end_time - start_time), 2), " s") 115 | -------------------------------------------------------------------------------- /script/Colony_SCLC-A_show.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import cv2 as cv 3 | import os 4 | import pickle 5 | import argparse 6 | import time 7 | from math import * 8 | 9 | # Start time 10 | start_time = time.time() 11 | 12 | # Capture parameters 13 | parser = argparse.ArgumentParser(description='Script for colony contour visualization') 14 | parser.add_argument('path', type=str, help='your data path') 15 | args = parser.parse_args() 16 | print("First parameter:", args.path) 17 | 18 | # Get all folders in this directory 19 | path = args.path 20 | os.chdir(path) 21 | 22 | print("Working directory set to:", path) 23 | 24 | # Get image directories 25 | image_dir = [i for i in os.listdir("./") if i[3] == "_" and i[0] != "."] 26 | 27 | for s in image_dir: 28 | print(s) 29 | 30 | # Read cell type names 31 | image_cell=open(f'../result/{s}/{s}_image_cell.csv',"r") 32 | image_cell_list=[] 33 | 34 | for i in image_cell: 35 | orig=i.strip().split(".jpg") 36 | image_cell_list=orig[:-1] 37 | 38 | 39 | # Read contour files 40 | file_path = f'../result/{s}/{s}_contours_list.pkl' 41 | with open(file_path, 'rb') as file: 42 | contours_list = pickle.load(file) 43 | 44 | # Filter desired cell type combinations 45 | cell_type1 = 'cancer cell type1' 46 | file_names_group_1 = [i for i in image_cell_list if cell_type1 in i] 47 | 48 | print("---------Read coordinate files---------") 49 | print(s) 50 | 51 | # Read file 52 | with open(f"./{s}/{s}_celltype_area.csv", "r") as in_put1: 53 | data_result = [line.strip().split(",") for line in in_put1] 54 | 55 | # Calculate the maximum and minimum coordinate ranges 56 | a = max(float(i[3]) for i in data_result) 57 | b = max(float(i[4]) for i in data_result) 58 | a1 = min(float(i[3]) for i in data_result) 59 | b1 = min(float(i[4]) for i in data_result) 60 | 61 | y_max = 100 * ceil(round(a / 100, 1)) + 200 62 | x_max = 100 * ceil(round(b / 100, 1)) + 200 63 | 64 | print("x-max:", x_max) 65 | print("y-max:", y_max) 66 | 67 | # Get cell types 68 | cells = [i[6] for i in data_result] 69 | cell_type = list(set(cells)) 70 | 71 | 72 | # Calculate cell areas and coordinates 73 | area = [[] for _ in range(len(set(i[6] for i in data_result)))] 74 | data_points = [[] for _ in range(len(area))] 75 | 76 | for i in data_result: 77 | data_point = [int(round(float(i[3]))), int(round(float(i[4])))] 78 | area[cell_type.index(i[6])].append(float(i[5])) 79 | data_points[cell_type.index(i[6])].append(data_point) 80 | 81 | print("---------Generate corresponding cell point images---------") 82 | 83 | # Create white image 84 | img = np.ones((x_max, y_max), np.uint8) * 255 85 | 86 | f = f"../result/{s}/Process_text/{s}_SCLC_A_show.jpg" 87 | cv.imwrite(f, img) #第一级目录下生成 88 | img = cv.imread(f) 89 | 90 | print("file_names_group_1:",file_names_group_1) 91 | contours_1=contours_list[image_cell_list.index(file_names_group_1[0])] 92 | 93 | 94 | cv.drawContours(img, contours_1,-1, (255,225,0),10) 95 | 96 | cell_type_new=[] 97 | for i in cell_type: 98 | cell_type_new.append(i.strip('"')) 99 | 100 | for i in range(len(cell_type)): 101 | r = round(np.sqrt(np.median(area[i]) / np.pi), 1) 102 | print(cell_type[i], ":", r) 103 | for data_point in data_points[i]: 104 | cv.circle(img, tuple(data_point), int(r), (192, 192, 192), -1) 105 | 106 | # Overlay SCLC-A cells 107 | if file_names_group_1: 108 | i = cell_type_new.index(cell_type1) 109 | r = round(np.sqrt(np.median(area[i]) / np.pi), 1) 110 | for data_point in data_points[i]: 111 | cv.circle(img, tuple(data_point), int(r), (255, 225, 0), -1) 112 | 113 | print("---------Save recognized contour images---------") 114 | f = f"../result/{s}/Process_text/{s}_SCLC_A_show.jpg" 115 | cv.imwrite(f, img) 116 | 117 | print(file_names_group_1) 118 | 119 | # End time 120 | end_time = time.time() 121 | print(s + " Finished!: ", round((end_time - start_time),2), " s") 122 | -------------------------------------------------------------------------------- /script/Colony_macrophage_show.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import cv2 as cv 3 | import os 4 | import pickle 5 | import argparse 6 | import time 7 | from math import * 8 | 9 | # Start time 10 | start_time = time.time() 11 | 12 | # Capture parameters 13 | parser = argparse.ArgumentParser(description='Script for colony contour visualization') 14 | parser.add_argument('path', type=str, help='your data path') 15 | args = parser.parse_args() 16 | print("First parameter:", args.path) 17 | 18 | # Get all folders in this directory 19 | path = args.path 20 | os.chdir(path) 21 | 22 | print("Working directory set to:", path) 23 | 24 | # Get image directories 25 | image_dir = [i for i in os.listdir("./") if i[3] == "_" and i[0] != "."] 26 | 27 | for s in image_dir: 28 | print(s) 29 | 30 | # Read cell type names 31 | image_cell=open(f'../result/{s}/{s}_image_cell.csv',"r") 32 | image_cell_list=[] 33 | 34 | for i in image_cell: 35 | orig=i.strip().split(".jpg") 36 | image_cell_list=orig[:-1] 37 | 38 | 39 | 40 | # Read contour files 41 | with open(f'../result/{s}/{s}_contours_list.pkl', 'rb') as file: 42 | contours_list = pickle.load(file) 43 | 44 | # Filter desired cell type combinations 45 | cell_type1 = 'Macrophage' 46 | file_names_group_1 = [i for i in image_cell_list if cell_type1 in i] 47 | 48 | print("---------Read coordinate files---------") 49 | print(s) 50 | 51 | # Read file 52 | with open(f"./{s}/{s}_celltype_area.csv", "r") as in_put1: 53 | data_result = [line.strip().split(",") for line in in_put1] 54 | 55 | # Find max and min coordinate ranges 56 | a = max(float(i[3]) for i in data_result) 57 | a1 = min(float(i[3]) for i in data_result) 58 | b = max(float(i[4]) for i in data_result) 59 | b1 = min(float(i[4]) for i in data_result) 60 | # Calculate the maximum and minimum coordinate ranges 61 | 62 | 63 | y_max = 100 * ceil(round(a / 100, 1)) + 200 64 | x_max = 100 * ceil(round(b / 100, 1)) + 200 65 | 66 | print("x-max: ", x_max) 67 | print("y-max: ", y_max) 68 | 69 | # Get cell types 70 | cells = [i[6] for i in data_result] 71 | cell_type = list(set(cells)) 72 | 73 | # Calculate cell areas and coordinates 74 | area = [[] for _ in range(len(set(i[6] for i in data_result)))] 75 | data_points = [[] for _ in range(len(area))] 76 | 77 | for i in data_result: 78 | data_point = [int(round(float(i[3]))), int(round(float(i[4])))] 79 | area[cell_type.index(i[6])].append(float(i[5])) 80 | data_points[cell_type.index(i[6])].append(data_point) 81 | 82 | print("---------Generate corresponding cell point images---------") 83 | 84 | # Create white image 85 | image = np.ones((x_max, y_max), np.uint8) * 255 86 | 87 | f = f"../result/{s}/Process_text/{s}_Macrophage_show.jpg" 88 | cv.imwrite(f, image) # Save image 89 | img = cv.imread(f) 90 | 91 | contours_1 = contours_list[image_cell_list.index(file_names_group_1[0])] 92 | cv.drawContours(img, contours_1, -1, (0, 0, 128), 10) 93 | 94 | cell_type_new = [i.strip('"') for i in cell_type] 95 | 96 | for i in range(len(cell_type)): 97 | r = round(np.sqrt(np.median(area[i]) / np.pi), 1) 98 | print(cell_type[i], ":", r) 99 | for data_point in data_points[i]: 100 | cv.circle(img, tuple(data_point), int(r), (193, 192, 192), -1) 101 | 102 | # Overlay Macrophage cells 103 | if file_names_group_1: 104 | i = cell_type_new.index(cell_type1) 105 | r = round(np.sqrt(np.median(area[i]) / np.pi), 1) 106 | for data_point in data_points[i]: 107 | cv.circle(img, tuple(data_point), int(r), (0, 0, 128), -1) 108 | 109 | print("---------Save recognized contour images---------") 110 | f = f"../result/{s}/Process_text/{s}_Macrophage_show.jpg" 111 | cv.imwrite(f, img) 112 | 113 | print(file_names_group_1) 114 | 115 | # End time 116 | end_time = time.time() 117 | print(s + " Finished!: ", round((end_time - start_time), 2), " s") 118 | -------------------------------------------------------------------------------- /script/Colony_recognition.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import cv2 as cv 3 | import os 4 | from math import * 5 | import matplotlib.pyplot as plt 6 | import pickle 7 | import argparse 8 | import time 9 | 10 | # Start time 11 | start_time = time.time() 12 | 13 | # Capture parameters 14 | parser = argparse.ArgumentParser(description='Script for colony contour recognition') 15 | parser.add_argument('path', type=str, help='your data path') 16 | args = parser.parse_args() 17 | print("First parameter:", args.path) 18 | 19 | # Get all folders in this directory 20 | path = args.path 21 | os.chdir(path) 22 | 23 | print("Set working directory to: ", path) 24 | 25 | image_dir = [i for i in os.listdir("./") if i[3] == "_" and i[0] != "."] 26 | 27 | print(image_dir) 28 | 29 | for s in image_dir: 30 | print(s) 31 | # Create corresponding result folders 32 | result_folder1 = "../result/" + s + "/image" 33 | result_folder2 = "../result/" + s + "/Process_text" 34 | 35 | 36 | os.makedirs(result_folder1, exist_ok=True) 37 | os.makedirs(result_folder2, exist_ok=True) 38 | 39 | 40 | print("---------Read coordinate file---------") 41 | print(s) 42 | # Read file 43 | with open("./" + s + "/" + s + "_celltype_area.csv", "r") as in_put1: 44 | data_result = [i.strip().split(",") for i in in_put1] 45 | 46 | # Calculate the maximum and minimum coordinate ranges 47 | a = max(float(i[3]) for i in data_result) 48 | b = max(float(i[4]) for i in data_result) 49 | a1 = min(float(i[3]) for i in data_result) 50 | b1 = min(float(i[4]) for i in data_result) 51 | 52 | y = 100 * ceil(round(a / 100, 1)) + 200 53 | x = 100 * ceil(round(b / 100, 1)) + 200 54 | 55 | print("x-max: ", x) 56 | print("y-max: ", y) 57 | 58 | # Count cell types 59 | cells = [i[6] for i in data_result] 60 | cell_type = list(set(cells)) 61 | 62 | # Store cell area and coordinates 63 | area = [[] for _ in range(len(cell_type))] 64 | data_points = [[] for _ in range(len(cell_type))] 65 | 66 | for i in data_result: 67 | data_point = [int(round(float(i[3]))), int(round(float(i[4])))] 68 | area[cell_type.index(i[6])].append(float(i[5])) 69 | data_points[cell_type.index(i[6])].append(data_point) 70 | 71 | x_max = max(max(i) for i in area) + 1 72 | 73 | print(x_max) 74 | 75 | print("---------Draw contour of the entire core---------") 76 | 77 | data_points_list = [[int(round(float(i[3]))), int(round(float(i[4])))] for i in data_result] 78 | 79 | # Draw contour of the entire core 80 | image = np.zeros((x, y), dtype=np.uint8) 81 | for data_point in data_points_list: 82 | cv.circle(image, tuple(data_point), 2, 255, -1) 83 | f = "../result/" + s + "/" + s + "_core_Whole_Core_Contour.jpg" 84 | print(f) 85 | cv.imwrite(f, image) # Generate in the first-level directory 86 | 87 | print("---------Plot cell type area distribution---------") 88 | 89 | # Calculate the number of rows and columns of subplots 90 | num_plots = len(cell_type) 91 | num_rows = int(np.sqrt(num_plots)) 92 | num_cols = int(np.ceil(num_plots / num_rows)) 93 | 94 | # Create canvas and set subplot layout 95 | fig, axes = plt.subplots(nrows=num_rows, ncols=num_cols, figsize=(12, 8)) 96 | 97 | # Draw subplots 98 | for i, ax in enumerate(axes.flatten()): 99 | if i < num_plots: 100 | ax.hist(area[i], bins=range(round(min(area[i]) - 2), round(max(area[i]) + 2)), edgecolor='black') 101 | ax.set_xlim(right=x_max) 102 | ax.set_xticks(np.arange(0, x_max, int(x_max / 10) * 5)) 103 | ax.set_title(cell_type[i]) 104 | ax.set_xlabel('Area / µm2') 105 | ax.set_ylabel('Counts / cells') 106 | else: 107 | ax.axis('off') # Hide extra subplots 108 | 109 | # Adjust spacing between subplots 110 | plt.subplots_adjust(wspace=1, hspace=1) 111 | 112 | f = "../result/" + s + "/" + s + '_cell_type_area.png' 113 | 114 | # Save the image 115 | plt.savefig(f, dpi=1000, bbox_inches='tight') # Generate in the first-level directory 116 | 117 | print("---------Generate corresponding cell point maps---------") 118 | 119 | for i in range(len(cell_type)): 120 | image = np.zeros((x, y), dtype=np.uint8) 121 | r = round(sqrt(np.median(area[i]) / pi), 1) 122 | print(cell_type[i], " : ", r) 123 | for data_point in data_points[i]: 124 | cv.circle(image, tuple(data_point), int(r), 255, -1) 125 | f = "../result/" + s + "/image/" + s + '_' + cell_type[i].strip('"') + ".jpg" 126 | cv.imwrite(f, image) # Generate in the second-level directory 127 | 128 | print("---------Read corresponding cell point maps---------") 129 | file_names = [i for i in os.listdir("../result/" + s + "/image/") if i[-3:] == 'jpg'] 130 | 131 | contours_list = [] 132 | 133 | # Define area threshold 134 | area_threshold = 2000 135 | 136 | image_cell = open('../result/' + s + '/' + s + '_image_cell.csv', 'w') 137 | 138 | print("---------Contour identification---------") 139 | for jpg_file in file_names: 140 | print("../result/" + s + "/image/" + jpg_file) 141 | image_cell.write(jpg_file) 142 | # Read the image 143 | img = cv.imread("../result/" + s + "/image/" + jpg_file) 144 | # Convert to grayscale 145 | imggray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) 146 | # Binarize 147 | ret, thresh = cv.threshold(imggray, 9, 255, 0, cv.THRESH_OTSU) 148 | 149 | # Dilate 150 | kernel = cv.getStructuringElement(cv.MORPH_ELLIPSE, (30, 30)) 151 | dilated = cv.dilate(thresh, kernel, iterations=1) 152 | 153 | # Find contours 154 | contours, hierarchy = cv.findContours(dilated, cv.RETR_EXTERNAL, cv.CHAIN_APPROX_SIMPLE) 155 | 156 | # Create blank image for contour drawing 157 | height, width, _ = img.shape 158 | background = np.zeros((height, width), dtype=np.uint8) 159 | 160 | for i in range(len(contours)): 161 | contour = contours[i] 162 | area = cv.contourArea(contour) 163 | if area < area_threshold: 164 | cv.polylines(img, [contour], True, (0, 0, 255), 3) 165 | moments = cv.moments(contour) 166 | cx = int(moments['m10'] / moments['m00']) + 20 167 | cy = int(moments['m01'] / moments['m00']) - 20 168 | 169 | # Label contour number on the image (adjust font size) 170 | font_scale = 1 171 | font_thickness = 4 172 | cv.putText(img, str(i), (cx, cy), cv.FONT_HERSHEY_SIMPLEX, font_scale, (0, 0, 255), font_thickness, 173 | cv.LINE_AA) 174 | 175 | else: 176 | moments = cv.moments(contour) 177 | cx = int(moments['m10'] / moments['m00']) + 20 178 | cy = int(moments['m01'] / moments['m00']) - 20 179 | 180 | font_scale = 1 181 | font_thickness = 4 182 | cv.putText(img, str(i), (cx, cy), cv.FONT_HERSHEY_SIMPLEX, font_scale, (0, 255, 0), font_thickness, 183 | cv.LINE_AA) 184 | 185 | cv.drawContours(img, [contour], -1, (0, 255, 0), 2) 186 | 187 | area = cv.contourArea(contour) 188 | 189 | contours_list.append(contours) 190 | 191 | print("---------Store recognized contour images---------") 192 | f = "../result/" + s + "/Process_text/" + jpg_file.split(".jpg")[0] + ".jpg" 193 | print(f) 194 | cv.imwrite(f, img) # Generate in the second-level directory 195 | 196 | 197 | # Save contour list to file 198 | with open('../result/' + s + '/' + s + '_contours_list.pkl', 'wb') as file: 199 | pickle.dump(contours_list, file) 200 | 201 | # Save cell type order to file 202 | image_cell.close() 203 | 204 | # End time 205 | end_time = time.time() 206 | 207 | print(s + " Finished! : ", round((end_time - start_time),2), "s") 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /script/Statistical_Analysis.R: -------------------------------------------------------------------------------- 1 | rm(list=ls()) 2 | library(dplyr) 3 | library(readxl) 4 | library(data.table) 5 | fs = fread("all.csv",data.table=F) 6 | data = read_xlsx("F:/ANANLYSIS/INTERACTION/csv/core.xlsx") 7 | lc = df %>% 8 | select(Image,Name,celltype,Parent) %>% 9 | dplyr::left_join(data,by = c('Image' = 'location')) 10 | 11 | m = {} 12 | for (n in unique(lc$Image)) { 13 | lc1 = lc %>% 14 | dplyr::filter(Image == x) 15 | all_cell = table(lc1$Image) 16 | for (i in unique(lc1$celltype)) { 17 | lc2 = lc1 %>% 18 | dplyr::filter(celltype == i) 19 | celltype = table(lc2$Image) 20 | m[[n]][i] = celltype/all_cell 21 | } 22 | } 23 | g = m %>% 24 | do.call(rbind,.) %>% 25 | as.data.frame() 26 | 27 | S = subset(g,sORm == "S") 28 | M = subset(g,sORm == "M") 29 | Neg = subset(g,sORm == "Neg") 30 | 31 | S_cor = cor(S,method = 'spearman') 32 | M_cor = cor(M,method = 'spearman') 33 | Neg_cor = cor(Neg,method = 'spearman') -------------------------------------------------------------------------------- /script/Subburst_Chart.R: -------------------------------------------------------------------------------- 1 | library(plotly) 2 | 3 | data_plot<-read.table(file="../data/Subburst_Chart_data.csv",header = T,sep = ",") 4 | 5 | 6 | p1<-plot_ly(data = data_plot,color = I("black"),size = I(30), 7 | labels = ~label, 8 | parents = ~parent, 9 | values = ~value, 10 | type='sunburst' 11 | #color = data_plot$label 12 | ) 13 | 14 | p1 15 | 16 | pal<-c("#7E6148FF","#00A087FF","#DC0000FF","#E64B35FF","#F39B7FFF","#4DBBD5FF","#91D1C2FF","#3C5488FF","#8491B4FF","#B09C85FF") 17 | p2<-p1%>%layout(colorway=pal) 18 | 19 | p2 20 | 21 | 22 | -------------------------------------------------------------------------------- /script/cosmx_code.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "id": "b8ecf118-a68b-414b-adfe-a475fcb07319", 7 | "metadata": {}, 8 | "outputs": [], 9 | "source": [ 10 | "# import packages\n", 11 | "import scanpy as sc\n", 12 | "import squidpy as sq\n", 13 | "\n", 14 | "sys.path.append('./Banksy_py')\n", 15 | "from banksy.initialize_banksy import initialize_banksy\n", 16 | "from banksy.embed_banksy import generate_banksy_matrix\n", 17 | "from banksy_utils.umap_pca import pca_umap\n", 18 | "from banksy.cluster_methods import run_Leiden_partition\n", 19 | "\n", 20 | "\n", 21 | "adata = sc.read('sample.h5ad')" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": null, 27 | "id": "acc5d018-4f99-46c9-8005-df51a7514e23", 28 | "metadata": {}, 29 | "outputs": [], 30 | "source": [ 31 | "# preprocess\n", 32 | "adata.layers[\"counts\"] = adata.X.copy()\n", 33 | "sc.pp.calculate_qc_metrics(adata, percent_top=None, inplace=True)\n", 34 | "\n", 35 | "sc.external.pp.scrublet(adata, n_prin_comps=30)\n", 36 | "adata = adata[adata.obs['predicted_doublet']==False]\n", 37 | "adata = adata[(adata.obs['nFeature_RNA']>=60) & (adata.obs['nCount_RNA']>=100) & (adata.obs['nCount_negprobes']<0.1*adata.obs['nCount_RNA']) & (adata.obs['nCount_RNA']/adata.obs['nFeature_RNA']>1)]\n", 38 | "sc.pp.filter_genes(adata, min_cells=3)\n", 39 | "\n", 40 | "sc.pp.normalize_total(adata)\n", 41 | "sc.pp.log1p(adata)\n", 42 | "adata.raw = adata\n", 43 | "\n", 44 | "sc.pp.highly_variable_genes(adata, flavor='seurat', n_top_genes=1000, batch_key='sample')\n", 45 | "hvg_filter = adata.var[\"highly_variable\"]\n", 46 | "adata_all = adata.copy()\n", 47 | "adata = adata[:, hvg_filter]" 48 | ] 49 | }, 50 | { 51 | "cell_type": "code", 52 | "execution_count": null, 53 | "id": "96eb25a8-c2bf-40ef-9f43-10bae508652f", 54 | "metadata": {}, 55 | "outputs": [], 56 | "source": [ 57 | "# Scanpy umap&cluster\n", 58 | "adata = sc.pp.scale(adata)\n", 59 | "sc.tl.pca(adata)\n", 60 | "sc.pp.neighbors(adata)\n", 61 | "\n", 62 | "sc.tl.umap(adata)\n", 63 | "sc.tl.leiden(adata,key_added='scanpy_leiden',resolution=1)" 64 | ] 65 | }, 66 | { 67 | "cell_type": "code", 68 | "execution_count": null, 69 | "id": "e1c5b773-664c-44ae-985a-6cfd8edb4464", 70 | "metadata": {}, 71 | "outputs": [], 72 | "source": [ 73 | "# Banksy umap&cluster\n", 74 | "coord_keys=('x_slide_mm','y_slide_mm','spatial')\n", 75 | "k_geom=8\n", 76 | "nbr_weight_decay=\"scaled_gaussian\"\n", 77 | "max_m=1\n", 78 | "lambda_list=[0.1]\n", 79 | "resolutions=[1]\n", 80 | "\n", 81 | "banksy_dict = initialize_banksy(\n", 82 | " adata,\n", 83 | " coord_keys,\n", 84 | " k_geom,\n", 85 | " nbr_weight_decay=nbr_weight_decay,\n", 86 | " max_m=max_m,\n", 87 | " plt_edge_hist=False,\n", 88 | " plt_nbr_weights=False,\n", 89 | " plt_agf_angles=False,\n", 90 | " plt_theta=False\n", 91 | ")\n", 92 | "banksy_dict, banksy_matrix = generate_banksy_matrix(adata, banksy_dict, lambda_list, max_m, variance_balance=True)\n", 93 | "pca_umap(\n", 94 | " banksy_dict,\n", 95 | " pca_dims = [20],\n", 96 | " add_umap = True,\n", 97 | " plt_remaining_var = False\n", 98 | ")\n", 99 | "results_df, max_num_labels = run_Leiden_partition(\n", 100 | " banksy_dict,\n", 101 | " resolutions,\n", 102 | " num_nn = 50,\n", 103 | " num_iterations = -1,\n", 104 | " partition_seed = 1234,\n", 105 | " match_labels = True\n", 106 | ")\n", 107 | "\n", 108 | "banksy_adata = banksy_dict[nbr_weight_decay][0.1]['adata']\n", 109 | "reorder_banksy_adata = banksy_adata[adata.obs_names]\n", 110 | "adata.obsm['X_umap'] = reorder_banksy_adata.obsm['reduced_pc_20_umap']\n", 111 | "adata.obs['banksy_leiden'] = reorder_banksy_adata.obs['scaled_gaussian_pc20_nc0.1_r1']" 112 | ] 113 | }, 114 | { 115 | "cell_type": "code", 116 | "execution_count": null, 117 | "id": "ce3f2edf-3556-4be7-9018-eda4949e2841", 118 | "metadata": {}, 119 | "outputs": [], 120 | "source": [ 121 | "# squidpy co_occurrence\n", 122 | "sq.gr.spatial_neighbors(adata, coord_type=\"generic\", delaunay=True)\n", 123 | "sq.gr.co_occurrence(adata,spatial_key='spatial',cluster_key='sclc_celltype')\n", 124 | "sq.pl.co_occurrence(\n", 125 | " adata,\n", 126 | " cluster_key='sclc_celltype',\n", 127 | " clusters='Endothelial'\n", 128 | ")" 129 | ] 130 | } 131 | ], 132 | "metadata": { 133 | "kernelspec": { 134 | "display_name": "Python 3 (ipykernel)", 135 | "language": "python", 136 | "name": "python3" 137 | }, 138 | "language_info": { 139 | "codemirror_mode": { 140 | "name": "ipython", 141 | "version": 3 142 | }, 143 | "file_extension": ".py", 144 | "mimetype": "text/x-python", 145 | "name": "python", 146 | "nbconvert_exporter": "python", 147 | "pygments_lexer": "ipython3", 148 | "version": "3.9.20" 149 | } 150 | }, 151 | "nbformat": 4, 152 | "nbformat_minor": 5 153 | } 154 | --------------------------------------------------------------------------------