├── .gitignore ├── .ipynb_checkpoints └── README-checkpoint.md ├── README.md ├── data ├── Fig5b_DEG.csv ├── Fig5d.csv ├── Fig6b_DEG.csv ├── GO_BP_Seurat.csv ├── GO_BP_edgeR.csv ├── KEGG_select.xlsx ├── fig4b_DEG.csv ├── fig4d.csv ├── fig5b_DEG.csv ├── neurotransmitter.txt ├── npc_Seurat_de.csv ├── npc_rmdonor_DEG.csv └── pfc_gene_anno.txt ├── figures ├── Extended Data Figures │ ├── Extended Data Fig 1.pdf │ ├── Extended Data Fig 2.pdf │ ├── Extended Data Fig. 3.pdf │ ├── Extended Data Fig. 4.pdf │ ├── Extended Data Fig. 5.pdf │ └── Extended Data Fig. 6.pdf ├── Main Figures │ ├── Figure 1.pdf │ ├── Figure 2.pdf │ ├── Figure 3.pdf │ ├── Figure 4.pdf │ ├── Figure 5.pdf │ └── Figure 6.pdf └── Supplementary Figures │ ├── Supplementary Figure 1.pdf │ ├── Supplementary Figure 10.pdf │ ├── Supplementary Figure 11.pdf │ ├── Supplementary Figure 2.pdf │ ├── Supplementary Figure 3.pdf │ ├── Supplementary Figure 4.pdf │ ├── Supplementary Figure 5.pdf │ ├── Supplementary Figure 6.pdf │ ├── Supplementary Figure 7.pdf │ ├── Supplementary Figure 8.pdf │ └── Supplementary Figure 9.pdf ├── notebooks ├── Extended Data Figures │ ├── ExtFig. 1.ipynb │ ├── ExtFig. 2.ipynb │ ├── ExtFig. 4.ipynb │ ├── ExtFig. 5_6.ipynb │ └── ExtFig. 7.r └── Main Figures │ ├── Fig. 1.ipynb │ ├── Fig. 2.ipynb │ ├── Fig. 3.ipynb │ ├── Fig. 4.ipynb │ ├── Fig. 5.ipynb │ └── Fig. 6.ipynb ├── results ├── Supplementary Table 1.xlsx ├── Supplementary Table 2.xlsx ├── Supplementary Table 3.xlsx ├── Supplementary Table 4.xlsx ├── Supplementary Table 5.xlsx ├── Supplementary Table 6.xlsx ├── Supplementary Table 7.xlsx └── Supplementary Table 8.xlsx └── scripts ├── NPC_DEG_analysis.r ├── Supplementary Fig. 10.ipynb ├── Supplementary Fig. 4.ipynb ├── Supplementary Fig. 5.ipynb ├── Supplementary Fig. 6-9.ipynb ├── soupX_analysis.ipynb └── soupX_pp.ipynb /.gitignore: -------------------------------------------------------------------------------- 1 | .ipynb_checkpoints/README-checkpoint.md 2 | .ipynb_checkpoints/ 3 | -------------------------------------------------------------------------------- /.ipynb_checkpoints/README-checkpoint.md: -------------------------------------------------------------------------------- 1 | # BrainCellAtlas Reproducibility 2 | 3 | This repository contains Jupyter notebooks and codes to reproduce the results and figures published in the paper. 4 | 5 | "Brain Cell Atlas: An Integrative Ensemble of Cell Transcriptomes Across Human Brain Regions" 6 | 7 | The web portal of Brain Cell Atlas together with all the datasets are publicly available at [www.braincellatlas.org](http://www.braincellatlas.org) and [mirror.braincellatlas.org](https://mirror.braincellatlas.org). 8 | 9 | ## Repository Structure 10 | 11 | The repository is organized as follows: 12 | 13 | - `Notebooks`: This folder contains Jupyter notebooks that cover all the code related to generating the main figures of the Brain Cell Atlas project. Each notebook focuses on One main figure, making it easy to navigate and reproduce specific results. 14 | 15 | - `Data`: This folder contains some input data for running the code in the notebooks. Due to the store limitation, some of the large data files are not included in the repository. However, instructions are provided on how to obtain the required data. 16 | 17 | - `Results`: This folder stores the output files generated by the notebooks. 18 | 19 | - `Scripts`: this folder contains codes for supplementary figures, supporting scripts and utilities used in the analysis pipelines. These scripts provide additional functionality and can be used independently or in combination with the notebooks. 20 | 21 | Please note that some of the large files in the data and results folders, which are necessary for running the code, are not included in this repository due to their large size. However, they will soon be uploaded to figshare. If you require access to a specific file, please feel free to contact us. 22 | 23 | ## In-house annotation tool 24 | For label transfer to the Brain Cell Atlas, the documentation of scAnnot is available at https://github.com/rnacentre/scAnnot. 25 | 26 | 27 | ## Citation 28 | For citation and further information please refer to the Research Square preprint: 29 | 30 | Chen, X. et al. Brain Cell Atlas: An integrative ensemble of cell transcriptomes across human brain regions. Research Square (2023) doi:10.21203/rs.3.rs-3221500/v1. 31 | 32 | Thank you for your interest in our work. We hope you find the code and resources provided here useful in reproducing and building upon the findings of the Brain Cell Atlas project. 33 | 34 | 35 | ## Issues 36 | If you encounter any issues or have questions about the code or analysis, please open an issue on the GitHub repository. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This repo is not maintained anymore, please refer to: [https://github.com/rnacentre/BrainCellAtlas_reproducibility](https://github.com/rnacentre/BrainCellAtlas_reproducibility) 2 | # BrainCellAtlas Reproducibility 3 | 4 | This repository contains Jupyter notebooks and codes to reproduce the results and figures published in the paper. 5 | 6 | "Brain Cell Atlas: An Integrative Ensemble of Cell Transcriptomes Across Human Brain Regions" 7 | 8 | The web portal of Brain Cell Atlas together with all the datasets are publicly available at [www.braincellatlas.org](http://www.braincellatlas.org) and [mirror.braincellatlas.org](https://mirror.braincellatlas.org). 9 | 10 | ## Repository Structure 11 | 12 | The repository is organized as follows: 13 | 14 | - `notebooks`: This folder contains Jupyter notebooks that cover all the code related to generating the main figures and the extended data figures of the Brain Cell Atlas project. Each notebook focuses on one figure, making it easy to navigate and reproduce specific results. 15 | 16 | - `data`: This folder contains some input data for running the code in the notebooks. Due to the store limitation, some of the large data files are not included in the repository. However, instructions are provided on how to obtain the required data. 17 | 18 | - `results`: This folder stores the output files generated by the notebooks. 19 | 20 | - `figures`: This folder stores the output figures generated by the notebooks. 21 | 22 | - `scripts`: this folder contains codes for supplementary figures, supporting scripts and utilities used in the analysis pipelines. These scripts provide additional functionality and can be used independently or in combination with the notebooks. 23 | 24 | Please note that some of the large files in the data and results folders, which are necessary for running the code, are not included in this repository due to their large size. They were uploaded to Zenodo (https://zenodo.org/uploads/11195725). 25 | 26 | ## In-house annotation tool 27 | For label transfer to the Brain Cell Atlas, the documentation of scAnnot is available at https://github.com/rnacentre/scAnnot. 28 | 29 | 30 | ## Citation 31 | For citation and further information please refer to the Research Square preprint: 32 | 33 | Chen, X. et al. Brain Cell Atlas: An integrative ensemble of cell transcriptomes across human brain regions. Research Square (2023) doi:10.21203/rs.3.rs-3221500/v1. 34 | 35 | Thank you for your interest in our work. We hope you find the code and resources provided here useful in reproducing and building upon the findings of the Brain Cell Atlas project. 36 | 37 | 38 | ## Issues 39 | If you encounter any issues or have questions about the code or analysis, please open an issue on the GitHub repository. 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /data/Fig5b_DEG.csv: -------------------------------------------------------------------------------- 1 | gene,logfoldchanges,pvals,pvals_adj,cluster 2 | MALAT1,7.231332,0,0,Microglia 3 | LRMDA,5.9769297,0,0,Microglia 4 | NEAT1,5.8828244,0,0,Microglia 5 | DIAPH2,4.9927106,0,0,Microglia 6 | MT-CO3,5.156552,0,0,Microglia 7 | TMSB4X,5.107962,0,0,Microglia 8 | MT-CO2,4.983517,0,0,Microglia 9 | MT-ATP6,5.0465536,0,0,Microglia 10 | LNCAROD,6.052008,0,0,Microglia 11 | FTX,4.5111003,0,0,Microglia 12 | SAT1,4.869066,0,0,Microglia 13 | MT-CYB,4.9559107,0,0,Microglia 14 | DLEU2,4.5143747,0,0,Microglia 15 | MT-ND4,4.7352557,0,0,Microglia 16 | MT-CO1,4.691442,0,0,Microglia 17 | AC244021.1,4.876759,0,0,Microglia 18 | MT-ND3,4.683694,0,0,Microglia 19 | SH3KBP1,4.6288056,0,0,Microglia 20 | AL163541.1,6.413763,0,0,Microglia 21 | MT-ND1,4.722685,0,0,Microglia 22 | LINC02232,4.79411,0,0,Microglia 23 | AC016831.7,4.344949,0,0,Microglia 24 | RPS6KA3,4.626535,0,0,Microglia 25 | COP1,4.4027796,0,0,Microglia 26 | GRK3,4.7115674,0,0,Microglia 27 | DOCK11,4.5554833,0,0,Microglia 28 | ARHGAP6,4.5345197,0,0,Microglia 29 | AC008691.1,5.1084867,0,0,Microglia 30 | MT-ND2,4.3416286,0,0,Microglia 31 | PRKN,4.2576976,0,0,Microglia 32 | CSF2RA,4.707236,0,0,Microglia 33 | SH3BGRL,4.3725333,0,0,Microglia 34 | FP236383.1,4.4088416,0,0,Microglia 35 | ATRX,4.1263614,0,0,Microglia 36 | TENT2,4.17978,0,0,Microglia 37 | BABAM2,4.2178864,0,0,Microglia 38 | TENM4,4.5053062,0,0,Microglia 39 | MIR99AHG,3.9560614,0,0,Microglia 40 | IL13RA1,4.2355475,0,0,Microglia 41 | RUBCNL,4.5619183,0,0,Microglia 42 | GMDS-DT,4.3367586,0,0,Microglia 43 | AC120193.1,4.3920374,0,0,Microglia 44 | MEF2C-AS1,4.252448,0,0,Microglia 45 | ABHD15-AS1,4.547516,0,0,Microglia 46 | MIR646HG,4.2179036,0,0,Microglia 47 | MSN,4.3387117,0,0,Microglia 48 | UTY,4.2492456,0,0,Microglia 49 | ENTPD1-AS1,3.9515119,0,0,Microglia 50 | AC044781.1,5.054769,0,0,Microglia 51 | ARMH3,4.028579,0,0,Microglia 52 | AP003086.2,4.279826,0,0,Microglia 53 | AC006978.2,4.1367016,0,0,Microglia 54 | LINC01094,4.337425,0,0,Microglia 55 | AC124319.1,5.1732264,0,0,Microglia 56 | AP003481.1,4.4415374,0,0,Microglia 57 | USP9X,4.092696,0,0,Microglia 58 | ATP11C,4.4343257,0,0,Microglia 59 | TUT4,3.7996268,0,0,Microglia 60 | LINC00278,4.328129,0,0,Microglia 61 | ACSL4,4.2442245,0,0,Microglia 62 | ARHGEF6,4.1918902,0,0,Microglia 63 | NUTM2A-AS1,3.8081677,0,0,Microglia 64 | GAB3,4.2857833,0,0,Microglia 65 | AC245297.3,3.923316,0,0,Microglia 66 | MRTFA,5.0845923,0,0,Microglia 67 | VSIG4,4.240052,0,0,Microglia 68 | AL034397.3,4.79739,0,0,Microglia 69 | USP9Y,4.454518,0,0,Microglia 70 | PGK1,4.6659784,0,0,Microglia 71 | MS4A6A,3.0982358,0,0,Microglia 72 | STAG2,3.8137708,0,0,Microglia 73 | AC079015.1,4.3849416,0,0,Microglia 74 | LINC01141,4.41905,0,0,Microglia 75 | OTULINL,4.1974454,0,0,Microglia 76 | LARGE1,4.261253,0,0,Microglia 77 | GPR34,4.239192,0,0,Microglia 78 | HIF1A-AS2,4.7513103,0,0,Microglia 79 | CARMIL1,4.123188,0,0,Microglia 80 | NLGN4Y,4.180634,0,0,Microglia 81 | TUT7,4.0044107,0,0,Microglia 82 | MT-ND5,4.199825,0,0,Microglia 83 | RELCH,5.5028963,0,0,Microglia 84 | LINC02256,4.056273,0,0,Microglia 85 | NUTM2B-AS1,3.8201091,0,0,Microglia 86 | 6-Sep,4.3768864,0,0,Microglia 87 | TTTY14,4.6099296,0,0,Microglia 88 | MIR29B2CHG,3.9008067,0,0,Microglia 89 | AC007950.1,5.0072165,0,0,Microglia 90 | THOC2,3.9515374,0,0,Microglia 91 | AC011462.1,5.8715925,0,0,Microglia 92 | ECPAS,3.920034,0,0,Microglia 93 | MUC20-OT1,3.795998,0,0,Microglia 94 | HUWE1,3.9265044,0,0,Microglia 95 | SHOC1,8.770801,0,0,Microglia 96 | LPAR6,2.541778,0,0,Microglia 97 | DHRSX,4.1468945,0,0,Microglia 98 | C1QB,2.6536815,0,0,Microglia 99 | RBMX,4.273009,0,0,Microglia 100 | AC025569.1,4.27423,0,0,Microglia 101 | FAM157C,3.8897848,0,0,Microglia 102 | LINC01684,4.1014338,0,0,Microglia 103 | KDM6A,3.471238,0,0,Microglia 104 | LINC00623,3.9472866,0,0,Microglia 105 | TPTEP2-CSNK1E,4.1276684,0,0,Microglia 106 | CCDC26,3.867837,0,0,Microglia 107 | OGA,3.703316,0,0,Microglia 108 | AC093152.1,4.146046,0,0,Microglia 109 | LINC01091,4.659287,0,0,Microglia 110 | BICRAL,4.010314,0,0,Microglia 111 | AL159163.1,4.4874554,0,0,Microglia 112 | ALG13,3.8370836,0,0,Microglia 113 | C1QC,2.9567935,0,0,Microglia 114 | JPX,3.5554228,0,0,Microglia 115 | TRAF3IP2-AS1,3.930886,0,0,Microglia 116 | CASK,3.6046646,0,0,Microglia 117 | AC118549.1,3.6488218,0,0,Microglia 118 | DDX3X,4.3065157,0,0,Microglia 119 | AC008957.2,4.382802,0,0,Microglia 120 | TMEM131L,3.8104577,0,0,Microglia 121 | LINC02391,4.8733635,0,0,Microglia 122 | TASOR2,5.1229854,0,0,Microglia 123 | GRK2,4.1612945,0,0,Microglia 124 | RPL10,3.8098955,0,0,Microglia 125 | MAF,2.624071,0,0,Microglia 126 | APOO,3.9014635,0,0,Microglia 127 | OGT,3.7985513,0,0,Microglia 128 | MECP2,4.1243777,0,0,Microglia 129 | AC087564.1,3.7275343,0,0,Microglia 130 | AC011933.4,4.4082217,0,0,Microglia 131 | AC079793.1,5.142542,0,0,Microglia 132 | AC118754.1,5.3674593,0,0,Microglia 133 | PDK3,4.5907207,0,0,Microglia 134 | LINC01268,5.056818,0,0,Microglia 135 | AC007262.2,3.7701023,0,0,Microglia 136 | COLGALT1,3.8283007,0,0,Microglia 137 | PPP4R3A,4.0394516,0,0,Microglia 138 | BLNK,2.3503044,0,0,Microglia 139 | SLC8A1-AS1,4.618387,0,0,Microglia 140 | DELE1,4.8711486,0,0,Microglia 141 | GK,4.2178364,0,0,Microglia 142 | BRWD3,3.8453481,0,0,Microglia 143 | HSPA1B,2.9511907,0,0,Microglia 144 | HLA-DRA,2.4979012,0,0,Microglia 145 | AC105402.3,6.1110096,0,0,Microglia 146 | AC008050.1,4.358172,0,0,Microglia 147 | TAF1,3.8246744,0,0,Microglia 148 | EDA,3.6285973,0,0,Microglia 149 | CLCN5,4.4605455,0,0,Microglia 150 | MIR34AHG,4.757621,0,0,Microglia 151 | MTREX,3.9324281,0,0,Microglia 152 | SH3RF3,1.8625686,0,0,Microglia 153 | TAPT1-AS1,3.7293422,0,0,Microglia 154 | AL365273.2,3.9613442,0,0,Microglia 155 | AC097376.2,3.8170784,0,0,Microglia 156 | SMS,4.318258,0,0,Microglia 157 | AC010894.3,4.297714,0,0,Microglia 158 | CD99,4.0539265,0,0,Microglia 159 | ZFP36L1,2.1251752,0,0,Microglia 160 | PRKY,5.8336763,0,0,Microglia 161 | ELMO1-AS1,4.1156144,0,0,Microglia 162 | AC008957.1,5.3661304,0,0,Microglia 163 | VPS35L,3.625063,0,0,Microglia 164 | OFD1,4.681709,0,0,Microglia 165 | RESF1,5.2925234,0,0,Microglia 166 | FP700111.1,3.9671597,0,0,Microglia 167 | AC074327.1,3.2592123,0,0,Microglia 168 | TMLHE,3.9522974,0,0,Microglia 169 | MMP24OS,4.0346246,0,0,Microglia 170 | FTL,1.9280597,0,0,Microglia 171 | FCGR3A,3.0776176,0,0,Microglia 172 | AC013394.1,3.7424242,0,0,Microglia 173 | SRGAP2-AS1,4.47199,0,0,Microglia 174 | MRTFB,6.1589355,0,0,Microglia 175 | TMEM164,4.7383523,0,0,Microglia 176 | AC027097.2,4.2111487,0,0,Microglia 177 | CYBC1,3.835087,0,0,Microglia 178 | HLA-DRB1,2.7584274,0,0,Microglia 179 | XACT,4.1092963,0,0,Microglia 180 | AL158071.4,4.104481,0,0,Microglia 181 | AC139887.2,3.9551892,0,0,Microglia 182 | HSPA1A,2.1479447,0,0,Microglia 183 | AP000331.1,5.8904166,0,0,Microglia 184 | MIR222HG,4.1829805,0,0,Microglia 185 | ITPR2,1.498647,0,0,Microglia 186 | AC090579.1,4.4536743,0,0,Microglia 187 | AC023051.1,5.0614223,0,0,Microglia 188 | HAMP,3.771735,0,0,Microglia 189 | ARMH4,3.7211564,0,0,Microglia 190 | HSPB1,3.2038536,0,0,Microglia 191 | AC098850.3,3.9495366,0,0,Microglia 192 | C1QA,2.5735211,0,0,Microglia 193 | CD74,1.8048134,0,0,Microglia 194 | AC124312.1,3.7768817,0,0,Microglia 195 | PVT1,4.344688,0,0,Microglia 196 | BMT2,3.8705814,0,0,Microglia 197 | CEP128,3.8524935,0,0,Microglia 198 | TENT4B,4.115598,0,0,Microglia 199 | AC009690.1,3.7060301,0,0,Microglia 200 | THUMPD3-AS1,4.004262,0,0,Microglia 201 | MT-ND4L,3.7729013,0,0,Microglia 202 | ARHGAP45,3.7529678,0,0,Microglia 203 | C22orf34,4.0247564,0,0,Microglia 204 | DENND3,1.8864388,0,0,Microglia 205 | MIRLET7BHG,4.086424,0,0,Microglia 206 | ABCB7,4.005063,0,0,Microglia 207 | DOP1A,4.083906,0,0,Microglia 208 | ATP5F1E,4.1622086,0,0,Microglia 209 | AC080038.1,5.544158,0,0,Microglia 210 | EIF2S3,4.4686346,0,0,Microglia 211 | CCDC200,5.927733,0,0,Microglia 212 | MIR503HG,4.8756576,0,0,Microglia 213 | CEMIP2,4.8145885,0,0,Microglia 214 | FYB1,1.7090206,0,0,Microglia 215 | AC074032.1,4.946714,0,0,Microglia 216 | LINC01410,3.8691962,0,0,Microglia 217 | DIAPH2-AS1,4.5768285,0,0,Microglia 218 | C3,1.8208702,0,0,Microglia 219 | AC006160.1,5.919231,0,0,Microglia 220 | MICOS10,4.672098,0,0,Microglia 221 | AL513327.1,4.084592,0,0,Microglia 222 | MED14,3.7858803,0,0,Microglia 223 | SLC26A3,2.9608245,0,0,Microglia 224 | ETV6,1.6114962,0,0,Microglia 225 | AC090833.1,4.5013237,0,0,Microglia 226 | MOSMO,3.7978635,0,0,Microglia 227 | LINC02328,4.244385,0,0,Microglia 228 | WDR44,3.7544107,0,0,Microglia 229 | AC104123.1,4.2960043,0,0,Microglia 230 | AC026470.1,4.823262,0,0,Microglia 231 | IFI16,1.8860257,0,0,Microglia 232 | LINC01001,4.158544,0,0,Microglia 233 | TASOR,4.861175,0,0,Microglia 234 | CGAS,5.1412883,0,0,Microglia 235 | SELENOW,3.5433466,0,0,Microglia 236 | XIAP,3.8156595,0,0,Microglia 237 | KANTR,3.5771606,0,0,Microglia 238 | AF117829.1,3.9342406,0,0,Microglia 239 | ADAM28,1.5879583,3.30E-303,2.61E-301,Microglia 240 | KCNMB2-AS1,4.22543,0,0,Microglia 241 | RTF2,4.4920187,0,0,Microglia 242 | LINC01004,3.6786163,0,0,Microglia 243 | HPRT1,4.311421,0,0,Microglia 244 | ZFX,3.4916966,0,0,Microglia 245 | STAB1,2.7518106,0,0,Microglia 246 | AC012368.1,3.6285627,0,0,Microglia 247 | AC024145.1,4.854892,0,0,Microglia 248 | FAM198B-AS1,4.877917,0,0,Microglia 249 | TMEM273,4.351947,0,0,Microglia 250 | NIPSNAP2,4.0203133,0,0,Microglia 251 | AC018682.1,5.333395,0,0,Microglia 252 | ZFAS1,4.626985,0,0,Microglia 253 | LINC00513,3.8446836,0,0,Microglia 254 | AZIN1-AS1,3.9393601,0,0,Microglia 255 | AC008014.1,3.8306725,0,0,Microglia 256 | IQSEC2,4.4981422,0,0,Microglia 257 | CTSZ,2.6687472,5.80E-307,4.60E-305,Microglia 258 | AC008105.3,4.5731244,0,0,Microglia 259 | CSF1R,1.5870955,3.96E-291,2.94E-289,Microglia 260 | PRKX,3.7895083,0,0,Microglia 261 | POU2F2,2.0591412,4.67E-296,3.57E-294,Microglia 262 | AC078845.1,4.740625,0,0,Microglia 263 | CHM,3.3660326,0,0,Microglia 264 | AL390728.6,5.10895,0,0,Microglia 265 | RBM41,3.8967552,0,0,Microglia 266 | MINDY3,4.402187,0,0,Microglia 267 | AC005165.1,4.5809903,0,0,Microglia 268 | SLIRP,5.035731,0,0,Microglia 269 | SORL1,1.4434227,8.98E-284,6.44E-282,Microglia 270 | ATP5F1C,3.9610624,0,0,Microglia 271 | TLR7,4.0803576,0,0,Microglia 272 | AC005154.5,5.154866,0,0,Microglia 273 | APOE,1.7125851,7.06E-286,5.10E-284,Microglia 274 | DOP1B,5.5029426,0,0,Microglia 275 | FBH1,4.0372696,5.23E-308,4.17E-306,Microglia 276 | CXorf21,4.5417385,7.33794127196486e-310,5.91E-308,Microglia 277 | AC066613.2,3.6369894,3.01E-303,2.38E-301,Microglia 278 | AP001977.1,5.942417,0.00E+00,5.22E-307,Microglia 279 | MAGED1,4.0772634,6.67E-303,5.25E-301,Microglia 280 | CA5B,3.889844,1.46E-300,1.14E-298,Microglia 281 | B2M,1.7556963,1.76E-277,1.23E-275,Microglia 282 | LAT2,2.1759207,1.39E-280,9.84E-279,Microglia 283 | RPS4X,3.600472,4.92E-295,3.75E-293,Microglia 284 | AC020611.2,4.2804203,5.27E-300,4.10E-298,Microglia 285 | AC009554.1,4.953191,2.49E-300,1.94E-298,Microglia 286 | LINC02642,5.110682,1.12E-299,8.69E-298,Microglia 287 | PWWP3A,5.036023,6.36E-299,4.92E-297,Microglia 288 | BHLHE41,1.7386767,6.31E-273,4.30E-271,Microglia 289 | DDX3Y,4.6518135,5.62E-298,4.33E-296,Microglia 290 | AC116366.3,3.5570636,2.56E-291,1.91E-289,Microglia 291 | ITPRIPL2,5.400405,4.15E-298,3.21E-296,Microglia 292 | SELENOT,3.8285205,2.55E-294,1.93E-292,Microglia 293 | ZMAT1,3.385534,1.48E-289,1.08E-287,Microglia 294 | ATP5F1A,5.6110945,1.78E-297,1.37E-295,Microglia 295 | AP002336.2,4.2691436,1.15E-294,8.71E-293,Microglia 296 | INKA2,4.681249,7.60E-295,5.78E-293,Microglia 297 | ENOX2,3.098784,1.21E-283,8.64E-282,Microglia 298 | LINC01736,4.0522647,3.30E-290,2.44E-288,Microglia 299 | AC009093.2,4.3060246,2.26E-292,1.70E-290,Microglia 300 | MORF4L2,3.760559,2.81E-288,2.05E-286,Microglia 301 | AC068282.1,5.2041726,2.29E-293,1.72E-291,Microglia 302 | AC027644.4,3.277197,8.52E-284,6.13E-282,Microglia 303 | AC087721.2,4.4244356,2.10E-289,1.54E-287,Microglia 304 | AC104389.4,5.4114075,9.40E-291,6.95E-289,Microglia 305 | SLC49A4,4.772383,6.95E-290,5.10E-288,Microglia 306 | AC008770.4,7.006861,8.61E-291,6.38E-289,Microglia 307 | AC092338.1,5.4411116,3.57E-290,2.63E-288,Microglia 308 | RPLP1,2.6420841,1.09E-273,7.46E-272,Microglia 309 | AC008892.1,4.3845296,6.84E-287,4.97E-285,Microglia 310 | TTR,5.695756,1.78E-288,1.29E-286,Microglia 311 | MIR181A1HG,2.8575797,1.88E-274,1.29E-272,Microglia 312 | KYAT3,3.926925,1.47E-283,1.05E-281,Microglia 313 | P4HA1,1.7896994,3.94E-264,2.52E-262,Microglia 314 | SLC25A6,4.2674,4.71E-284,3.39E-282,Microglia 315 | SASH3,4.3249083,3.37E-283,2.40E-281,Microglia 316 | SELENOF,3.5311615,1.34E-278,9.38E-277,Microglia 317 | ARMCX4,3.5687163,5.12E-279,3.60E-277,Microglia 318 | AC087286.2,5.0376887,1.06E-283,7.57E-282,Microglia 319 | ARHGAP24,1.1598601,4.76E-253,2.86E-251,Microglia 320 | PLXDC2,0.77764904,2.75E-251,1.63E-249,Microglia 321 | DGLUCY,3.5405662,8.83E-275,6.09E-273,Microglia 322 | PTPRC,1.4307292,3.46E-254,2.10E-252,Microglia 323 | MINDY2,3.2714949,2.57E-272,1.74E-270,Microglia 324 | POLA1,3.4395897,2.95E-273,2.02E-271,Microglia 325 | OPHN1,3.5770004,3.64E-273,2.49E-271,Microglia 326 | AF127577.4,6.694318,4.06E-280,2.87E-278,Microglia 327 | BST2,3.2763808,2.14E-270,1.43E-268,Microglia 328 | AC009950.1,4.073138,3.17E-275,2.20E-273,Microglia 329 | MGAT4A,1.4648485,4.67E-253,2.80E-251,Microglia 330 | ZNF81,4.5310125,2.07E-276,1.43E-274,Microglia 331 | TTN-AS1,3.392824,6.71E-269,4.40E-267,Microglia 332 | FP671120.1,2.860511,4.94E-264,3.15E-262,Microglia 333 | KCNQ1OT1,3.4769673,5.02E-270,3.33E-268,Microglia 334 | MTMR1,4.006293,2.22E-272,1.51E-270,Microglia 335 | MTM1,3.8356874,3.31E-271,2.22E-269,Microglia 336 | TENT4A,3.733823,3.56E-269,2.36E-267,Microglia 337 | SELENOI,4.3331647,2.06E-272,1.40E-270,Microglia 338 | ARHGEF9,3.7524345,3.68E-269,2.43E-267,Microglia 339 | JAK3,2.6821504,4.60E-260,2.88E-258,Microglia 340 | MAP4K3-DT,6.620015,6.29E-273,4.30E-271,Microglia 341 | SINHCAF,4.1508317,4.87E-270,3.24E-268,Microglia 342 | LY86-AS1,4.783577,5.68E-271,3.81E-269,Microglia 343 | MARF1,4.0354886,3.08E-268,2.02E-266,Microglia 344 | NORAD,3.5542185,1.18E-264,7.56E-263,Microglia 345 | NUP50-DT,3.7336805,1.62E-266,1.05E-264,Microglia 346 | AFDN,3.281504,3.42E-261,2.15E-259,Microglia 347 | TGFBR1,1.6004934,2.65E-246,1.54E-244,Microglia 348 | AC090517.4,3.6169376,2.01E-263,1.27E-261,Microglia 349 | GDI1,3.523788,7.32E-262,4.61E-260,Microglia 350 | IRF8,2.4662638,7.85E-254,4.74E-252,Microglia 351 | PCSK1N,4.455974,2.66E-265,1.72E-263,Microglia 352 | ACOT9,5.2550697,4.71E-266,3.05E-264,Microglia 353 | BMP2K,1.3272046,1.46E-240,8.21E-239,Microglia 354 | FMR1,4.264573,1.08E-263,6.84E-262,Microglia 355 | ODR4,3.724715,1.95E-260,1.22E-258,Microglia 356 | CYSLTR1,5.2249455,4.03E-265,2.60E-263,Microglia 357 | MACO1,3.4301875,6.47E-259,4.02E-257,Microglia 358 | INSYN2B,5.124121,5.02E-264,3.20E-262,Microglia 359 | WAS,4.0841155,2.62E-261,1.65E-259,Microglia 360 | ATP5F1B,3.9760215,4.56E-261,2.86E-259,Microglia 361 | RPL11,2.4715378,4.72E-250,2.79E-248,Microglia 362 | HLA-DRB5,3.6451638,4.36E-257,2.69E-255,Microglia 363 | MAGT1,4.043997,5.41E-260,3.38E-258,Microglia 364 | RUNX1,1.3613573,3.21E-237,1.77E-235,Microglia 365 | SHLD2,3.4705088,5.18E-255,3.17E-253,Microglia 366 | LY86,1.6357641,4.28E-239,2.39E-237,Microglia 367 | AC090630.1,3.7629,1.03E-254,6.29E-253,Microglia 368 | LINC01678,5.262434,3.91E-259,2.43E-257,Microglia 369 | CX3CR1,1.9399166,1.79E-240,1.00E-238,Microglia 370 | CEBPA,3.363921,2.02E-251,1.20E-249,Microglia 371 | CXorf38,4.163958,2.39E-254,1.46E-252,Microglia 372 | AC244453.3,3.7486575,6.52E-253,3.90E-251,Microglia 373 | ATP5MC2,3.3094518,7.84E-251,4.65E-249,Microglia 374 | EIPR1,4.0393367,5.40E-254,3.27E-252,Microglia 375 | FAM222B,3.2666364,1.28E-249,7.57E-248,Microglia 376 | AC133919.2,4.5803647,5.94E-255,3.63E-253,Microglia 377 | DOCK8,1.1929191,1.82E-231,9.73E-230,Microglia 378 | LAPTM5,1.683959,3.02E-235,1.65E-233,Microglia 379 | ITGAM,2.0581908,5.53E-239,3.08E-237,Microglia 380 | LINC00486,2.9888093,2.45E-244,1.41E-242,Microglia 381 | AC084871.2,4.788514,2.12E-253,1.28E-251,Microglia 382 | RRAGB,3.9212782,2.76E-250,1.63E-248,Microglia 383 | GALNT17,4.5762434,2.88E-252,1.71E-250,Microglia 384 | CYBA,1.9569192,4.07E-236,2.23E-234,Microglia 385 | BTK,3.7509978,6.60E-249,3.88E-247,Microglia 386 | LINC01909,5.2921576,1.90E-252,1.14E-250,Microglia 387 | NCK1-DT,3.7724698,6.66E-248,3.90E-246,Microglia 388 | CIITA,1.8816991,2.09E-233,1.13E-231,Microglia 389 | AC012150.1,4.243576,6.45E-247,3.76E-245,Microglia 390 | AL592183.1,3.3829951,3.06E-243,1.74E-241,Microglia 391 | UPF3B,3.9053211,1.77E-245,1.02E-243,Microglia 392 | SUCLG2-AS1,4.5547867,1.86E-245,1.08E-243,Microglia 393 | AL049828.1,4.182894,1.79E-244,1.02E-242,Microglia 394 | VPS26C,4.071642,3.57E-244,2.04E-242,Microglia 395 | KIF9-AS1,3.86631,2.29E-242,1.30E-240,Microglia 396 | LINC00894,3.1953063,3.75E-237,2.07E-235,Microglia 397 | AC005258.1,4.6008286,1.49E-242,8.46E-241,Microglia 398 | PLP1,2.475502,4.31E-228,2.25E-226,Microglia 399 | AL118516.1,5.573993,2.60E-243,1.49E-241,Microglia 400 | CNKSR2,4.283198,4.95E-241,2.79E-239,Microglia 401 | SEMA6A-AS1,3.4953804,6.69E-237,3.68E-235,Microglia 402 | EIF1AX,3.7027535,3.32E-238,1.84E-236,Microglia 403 | AMOT,4.2816677,3.70E-239,2.08E-237,Microglia 404 | AC114763.1,4.1226597,1.77E-238,9.85E-237,Microglia 405 | TMEM161B-AS1,2.8889873,2.69E-230,1.42E-228,Microglia 406 | SAP30L-AS1,4.555441,1.04E-238,5.81E-237,Microglia 407 | AC009505.1,5.9988003,3.99E-239,2.23E-237,Microglia 408 | SYK,1.4123341,2.64E-219,1.33E-217,Microglia 409 | SYAP1,4.8240395,2.53E-238,1.41E-236,Microglia 410 | IGBP1,4.5275764,1.83E-236,1.00E-234,Microglia 411 | AC092691.1,3.7185397,6.22E-233,3.36E-231,Microglia 412 | AL157392.2,4.272595,3.91E-235,2.13E-233,Microglia 413 | PHF6,4.2062073,1.39E-234,7.55E-233,Microglia 414 | TBL1X,3.4789388,8.34E-233,4.49E-231,Microglia 415 | PTPRE,1.394953,1.84E-217,9.20E-216,Microglia 416 | TMEM176B,2.6402051,6.42E-226,3.31E-224,Microglia 417 | LY96,2.6564083,1.18E-225,6.09E-224,Microglia 418 | CPLANE1,3.3140726,4.97E-229,2.61E-227,Microglia 419 | CPED1,1.4435868,7.06E-217,3.49E-215,Microglia 420 | FAM214A,3.1442451,2.40E-228,1.26E-226,Microglia 421 | LINC00578,3.7992432,1.57E-231,8.39E-230,Microglia 422 | ARHGAP15,1.247882,3.57E-214,1.74E-212,Microglia 423 | BCOR,3.7072818,1.33E-230,7.04E-229,Microglia 424 | RPS19,1.8456879,2.04E-218,1.02E-216,Microglia 425 | SMIM35,3.792808,7.36E-231,3.90E-229,Microglia 426 | TAZ,3.9325767,3.29E-231,1.75E-229,Microglia 427 | HLA-B,2.0960917,2.18E-219,1.10E-217,Microglia 428 | MSL3,4.1863227,3.74E-230,1.97E-228,Microglia 429 | FAM129A,2.13326,3.37E-219,1.69E-217,Microglia 430 | XIST,3.0394504,1.01E-222,5.16E-221,Microglia 431 | TRIR,4.029126,7.08E-229,3.71E-227,Microglia 432 | MIR4435-2HG,4.558438,3.42E-229,1.80E-227,Microglia 433 | DPH6-DT,3.554237,1.53E-225,7.90E-224,Microglia 434 | APBB1IP,1.2281644,1.18E-209,5.61E-208,Microglia 435 | DIPK1A,4.3066316,1.58E-227,8.20E-226,Microglia 436 | KRBOX4,3.856396,6.34E-226,3.27E-224,Microglia 437 | SMARCA1,3.3253655,1.68E-222,8.61E-221,Microglia 438 | SHLD1,3.396728,3.30E-222,1.69E-220,Microglia 439 | AC087672.2,5.6238995,9.31E-228,4.85E-226,Microglia 440 | NFATC2,1.5443492,5.21E-210,2.49E-208,Microglia 441 | CHST11,1.075349,1.21E-206,5.70E-205,Microglia 442 | MPP1,4.71711,9.71E-225,4.99E-223,Microglia 443 | UBR5-AS1,4.537705,6.17E-222,3.15E-220,Microglia 444 | SLC16A1-AS1,3.240495,7.91E-217,3.90E-215,Microglia 445 | AD000864.1,5.334275,1.53E-221,7.81E-220,Microglia 446 | AL162414.1,3.5532434,2.76E-217,1.37E-215,Microglia 447 | PIM1,3.619305,6.63E-217,3.29E-215,Microglia 448 | RPS24,2.2053542,1.43E-209,6.83E-208,Microglia 449 | RAB30-AS1,3.4749405,1.76E-216,8.70E-215,Microglia 450 | ATP6AP2,3.6664755,2.39E-217,1.19E-215,Microglia 451 | RASSF8-AS1,4.8459477,1.44E-219,7.27E-218,Microglia 452 | UBA1,3.5507183,1.19E-215,5.83E-214,Microglia 453 | KHDC4,3.7928772,3.93E-217,1.95E-215,Microglia 454 | FRMPD4,4.8174477,3.24E-219,1.63E-217,Microglia 455 | LINC02649,5.21853,9.96E-219,5.00E-217,Microglia 456 | AC078883.1,4.245996,2.47E-216,1.22E-214,Microglia 457 | ZNF75D,3.7219367,2.00E-214,9.75E-213,Microglia 458 | AC011529.1,25.774197,2.49E-217,1.24E-215,Microglia 459 | PAXX,3.846017,5.82E-214,2.83E-212,Microglia 460 | ATP6AP1,3.5791109,3.17E-213,1.53E-211,Microglia 461 | AC242426.2,3.9811156,1.27E-214,6.23E-213,Microglia 462 | PIP4P2,3.8368435,7.02E-214,3.40E-212,Microglia 463 | PHF8,3.8421283,4.05E-213,1.95E-211,Microglia 464 | GEMIN7-AS1,4.560011,1.47E-214,7.18E-213,Microglia 465 | GABPB1-AS1,3.0727606,1.76E-208,8.36E-207,Microglia 466 | AC129492.1,4.962373,3.11E-213,1.50E-211,Microglia 467 | AC017101.1,4.8079343,7.68E-213,3.70E-211,Microglia 468 | AP001011.1,4.6284637,3.10E-212,1.49E-210,Microglia 469 | IRAK1,4.760788,3.04E-211,1.46E-209,Microglia 470 | BCAP31,3.4145975,7.22E-207,3.41E-205,Microglia 471 | LINC01184,3.0250533,9.63E-206,4.51E-204,Microglia 472 | AC007192.2,4.9721804,1.02E-210,4.86E-209,Microglia 473 | ALOX12-AS1,3.4658377,2.22E-205,1.03E-203,Microglia 474 | ITGB2,2.139348,3.44E-198,1.56E-196,Microglia 475 | AC004918.1,3.5582058,2.66E-205,1.24E-203,Microglia 476 | AC090907.2,4.0557,2.68E-206,1.26E-204,Microglia 477 | SLC9A6,4.2987413,5.95E-207,2.81E-205,Microglia 478 | PARP14,1.6744787,1.39E-195,6.27E-194,Microglia 479 | AC009061.2,4.992375,4.99E-208,2.36E-206,Microglia 480 | FCER1G,2.6358166,8.57E-201,3.93E-199,Microglia 481 | ZRSR2,3.8879666,1.30E-205,6.10E-204,Microglia 482 | WARS2-AS1,5.076391,3.56E-207,1.69E-205,Microglia 483 | MEF2A,0.9734944,8.60E-191,3.76E-189,Microglia 484 | NEK6,2.365741,8.23E-198,3.72E-196,Microglia 485 | AL035530.2,4.8531923,7.48E-206,3.51E-204,Microglia 486 | SLCO2B1,1.256513,2.19E-190,9.53E-189,Microglia 487 | ITPRID2,5.1604414,1.61E-205,7.51E-204,Microglia 488 | HDGFL3,3.5957606,1.80E-202,8.31E-201,Microglia 489 | HDX,3.8786035,2.51E-203,1.16E-201,Microglia 490 | BEX1,5.4877663,2.70E-205,1.26E-203,Microglia 491 | CD14,2.0256994,1.02E-194,4.58E-193,Microglia 492 | BEX4,4.3890038,2.64E-203,1.22E-201,Microglia 493 | HDAC8,2.9850783,1.98E-198,8.99E-197,Microglia 494 | GAS6,1.9893818,4.48E-193,2.00E-191,Microglia 495 | PLCG2,1.420903,7.59E-190,3.29E-188,Microglia 496 | FAM85B,3.8792367,5.44E-201,2.50E-199,Microglia 497 | SELENOO,3.355854,8.22E-199,3.74E-197,Microglia 498 | LINC00996,4.9150147,5.35E-202,2.46E-200,Microglia 499 | AC069549.1,5.1506395,1.26E-201,5.78E-200,Microglia 500 | LINC00662,4.0724983,8.01E-200,3.67E-198,Microglia 501 | GAS6-AS1,3.942988,7.88E-199,3.59E-197,Microglia 502 | PCDH9,4.6081533,0,0,Microglia(PCDH9high) 503 | CTNNA3,4.990537,0,0,Microglia(PCDH9high) 504 | PPP2R2B,5.0937486,0,0,Microglia(PCDH9high) 505 | MAGI2,4.242251,0,0,Microglia(PCDH9high) 506 | ST18,5.430189,0,0,Microglia(PCDH9high) 507 | DLG2,3.1728964,0,0,Microglia(PCDH9high) 508 | SLC24A2,4.9412003,0,0,Microglia(PCDH9high) 509 | RNF220,5.400671,0,0,Microglia(PCDH9high) 510 | NCAM2,3.9657357,0,0,Microglia(PCDH9high) 511 | MBP,3.370705,0,0,Microglia(PCDH9high) 512 | SLC44A1,4.1264324,0,0,Microglia(PCDH9high) 513 | PTPRD,3.7069001,0,0,Microglia(PCDH9high) 514 | FRMD5,4.895346,0,0,Microglia(PCDH9high) 515 | NKAIN2,3.8336976,0,0,Microglia(PCDH9high) 516 | PDE4B,3.0949376,0,0,Microglia(PCDH9high) 517 | TMTC2,4.568306,0,0,Microglia(PCDH9high) 518 | CADM2,3.2266347,0,0,Microglia(PCDH9high) 519 | ANK3,3.779825,0,0,Microglia(PCDH9high) 520 | SPOCK1,4.7182317,0,0,Microglia(PCDH9high) 521 | PIP4K2A,2.9696798,0,0,Microglia(PCDH9high) 522 | PHLPP1,4.1526895,0,0,Microglia(PCDH9high) 523 | SIK3,3.0348625,0,0,Microglia(PCDH9high) 524 | MAP7,4.0425634,0,0,Microglia(PCDH9high) 525 | TTLL7,4.1544156,0,0,Microglia(PCDH9high) 526 | TMEM144,4.0424957,0,0,Microglia(PCDH9high) 527 | UNC5C,4.108643,0,0,Microglia(PCDH9high) 528 | PLCL1,3.451709,0,0,Microglia(PCDH9high) 529 | DNM3,3.5859187,0,0,Microglia(PCDH9high) 530 | NCAM1,4.007323,0,0,Microglia(PCDH9high) 531 | ANK2,3.159621,0,0,Microglia(PCDH9high) 532 | EDIL3,3.7529807,0,0,Microglia(PCDH9high) 533 | PRUNE2,4.7306423,0,0,Microglia(PCDH9high) 534 | SPOCK3,4.0181465,0,0,Microglia(PCDH9high) 535 | DOCK5,3.5091856,0,0,Microglia(PCDH9high) 536 | ZNF536,5.222913,0,0,Microglia(PCDH9high) 537 | PDE1C,4.7780504,0,0,Microglia(PCDH9high) 538 | SLAIN1,4.1217504,0,0,Microglia(PCDH9high) 539 | AGAP1,3.7763023,0,0,Microglia(PCDH9high) 540 | PEX5L,3.43695,0,0,Microglia(PCDH9high) 541 | PTPRK,4.094399,0,0,Microglia(PCDH9high) 542 | NRXN3,3.310914,0,0,Microglia(PCDH9high) 543 | C10orf90,5.5249395,0,0,Microglia(PCDH9high) 544 | TRIM2,3.736823,0,0,Microglia(PCDH9high) 545 | TMEM165,3.0326197,0,0,Microglia(PCDH9high) 546 | NPAS3,2.8866465,0,0,Microglia(PCDH9high) 547 | AKAP6,3.6858678,0,0,Microglia(PCDH9high) 548 | KIRREL3,4.3274965,0,0,Microglia(PCDH9high) 549 | NTM,3.8382013,0,0,Microglia(PCDH9high) 550 | C10orf11,2.8741546,0,0,Microglia(PCDH9high) 551 | CREB5,4.4931226,0,0,Microglia(PCDH9high) 552 | ERBB4,3.1538825,0,0,Microglia(PCDH9high) 553 | QKI,1.4299527,0,0,Microglia(PCDH9high) 554 | NLGN1,2.83356,0,0,Microglia(PCDH9high) 555 | OTUD7A,4.0963306,0,0,Microglia(PCDH9high) 556 | CLASP2,2.560609,0,0,Microglia(PCDH9high) 557 | DNAJC6,3.9168732,0,0,Microglia(PCDH9high) 558 | DLG1,2.7710178,0,0,Microglia(PCDH9high) 559 | SGK1,2.7272472,0,0,Microglia(PCDH9high) 560 | NCKAP5,2.5339947,0,0,Microglia(PCDH9high) 561 | 7-Sep,2.7841144,0,0,Microglia(PCDH9high) 562 | FBXL7,4.5227165,0,0,Microglia(PCDH9high) 563 | FRYL,2.5779855,0,0,Microglia(PCDH9high) 564 | LIMCH1,3.5373826,0,0,Microglia(PCDH9high) 565 | MOBP,4.304968,0,0,Microglia(PCDH9high) 566 | CLMN,5.001416,0,0,Microglia(PCDH9high) 567 | DLC1,4.299615,0,0,Microglia(PCDH9high) 568 | PLEKHH1,4.4299088,0,0,Microglia(PCDH9high) 569 | PALM2,5.0091186,0,0,Microglia(PCDH9high) 570 | RP11-654K19.6,5.556674,0,0,Microglia(PCDH9high) 571 | LRP1B,2.4157488,0,0,Microglia(PCDH9high) 572 | LSAMP,2.2158697,0,0,Microglia(PCDH9high) 573 | CDH20,4.108493,0,0,Microglia(PCDH9high) 574 | MAN2A1,2.403707,0,0,Microglia(PCDH9high) 575 | ENPP2,4.2362857,0,0,Microglia(PCDH9high) 576 | APBB2,4.052729,0,0,Microglia(PCDH9high) 577 | CTNND2,2.9607956,0,0,Microglia(PCDH9high) 578 | CERCAM,4.4663486,0,0,Microglia(PCDH9high) 579 | DIP2C,3.2692585,0,0,Microglia(PCDH9high) 580 | KCNH8,4.6567764,0,0,Microglia(PCDH9high) 581 | SH3GL3,3.872503,0,0,Microglia(PCDH9high) 582 | SLCO3A1,4.371194,0,0,Microglia(PCDH9high) 583 | ENOX1,3.4335551,0,0,Microglia(PCDH9high) 584 | ZBTB16,2.3020005,0,0,Microglia(PCDH9high) 585 | KLHL32,4.202934,0,0,Microglia(PCDH9high) 586 | PXK,3.721589,0,0,Microglia(PCDH9high) 587 | DPYD,2.2683058,0,0,Microglia(PCDH9high) 588 | ARAP2,2.9106593,0,0,Microglia(PCDH9high) 589 | ATP8A1,2.9942486,0,0,Microglia(PCDH9high) 590 | ANO4,4.119738,0,0,Microglia(PCDH9high) 591 | SCD5,3.6319592,0,0,Microglia(PCDH9high) 592 | ANKS1B,2.387134,0,0,Microglia(PCDH9high) 593 | CDC42BPA,3.0707533,0,0,Microglia(PCDH9high) 594 | USP54,3.9945579,0,0,Microglia(PCDH9high) 595 | ERBIN,2.2425385,0,0,Microglia(PCDH9high) 596 | FAM107B,3.8229961,0,0,Microglia(PCDH9high) 597 | PDE1A,3.1938765,0,0,Microglia(PCDH9high) 598 | ADGRB3,1.9929136,0,0,Microglia(PCDH9high) 599 | TMEFF2,3.5252433,0,0,Microglia(PCDH9high) 600 | BCAS1,4.4001966,0,0,Microglia(PCDH9high) 601 | RAPGEF5,3.0448935,0,0,Microglia(PCDH9high) 602 | KANK1,4.479513,0,0,Microglia(PCDH9high) 603 | FUT8,2.774138,0,0,Microglia(PCDH9high) 604 | GRID1,3.774001,0,0,Microglia(PCDH9high) 605 | TJP1,2.7249799,0,0,Microglia(PCDH9high) 606 | DAAM2,4.682909,0,0,Microglia(PCDH9high) 607 | PDE8A,2.3937514,0,0,Microglia(PCDH9high) 608 | SHTN1,1.749074,0,0,Microglia(PCDH9high) 609 | PTK2,2.0563977,0,0,Microglia(PCDH9high) 610 | DOCK3,2.6351483,0,0,Microglia(PCDH9high) 611 | CNTNAP4,4.02066,0,0,Microglia(PCDH9high) 612 | GRM3,3.839619,0,0,Microglia(PCDH9high) 613 | COBL,4.2483864,0,0,Microglia(PCDH9high) 614 | DOCK9,3.6362164,0,0,Microglia(PCDH9high) 615 | ZBTB20,1.4589739,0,0,Microglia(PCDH9high) 616 | POLR2F,4.385754,0,0,Microglia(PCDH9high) 617 | HECW2,3.645509,0,0,Microglia(PCDH9high) 618 | EXOC6B,2.0871906,0,0,Microglia(PCDH9high) 619 | ARHGAP21,1.9319792,0,0,Microglia(PCDH9high) 620 | DSCAML1,4.236444,0,0,Microglia(PCDH9high) 621 | SYNJ2,4.4282665,0,0,Microglia(PCDH9high) 622 | TF,3.4918246,0,0,Microglia(PCDH9high) 623 | PARK2,2.712394,0,0,Microglia(PCDH9high) 624 | AGPAT4,3.539389,0,0,Microglia(PCDH9high) 625 | KCNMB4,3.3497238,0,0,Microglia(PCDH9high) 626 | AK5,3.0367074,0,0,Microglia(PCDH9high) 627 | ATP10B,4.741373,0,0,Microglia(PCDH9high) 628 | MYO1D,3.3686106,0,0,Microglia(PCDH9high) 629 | DIP2B,1.6140786,0,0,Microglia(PCDH9high) 630 | CADM1,2.653696,0,0,Microglia(PCDH9high) 631 | PKP4,2.7696145,0,0,Microglia(PCDH9high) 632 | CACNA2D1,2.49364,0,0,Microglia(PCDH9high) 633 | DST,1.7505668,0,0,Microglia(PCDH9high) 634 | DOCK1,3.8490846,0,0,Microglia(PCDH9high) 635 | CNDP1,3.9901295,0,0,Microglia(PCDH9high) 636 | ADIPOR2,2.5366495,0,0,Microglia(PCDH9high) 637 | LPGAT1,2.6896443,0,0,Microglia(PCDH9high) 638 | SAMD12,2.367239,0,0,Microglia(PCDH9high) 639 | GAB1,2.1582177,0,0,Microglia(PCDH9high) 640 | NALCN,3.2184331,0,0,Microglia(PCDH9high) 641 | PPM1B,2.8707333,0,0,Microglia(PCDH9high) 642 | RFTN2,4.4344764,0,0,Microglia(PCDH9high) 643 | 1-Mar,1.5352414,0,0,Microglia(PCDH9high) 644 | PSD3,2.1776147,0,0,Microglia(PCDH9high) 645 | NFASC,3.9107146,0,0,Microglia(PCDH9high) 646 | FRMD4B,1.935317,0,0,Microglia(PCDH9high) 647 | C9orf3,2.4440868,0,0,Microglia(PCDH9high) 648 | ASTN2,3.2444034,0,0,Microglia(PCDH9high) 649 | GPHN,1.8795756,0,0,Microglia(PCDH9high) 650 | CDK19,2.1361053,0,0,Microglia(PCDH9high) 651 | PHACTR3,3.9008868,0,0,Microglia(PCDH9high) 652 | HHIP,3.7061875,0,0,Microglia(PCDH9high) 653 | IGSF11,3.6304243,0,0,Microglia(PCDH9high) 654 | MOG,4.1516743,0,0,Microglia(PCDH9high) 655 | HIP1,3.4465072,0,0,Microglia(PCDH9high) 656 | PPM1H,3.5944362,0,0,Microglia(PCDH9high) 657 | AUTS2,1.372802,0,0,Microglia(PCDH9high) 658 | HS3ST5,4.1612372,0,0,Microglia(PCDH9high) 659 | ROBO1,2.398265,0,0,Microglia(PCDH9high) 660 | FNBP1,2.2610319,0,0,Microglia(PCDH9high) 661 | ABCA2,3.607456,0,0,Microglia(PCDH9high) 662 | KIF6,4.493152,0,0,Microglia(PCDH9high) 663 | SLCO1A2,4.0978127,0,0,Microglia(PCDH9high) 664 | ABCA8,4.3504167,0,0,Microglia(PCDH9high) 665 | CNTNAP2,1.7814218,0,0,Microglia(PCDH9high) 666 | RNF144A,4.0006657,0,0,Microglia(PCDH9high) 667 | PHLDB1,4.3109803,0,0,Microglia(PCDH9high) 668 | FGFR2,4.1801744,0,0,Microglia(PCDH9high) 669 | FAM13C,3.9068763,0,0,Microglia(PCDH9high) 670 | KIF1B,2.1987026,0,0,Microglia(PCDH9high) 671 | LRRC7,1.9176527,0,0,Microglia(PCDH9high) 672 | GNAO1,3.2696815,0,0,Microglia(PCDH9high) 673 | EVA1C,3.7661326,0,0,Microglia(PCDH9high) 674 | C1QTNF3-AMACR,2.7865922,0,0,Microglia(PCDH9high) 675 | JAM3,3.1734595,0,0,Microglia(PCDH9high) 676 | COLGALT2,4.03027,0,0,Microglia(PCDH9high) 677 | SH3D19,3.1998732,0,0,Microglia(PCDH9high) 678 | LRRC1,3.701715,0,0,Microglia(PCDH9high) 679 | OSBPL1A,2.0271912,0,0,Microglia(PCDH9high) 680 | SEMA6A,3.5767605,5.308018e-317,4.31086889e-315,Microglia(PCDH9high) 681 | KIF13A,2.5274563,1.61715e-317,1.316294965e-315,Microglia(PCDH9high) 682 | GALNT13,2.8358166,1.1559064e-315,9.366703444e-314,Microglia(PCDH9high) 683 | LAMA2,3.868086,2.42794495185e-313,1.963074425067e-311,Microglia(PCDH9high) 684 | ANKRD28,2.852006,2.7677717940246e-310,2.23E-308,Microglia(PCDH9high) 685 | MAPT,3.3209248,2.67E-308,2.13E-306,Microglia(PCDH9high) 686 | ANKIB1,2.0083103,0,0,Microglia(PCDH9high) 687 | HIPK2,2.0473163,0.00E+00,4.72E-307,Microglia(PCDH9high) 688 | TULP4,2.0640528,8.08E-308,6.43E-306,Microglia(PCDH9high) 689 | LRP2,4.397836,1.07E-300,8.34E-299,Microglia(PCDH9high) 690 | MAGI1,2.0219831,1.18E-301,9.26E-300,Microglia(PCDH9high) 691 | TSPAN5,2.5450926,8.32E-298,6.40E-296,Microglia(PCDH9high) 692 | PCSK6,4.375265,5.84E-294,4.42E-292,Microglia(PCDH9high) 693 | CCDC88A,1.5500691,5.85E-302,4.60E-300,Microglia(PCDH9high) 694 | ELMO1,0.92305636,1.90E-307,1.51E-305,Microglia(PCDH9high) 695 | SLC5A11,4.372682,3.58E-291,2.66E-289,Microglia(PCDH9high) 696 | APP,1.9195291,4.32E-297,3.31E-295,Microglia(PCDH9high) 697 | ANLN,3.6130874,1.75E-291,1.31E-289,Microglia(PCDH9high) 698 | ARFGEF3,2.9743276,2.47E-291,1.84E-289,Microglia(PCDH9high) 699 | ADAMTS18,4.8399134,5.04E-289,3.68E-287,Microglia(PCDH9high) 700 | NCOA7,2.0860355,1.05E-293,7.92E-292,Microglia(PCDH9high) 701 | NEO1,2.6260712,1.51E-291,1.13E-289,Microglia(PCDH9high) 702 | FOLH1,4.0823836,1.84E-286,1.33E-284,Microglia(PCDH9high) 703 | UGT8,3.4449043,8.04E-286,5.81E-284,Microglia(PCDH9high) 704 | CDK18,3.3077154,3.87E-282,2.75E-280,Microglia(PCDH9high) 705 | PRR5L,4.4627047,6.09E-279,4.27E-277,Microglia(PCDH9high) 706 | PTBP2,1.7928997,7.72E-281,5.48E-279,Microglia(PCDH9high) 707 | KCNAB1,2.778874,1.82E-276,1.27E-274,Microglia(PCDH9high) 708 | LPAR1,1.8271947,1.31E-279,9.25E-278,Microglia(PCDH9high) 709 | SORT1,1.6470495,1.02E-279,7.20E-278,Microglia(PCDH9high) 710 | PPFIA2,1.9172546,6.94E-279,4.85E-277,Microglia(PCDH9high) 711 | ZDHHC20,2.4980583,1.54E-274,1.06E-272,Microglia(PCDH9high) 712 | PIEZO2,4.031802,5.11E-272,3.44E-270,Microglia(PCDH9high) 713 | RASGRF2,3.3931227,1.09E-272,7.43E-271,Microglia(PCDH9high) 714 | CNTN2,3.573548,9.73E-272,6.54E-270,Microglia(PCDH9high) 715 | ZNF652,1.8207545,1.48E-275,1.02E-273,Microglia(PCDH9high) 716 | MOB3B,2.634791,2.90E-272,1.96E-270,Microglia(PCDH9high) 717 | LANCL1,2.8611288,9.26E-270,6.13E-268,Microglia(PCDH9high) 718 | SLC22A15,3.7378125,7.60E-268,4.97E-266,Microglia(PCDH9high) 719 | ZNF708,2.6547253,4.87E-269,3.21E-267,Microglia(PCDH9high) 720 | MLLT4,3.1372135,2.32E-267,1.51E-265,Microglia(PCDH9high) 721 | ADD3,2.6960475,2.58E-266,1.67E-264,Microglia(PCDH9high) 722 | MBNL2,1.5744698,1.69E-270,1.13E-268,Microglia(PCDH9high) 723 | KCTD8,3.107881,9.37E-265,6.01E-263,Microglia(PCDH9high) 724 | ZFYVE16,2.0100546,2.90E-267,1.89E-265,Microglia(PCDH9high) 725 | FA2H,4.3801317,1.93E-263,1.23E-261,Microglia(PCDH9high) 726 | PPP1R9A,2.609769,1.72E-265,1.11E-263,Microglia(PCDH9high) 727 | PLPPR1,3.7126684,3.10E-263,1.96E-261,Microglia(PCDH9high) 728 | SGIP1,2.5865226,6.28E-265,4.04E-263,Microglia(PCDH9high) 729 | ALCAM,1.6746035,1.17E-267,7.67E-266,Microglia(PCDH9high) 730 | NDRG1,3.292036,9.65E-263,6.10E-261,Microglia(PCDH9high) 731 | KCNIP4,1.3580109,9.57E-271,6.40E-269,Microglia(PCDH9high) 732 | RBFOX1,1.3899715,6.35E-269,4.18E-267,Microglia(PCDH9high) 733 | STK39,3.1287591,1.04E-259,6.49E-258,Microglia(PCDH9high) 734 | OPALIN,3.595879,5.57E-258,3.45E-256,Microglia(PCDH9high) 735 | PPP1R16B,4.033009,3.73E-257,2.31E-255,Microglia(PCDH9high) 736 | MEGF10,3.9130204,1.75E-256,1.08E-254,Microglia(PCDH9high) 737 | AMER2,3.1479187,1.76E-256,1.08E-254,Microglia(PCDH9high) 738 | ZNF704,3.3304644,5.13E-256,3.14E-254,Microglia(PCDH9high) 739 | CARNS1,3.5430498,2.93E-254,1.78E-252,Microglia(PCDH9high) 740 | EFHD1,4.0339513,3.66E-253,2.20E-251,Microglia(PCDH9high) 741 | CDC14B,2.0199883,2.99E-256,1.83E-254,Microglia(PCDH9high) 742 | AGTPBP1,1.8943274,1.85E-256,1.14E-254,Microglia(PCDH9high) 743 | TMEM63A,2.9371197,9.92E-253,5.93E-251,Microglia(PCDH9high) 744 | CD22,4.781961,4.08E-248,2.39E-246,Microglia(PCDH9high) 745 | CHKA,1.580776,3.00E-253,1.81E-251,Microglia(PCDH9high) 746 | LDB3,4.580448,1.53E-247,8.91E-246,Microglia(PCDH9high) 747 | LIFR,3.1736965,1.88E-247,1.09E-245,Microglia(PCDH9high) 748 | PHYHIPL,2.973458,1.19E-247,6.94E-246,Microglia(PCDH9high) 749 | PSEN1,1.902434,2.52E-249,1.48E-247,Microglia(PCDH9high) 750 | QDPR,2.5172215,1.97E-245,1.14E-243,Microglia(PCDH9high) 751 | TECPR2,2.7882783,9.73E-245,5.59E-243,Microglia(PCDH9high) 752 | MXI1,2.8381546,2.33E-243,1.33E-241,Microglia(PCDH9high) 753 | KIF13B,1.9647717,5.12E-245,2.95E-243,Microglia(PCDH9high) 754 | C16orf62,3.3487186,2.40E-242,1.36E-240,Microglia(PCDH9high) 755 | ATXN1,1.3173422,5.99E-246,3.48E-244,Microglia(PCDH9high) 756 | RYBP,2.004425,3.69E-242,2.09E-240,Microglia(PCDH9high) 757 | NFIA,1.4196119,5.14E-245,2.96E-243,Microglia(PCDH9high) 758 | ADGRL3,1.7067475,2.29E-242,1.30E-240,Microglia(PCDH9high) 759 | SEC14L5,4.1372843,9.69E-238,5.36E-236,Microglia(PCDH9high) 760 | NEGR1,1.6880343,6.88E-242,3.88E-240,Microglia(PCDH9high) 761 | SRCIN1,3.4053714,1.40E-234,7.60E-233,Microglia(PCDH9high) 762 | NAALADL2,1.5553119,1.17E-238,6.51E-237,Microglia(PCDH9high) 763 | C14orf37,2.283089,4.50E-236,2.46E-234,Microglia(PCDH9high) 764 | FAM134B,4.20061,1.11E-232,5.97E-231,Microglia(PCDH9high) 765 | SVEP1,3.882075,1.74E-232,9.34E-231,Microglia(PCDH9high) 766 | SASH1,3.1349366,8.17E-233,4.41E-231,Microglia(PCDH9high) 767 | KIAA1324L,3.1099994,1.36E-232,7.27E-231,Microglia(PCDH9high) 768 | PAPD4,2.4076838,3.33E-232,1.78E-230,Microglia(PCDH9high) 769 | ZZZ3,2.9305038,3.67E-231,1.95E-229,Microglia(PCDH9high) 770 | TRIM9,2.097032,1.10E-232,5.91E-231,Microglia(PCDH9high) 771 | MTUS1,1.7702355,3.90E-233,2.11E-231,Microglia(PCDH9high) 772 | PLA2G16,2.5825446,6.19E-231,3.29E-229,Microglia(PCDH9high) 773 | WWOX,1.3034008,4.24E-235,2.31E-233,Microglia(PCDH9high) 774 | RFWD2,2.2157826,7.12E-231,3.78E-229,Microglia(PCDH9high) 775 | FAM124A,4.3457165,3.70E-228,1.93E-226,Microglia(PCDH9high) 776 | PPP1R12B,1.8452183,3.10E-230,1.63E-228,Microglia(PCDH9high) 777 | FMNL2,1.1707878,7.29E-234,3.96E-232,Microglia(PCDH9high) 778 | ROR1,4.582143,1.35E-226,7.01E-225,Microglia(PCDH9high) 779 | AATK,3.2941518,8.10E-227,4.20E-225,Microglia(PCDH9high) 780 | WDPCP,1.8159065,5.71E-227,2.96E-225,Microglia(PCDH9high) 781 | BCAS3,1.4042597,1.12E-227,5.81E-226,Microglia(PCDH9high) 782 | TTLL11,2.7896714,3.28E-221,1.67E-219,Microglia(PCDH9high) 783 | LIPA,2.129899,3.10E-221,1.58E-219,Microglia(PCDH9high) 784 | CCP110,2.7322838,2.35E-220,1.19E-218,Microglia(PCDH9high) 785 | SLC22A23,1.967456,2.37E-221,1.21E-219,Microglia(PCDH9high) 786 | PBX1,2.215643,1.11E-220,5.64E-219,Microglia(PCDH9high) 787 | MYO6,2.099472,6.49E-218,3.24E-216,Microglia(PCDH9high) 788 | ADD1,1.8248756,3.69E-218,1.84E-216,Microglia(PCDH9high) 789 | IQCJ-SCHIP1,1.7090033,6.56E-219,3.30E-217,Microglia(PCDH9high) 790 | MYRF,3.6774528,4.10E-214,1.99E-212,Microglia(PCDH9high) 791 | RYR2,1.610987,7.02E-217,3.48E-215,Microglia(PCDH9high) 792 | TNIK,2.0198286,1.53E-214,7.49E-213,Microglia(PCDH9high) 793 | ADARB2,2.8060775,4.65E-212,2.23E-210,Microglia(PCDH9high) 794 | DOCK10,1.0792934,2.41E-216,1.18E-214,Microglia(PCDH9high) 795 | PDE4D,1.3731081,6.99E-214,3.39E-212,Microglia(PCDH9high) 796 | KIAA1370,2.8963358,1.92E-209,9.16E-208,Microglia(PCDH9high) 797 | ZEB2,1.0053463,5.17E-215,2.53E-213,Microglia(PCDH9high) 798 | STARD13,1.6669644,3.15E-211,1.51E-209,Microglia(PCDH9high) 799 | NECAB1,2.4156928,5.30E-209,2.52E-207,Microglia(PCDH9high) 800 | RAB30,3.2989469,3.45E-205,1.61E-203,Microglia(PCDH9high) 801 | MAP4K5,1.6643399,7.64E-207,3.60E-205,Microglia(PCDH9high) 802 | NRXN1,1.3857703,3.59E-208,1.70E-206,Microglia(PCDH9high) 803 | ASPA,4.1177354,2.26E-203,1.05E-201,Microglia(PCDH9high) 804 | BACH2,3.1532845,2.63E-203,1.22E-201,Microglia(PCDH9high) 805 | ACYP2,1.6257823,2.15E-205,1.00E-203,Microglia(PCDH9high) 806 | ENOSF1,2.833997,4.67E-203,2.16E-201,Microglia(PCDH9high) 807 | PLLP,3.5441577,4.11E-200,1.88E-198,Microglia(PCDH9high) 808 | SH3TC2,4.240056,2.14E-195,9.63E-194,Microglia(PCDH9high) 809 | ARHGAP23,3.7768428,1.82E-194,8.14E-193,Microglia(PCDH9high) 810 | CDH19,3.6581717,3.14E-194,1.40E-192,Microglia(PCDH9high) 811 | AC109326.1,3.5410686,1.24E-191,5.43E-190,Microglia(PCDH9high) 812 | GRIK2,1.491727,1.44E-194,6.48E-193,Microglia(PCDH9high) 813 | NDE1,2.673635,8.76E-192,3.86E-190,Microglia(PCDH9high) 814 | MPDZ,2.5640237,1.03E-191,4.55E-190,Microglia(PCDH9high) 815 | KAT2B,1.8645966,6.89E-192,3.04E-190,Microglia(PCDH9high) 816 | OTUD7B,3.661562,4.53E-190,1.97E-188,Microglia(PCDH9high) 817 | PALM2-AKAP2,4.1536117,1.56E-189,6.77E-188,Microglia(PCDH9high) 818 | SGMS1,1.3419967,1.94E-192,8.62E-191,Microglia(PCDH9high) 819 | KIAA0368,2.2929313,1.11E-190,4.85E-189,Microglia(PCDH9high) 820 | IQGAP1,2.2112832,4.19E-190,1.82E-188,Microglia(PCDH9high) 821 | SPTLC2,1.1506144,1.04E-191,4.55E-190,Microglia(PCDH9high) 822 | GRB10,3.7949495,2.66E-187,1.14E-185,Microglia(PCDH9high) 823 | KIAA1958,3.0659108,3.01E-187,1.28E-185,Microglia(PCDH9high) 824 | PRKACB,1.6391886,1.05E-188,4.52E-187,Microglia(PCDH9high) 825 | NOVA1,2.2104332,2.57E-187,1.10E-185,Microglia(PCDH9high) 826 | HAPLN2,3.5925512,5.65E-186,2.40E-184,Microglia(PCDH9high) 827 | BRE,2.115785,2.00E-186,8.51E-185,Microglia(PCDH9high) 828 | JAKMIP2,2.5958421,1.82E-185,7.70E-184,Microglia(PCDH9high) 829 | KAZN,1.9769815,8.99E-186,3.82E-184,Microglia(PCDH9high) 830 | NT5DC1,2.3090682,3.77E-185,1.59E-183,Microglia(PCDH9high) 831 | MBOAT2,2.6162975,5.04E-184,2.11E-182,Microglia(PCDH9high) 832 | GRIA4,2.292584,2.86E-184,1.20E-182,Microglia(PCDH9high) 833 | IKZF2,1.7734658,9.55E-185,4.03E-183,Microglia(PCDH9high) 834 | FAM69A,2.4860482,1.08E-183,4.48E-182,Microglia(PCDH9high) 835 | GPRC5B,2.8093033,3.79E-183,1.57E-181,Microglia(PCDH9high) 836 | LARGE,2.141471,1.05E-183,4.38E-182,Microglia(PCDH9high) 837 | ITGA2,3.9232056,3.36E-181,1.37E-179,Microglia(PCDH9high) 838 | ROBO2,1.3630176,1.83E-184,7.67E-183,Microglia(PCDH9high) 839 | GRIA2,1.465043,2.10E-183,8.71E-182,Microglia(PCDH9high) 840 | SPTBN1,2.1596098,1.18E-181,4.86E-180,Microglia(PCDH9high) 841 | LGR5,4.400963,1.07E-179,4.34E-178,Microglia(PCDH9high) 842 | GATS,3.7328374,6.49E-180,2.63E-178,Microglia(PCDH9high) 843 | BBS2,2.5918686,1.81E-180,7.38E-179,Microglia(PCDH9high) 844 | NTRK2,1.7272472,1.20E-181,4.93E-180,Microglia(PCDH9high) 845 | SLC12A2,2.4123156,2.75E-180,1.12E-178,Microglia(PCDH9high) 846 | HOMER1,1.6025753,7.92E-182,3.26E-180,Microglia(PCDH9high) 847 | MICAL3,2.4559479,6.17E-180,2.50E-178,Microglia(PCDH9high) 848 | NAV1,2.2233243,2.52E-179,1.02E-177,Microglia(PCDH9high) 849 | ZCCHC11,2.3622952,6.62E-179,2.66E-177,Microglia(PCDH9high) 850 | MTMR7,3.3158655,5.12E-178,2.05E-176,Microglia(PCDH9high) 851 | CALD1,3.1482835,7.29E-178,2.91E-176,Microglia(PCDH9high) 852 | FIGN,3.3583853,9.90E-178,3.95E-176,Microglia(PCDH9high) 853 | VRK2,1.7217505,7.63E-178,3.04E-176,Microglia(PCDH9high) 854 | TTYH2,2.452621,6.24E-177,2.47E-175,Microglia(PCDH9high) 855 | SRPK2,1.3629093,4.81E-176,1.89E-174,Microglia(PCDH9high) 856 | TP53TG5,3.811544,1.51E-173,5.84E-172,Microglia(PCDH9high) 857 | CLIC4,2.7457013,1.72E-172,6.67E-171,Microglia(PCDH9high) 858 | ZFHX4,3.539447,5.96E-172,2.30E-170,Microglia(PCDH9high) 859 | CSMD1,1.178174,9.30E-175,3.63E-173,Microglia(PCDH9high) 860 | TNRC6C,1.9410824,2.96E-172,1.14E-170,Microglia(PCDH9high) 861 | FYN,2.6088972,1.75E-171,6.71E-170,Microglia(PCDH9high) 862 | GNAI1,2.623387,4.14E-171,1.59E-169,Microglia(PCDH9high) 863 | GLTSCR1L,2.4495492,2.55E-171,9.77E-170,Microglia(PCDH9high) 864 | SAMD4B,2.0423214,1.46E-171,5.63E-170,Microglia(PCDH9high) 865 | LRRTM4,1.4393367,2.04E-172,7.89E-171,Microglia(PCDH9high) 866 | ITGB8,2.9074595,2.17E-170,8.28E-169,Microglia(PCDH9high) 867 | ABTB2,4.388024,3.14E-169,1.18E-167,Microglia(PCDH9high) 868 | MAL,3.3628752,1.72E-169,6.47E-168,Microglia(PCDH9high) 869 | ABHD17B,2.4982939,7.01E-170,2.66E-168,Microglia(PCDH9high) 870 | MAPK10,1.404383,1.69E-169,6.38E-168,Microglia(PCDH9high) 871 | PLD1,1.595677,3.50E-168,1.31E-166,Microglia(PCDH9high) 872 | SGK3,1.4590396,1.34E-167,4.99E-166,Microglia(PCDH9high) 873 | LRRC4C,1.4880627,1.07E-167,4.01E-166,Microglia(PCDH9high) 874 | ZCCHC24,2.7284188,2.55E-164,9.28E-163,Microglia(PCDH9high) 875 | CTTNBP2,1.0757842,9.04E-167,3.34E-165,Microglia(PCDH9high) 876 | LTBP1,3.8148322,2.94E-163,1.06E-161,Microglia(PCDH9high) 877 | SESTD1,2.657752,1.61E-163,5.84E-162,Microglia(PCDH9high) 878 | PPP2R3A,2.9101658,5.82E-162,2.09E-160,Microglia(PCDH9high) 879 | NRG3,1.1749032,9.48E-163,3.42E-161,Microglia(PCDH9high) 880 | MDGA2,1.7079548,3.90E-161,1.39E-159,Microglia(PCDH9high) 881 | OSBP2,2.783807,1.36E-158,4.78E-157,Microglia(PCDH9high) 882 | PTPN13,2.0492952,9.56E-159,3.38E-157,Microglia(PCDH9high) 883 | MLLT3,1.9686137,9.34E-158,3.28E-156,Microglia(PCDH9high) 884 | MAP4K4,1.001543,1.92E-159,6.81E-158,Microglia(PCDH9high) 885 | MAG,2.613165,2.32E-156,8.06E-155,Microglia(PCDH9high) 886 | RP11-219A15.1,2.3855748,3.04E-155,1.05E-153,Microglia(PCDH9high) 887 | UBE4B,1.6584706,1.52E-155,5.29E-154,Microglia(PCDH9high) 888 | CPOX,2.975717,1.05E-153,3.57E-152,Microglia(PCDH9high) 889 | SPG20,3.0466363,2.62E-153,8.94E-152,Microglia(PCDH9high) 890 | EPN2,1.7752999,5.23E-154,1.79E-152,Microglia(PCDH9high) 891 | BTBD3,2.149101,2.84E-153,9.66E-152,Microglia(PCDH9high) 892 | CCSER1,1.2540823,1.66E-154,5.71E-153,Microglia(PCDH9high) 893 | LRRTM3,2.229121,6.05E-153,2.06E-151,Microglia(PCDH9high) 894 | ZNF365,3.3582351,7.56E-152,2.56E-150,Microglia(PCDH9high) 895 | DPYSL5,3.6935213,1.53E-151,5.17E-150,Microglia(PCDH9high) 896 | ZKSCAN1,1.8281264,9.49E-151,3.18E-149,Microglia(PCDH9high) 897 | KLF7,1.3299792,1.95E-151,6.57E-150,Microglia(PCDH9high) 898 | FOXP1,1.4014432,4.97E-151,1.67E-149,Microglia(PCDH9high) 899 | PTN,2.9475713,1.77E-149,5.89E-148,Microglia(PCDH9high) 900 | RCAN2,2.7739887,3.65E-149,1.22E-147,Microglia(PCDH9high) 901 | SEMA3B,3.4559953,2.57E-148,8.48E-147,Microglia(PCDH9high) 902 | DPP10,1.3677475,9.86E-150,3.29E-148,Microglia(PCDH9high) 903 | KIF5C,2.2209363,1.06E-147,3.48E-146,Microglia(PCDH9high) 904 | IRAK2,1.5033942,1.92E-148,6.34E-147,Microglia(PCDH9high) 905 | STXBP6,2.8562832,3.65E-147,1.20E-145,Microglia(PCDH9high) 906 | GREB1L,2.840439,2.63E-146,8.58E-145,Microglia(PCDH9high) 907 | DENND2A,3.6509778,8.62E-146,2.80E-144,Microglia(PCDH9high) 908 | CNP,1.9978691,2.57E-146,8.39E-145,Microglia(PCDH9high) 909 | RGCC,2.871108,2.99E-145,9.65E-144,Microglia(PCDH9high) 910 | FUT9,2.327717,1.94E-145,6.31E-144,Microglia(PCDH9high) 911 | SOBP,2.3281357,3.21E-145,1.03E-143,Microglia(PCDH9high) 912 | ZNF638,1.0524178,3.07E-146,1.00E-144,Microglia(PCDH9high) 913 | DYNC1I1,1.8585284,3.07E-144,9.82E-143,Microglia(PCDH9high) 914 | PREX2,2.7045808,2.12E-143,6.76E-142,Microglia(PCDH9high) 915 | RALGAPA1,1.2882856,2.97E-144,9.50E-143,Microglia(PCDH9high) 916 | PLD5,3.2805903,9.90E-143,3.15E-141,Microglia(PCDH9high) 917 | KIAA1755,4.189205,2.08E-142,6.61E-141,Microglia(PCDH9high) 918 | FBN1,3.1276162,2.45E-142,7.76E-141,Microglia(PCDH9high) 919 | FAM155A,1.1370339,2.51E-144,8.06E-143,Microglia(PCDH9high) 920 | STOX2,2.472608,1.95E-142,6.20E-141,Microglia(PCDH9high) 921 | SERPINI1,2.2572901,1.90E-142,6.02E-141,Microglia(PCDH9high) 922 | PTPN11,1.9429506,6.42E-142,2.03E-140,Microglia(PCDH9high) 923 | CCDC122,3.2555232,2.63E-141,8.28E-140,Microglia(PCDH9high) 924 | MEIS2,2.979708,2.49E-140,7.79E-139,Microglia(PCDH9high) 925 | TMEM235,4.127054,9.05E-140,2.83E-138,Microglia(PCDH9high) 926 | DAPK2,4.2947516,5.75E-139,1.79E-137,Microglia(PCDH9high) 927 | RTN4,0.9370238,4.41E-141,1.39E-139,Microglia(PCDH9high) 928 | INSR,1.4422153,4.06E-140,1.27E-138,Microglia(PCDH9high) 929 | FAXDC2,3.5123546,1.71E-138,5.28E-137,Microglia(PCDH9high) 930 | C10orf76,2.1405275,9.34E-139,2.89E-137,Microglia(PCDH9high) 931 | RHOU,2.7853086,4.36E-138,1.34E-136,Microglia(PCDH9high) 932 | SEMA4D,1.3697362,9.01E-139,2.79E-137,Microglia(PCDH9high) 933 | MYO5A,1.2665626,1.83E-138,5.64E-137,Microglia(PCDH9high) 934 | CNKSR3,4.1047544,9.88E-137,3.01E-135,Microglia(PCDH9high) 935 | RP1-5O6.7,2.6695387,6.86E-135,2.06E-133,Microglia(PCDH9high) 936 | LRRC63,3.872645,4.64E-134,1.39E-132,Microglia(PCDH9high) 937 | TNKS,1.2519871,3.35E-134,1.00E-132,Microglia(PCDH9high) 938 | RP11-701H24.9,1.9327638,1.31E-133,3.91E-132,Microglia(PCDH9high) 939 | NLK,1.2494471,6.21E-134,1.86E-132,Microglia(PCDH9high) 940 | MEGF9,1.7866979,3.49E-133,1.04E-131,Microglia(PCDH9high) 941 | NFIB,1.7818607,5.00E-133,1.49E-131,Microglia(PCDH9high) 942 | SPECC1,1.1132131,1.81E-133,5.41E-132,Microglia(PCDH9high) 943 | SECISBP2L,1.575408,1.33E-132,3.93E-131,Microglia(PCDH9high) 944 | NAPEPLD,2.4093065,7.29E-132,2.14E-130,Microglia(PCDH9high) 945 | TPD52,2.0889874,7.33E-132,2.15E-130,Microglia(PCDH9high) 946 | MPP5,2.0547836,2.04E-129,5.92E-128,Microglia(PCDH9high) 947 | HEPACAM,2.9567957,1.69E-128,4.84E-127,Microglia(PCDH9high) 948 | WSB1,0.99586856,7.44E-130,2.17E-128,Microglia(PCDH9high) 949 | CRYAB,1.8756241,7.65E-129,2.20E-127,Microglia(PCDH9high) 950 | SMOC1,3.1804683,3.08E-128,8.83E-127,Microglia(PCDH9high) 951 | CSMD3,1.2667264,2.23E-129,6.46E-128,Microglia(PCDH9high) 952 | CLIP4,2.3304188,3.72E-128,1.06E-126,Microglia(PCDH9high) 953 | GPR37,2.7097046,5.54E-128,1.58E-126,Microglia(PCDH9high) 954 | SLC4A8,1.8724985,2.66E-128,7.61E-127,Microglia(PCDH9high) 955 | RP11-566D24.2,2.8864,7.15E-128,2.04E-126,Microglia(PCDH9high) 956 | ZHX3,1.9204112,6.40E-128,1.83E-126,Microglia(PCDH9high) 957 | MVB12B,1.1610919,1.26E-128,3.63E-127,Microglia(PCDH9high) 958 | PPP1R21,1.411079,5.40E-128,1.54E-126,Microglia(PCDH9high) 959 | DIXDC1,3.1200235,3.80E-127,1.08E-125,Microglia(PCDH9high) 960 | SYT9,3.6575298,1.36E-126,3.85E-125,Microglia(PCDH9high) 961 | RAB40B,2.5444653,1.62E-126,4.57E-125,Microglia(PCDH9high) 962 | LRRFIP2,1.4769635,1.21E-126,3.41E-125,Microglia(PCDH9high) 963 | LMF1,1.8668382,6.13E-126,1.73E-124,Microglia(PCDH9high) 964 | CRTC3,2.3430047,2.59E-125,7.27E-124,Microglia(PCDH9high) 965 | POGZ,1.2057213,2.93E-125,8.22E-124,Microglia(PCDH9high) 966 | MKRN3,3.1586654,5.70E-124,1.59E-122,Microglia(PCDH9high) 967 | CA2,2.9769723,5.28E-124,1.47E-122,Microglia(PCDH9high) 968 | PIK3C2B,2.4285996,8.98E-124,2.49E-122,Microglia(PCDH9high) 969 | FAM171A1,2.4121563,8.42E-124,2.34E-122,Microglia(PCDH9high) 970 | RERE,0.84993464,7.14E-125,2.00E-123,Microglia(PCDH9high) 971 | ELL2,0.95721436,2.34E-124,6.55E-123,Microglia(PCDH9high) 972 | ADRBK2,1.697591,2.62E-123,7.25E-122,Microglia(PCDH9high) 973 | HBS1L,1.7680883,7.78E-123,2.15E-121,Microglia(PCDH9high) 974 | MEIS1,2.907137,4.70E-122,1.29E-120,Microglia(PCDH9high) 975 | KLHL3,2.5637004,8.26E-122,2.26E-120,Microglia(PCDH9high) 976 | SLC13A3,3.0825305,1.89E-121,5.17E-120,Microglia(PCDH9high) 977 | GRAMD3,3.2348206,4.35E-121,1.19E-119,Microglia(PCDH9high) 978 | ATG4C,1.3396677,7.08E-122,1.94E-120,Microglia(PCDH9high) 979 | ODZ4,1.5968034,1.27E-121,3.47E-120,Microglia(PCDH9high) 980 | RP11-792A8.5,2.5358994,8.74E-121,2.38E-119,Microglia(PCDH9high) 981 | RBPJ,1.1679509,3.84E-121,1.05E-119,Microglia(PCDH9high) 982 | CLDND1,1.7199966,4.68E-120,1.26E-118,Microglia(PCDH9high) 983 | TMC7,2.461672,1.02E-119,2.76E-118,Microglia(PCDH9high) 984 | MGEA5,1.9555279,1.06E-119,2.86E-118,Microglia(PCDH9high) 985 | SCD,1.8998525,1.53E-119,4.12E-118,Microglia(PCDH9high) 986 | FNIP2,1.042957,1.06E-118,2.84E-117,Microglia(PCDH9high) 987 | FEZ1,2.2335646,1.70E-116,4.47E-115,Microglia(PCDH9high) 988 | SPAG9,1.2127727,6.16E-117,1.63E-115,Microglia(PCDH9high) 989 | PCGF5,1.6050993,4.07E-116,1.07E-114,Microglia(PCDH9high) 990 | PRTFDC1,2.406998,1.08E-115,2.83E-114,Microglia(PCDH9high) 991 | HIP1R,3.150793,2.71E-115,7.06E-114,Microglia(PCDH9high) 992 | CYP7B1,2.7663856,4.76E-115,1.24E-113,Microglia(PCDH9high) 993 | RGS7,1.2556461,8.79E-116,2.30E-114,Microglia(PCDH9high) 994 | PEAK1,0.9866732,5.11E-116,1.34E-114,Microglia(PCDH9high) 995 | UNC79,1.7208176,3.18E-115,8.29E-114,Microglia(PCDH9high) 996 | ZCCHC6,1.7942318,3.55E-115,9.24E-114,Microglia(PCDH9high) 997 | TESK2,2.3613908,1.39E-114,3.59E-113,Microglia(PCDH9high) 998 | DPP6,1.3831214,5.41E-115,1.40E-113,Microglia(PCDH9high) 999 | SIK2,1.2616347,5.28E-115,1.37E-113,Microglia(PCDH9high) 1000 | PLA2G4C,2.52553,2.68E-114,6.89E-113,Microglia(PCDH9high) 1001 | ZHX2,1.498855,1.20E-114,3.10E-113,Microglia(PCDH9high) -------------------------------------------------------------------------------- /data/Fig5d.csv: -------------------------------------------------------------------------------- 1 | term,p-value,q-value,negLOG10(p-value),negLOG10(q-value),Cluster 2 | Synapse Pruning (GO:0098883),5.04E-07,0.001063895,6.297795288,2.973101374,Microglia 3 | Regulation Of Dopamine Metabolic Process (GO:0042053),1.27E-05,0.008957512,4.89538526,2.0478126,Microglia 4 | Positive Regulation Of Tumor Necrosis Factor-Mediated Signaling Pathway (GO:1903265),2.49E-05,0.013170374,4.60303582,1.880401898,Microglia 5 | Positive Regulation Of Cytokine Production (GO:0001819),6.09E-05,0.025712803,4.215574495,1.589850586,Microglia 6 | Immunoglobulin Production Involved In Immunoglobulin-Mediated Immune Response (GO:0002381),8.33E-05,0.025991412,4.079580564,1.585170131,Microglia 7 | Axon Guidance (GO:0007411),1.50E-10,3.28E-07,9.823908741,6.484126156,Microglia(PCDH9high) 8 | Axonogenesis (GO:0007409),3.63E-10,3.96E-07,9.440093375,6.402304814,Microglia(PCDH9high) 9 | Nervous System Development (GO:0007399),1.20E-09,8.77E-07,8.920818754,6.057000407,Microglia(PCDH9high) 10 | Neuron Projection Guidance (GO:0097485),1.91E-09,1.04E-06,8.718966633,5.982966661,Microglia(PCDH9high) 11 | Regulation Of Neuron Projection Development (GO:0010975),1.52E-08,6.63E-06,7.818156412,5.178486472,Microglia(PCDH9high) -------------------------------------------------------------------------------- /data/KEGG_select.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/data/KEGG_select.xlsx -------------------------------------------------------------------------------- /data/fig4d.csv: -------------------------------------------------------------------------------- 1 | term,p-value,q-value,negLOG10(p-value),negLOG10(q-value),Cluster 2 | Synapse Pruning (GO:0098883),5.04E-07,0.001063895,6.297795288,2.973101374,Microglia 3 | Regulation Of Dopamine Metabolic Process (GO:0042053),1.27E-05,0.008957512,4.89538526,2.0478126,Microglia 4 | Positive Regulation Of Tumor Necrosis Factor-Mediated Signaling Pathway (GO:1903265),2.49E-05,0.013170374,4.60303582,1.880401898,Microglia 5 | Positive Regulation Of Cytokine Production (GO:0001819),6.09E-05,0.025712803,4.215574495,1.589850586,Microglia 6 | Immunoglobulin Production Involved In Immunoglobulin-Mediated Immune Response (GO:0002381),8.33E-05,0.025991412,4.079580564,1.585170131,Microglia 7 | Axon Guidance (GO:0007411),1.50E-10,3.28E-07,9.823908741,6.484126156,Microglia(PCDH9high) 8 | Axonogenesis (GO:0007409),3.63E-10,3.96E-07,9.440093375,6.402304814,Microglia(PCDH9high) 9 | Nervous System Development (GO:0007399),1.20E-09,8.77E-07,8.920818754,6.057000407,Microglia(PCDH9high) 10 | Neuron Projection Guidance (GO:0097485),1.91E-09,1.04E-06,8.718966633,5.982966661,Microglia(PCDH9high) 11 | Regulation Of Neuron Projection Development (GO:0010975),1.52E-08,6.63E-06,7.818156412,5.178486472,Microglia(PCDH9high) -------------------------------------------------------------------------------- /data/neurotransmitter.txt: -------------------------------------------------------------------------------- 1 | gene Receptor_type 2 | GRIA1 Glutamate 3 | GRIA2 Glutamate 4 | GRIA3 Glutamate 5 | GRIA4 Glutamate 6 | GRID1 Glutamate 7 | GRID2 Glutamate 8 | GRID2IP Glutamate 9 | GRIK1 Glutamate 10 | GRIK2 Glutamate 11 | GRIK3 Glutamate 12 | GRIK4 Glutamate 13 | GRIK5 Glutamate 14 | GRIN1 Glutamate 15 | GRIN2A Glutamate 16 | GRIN2B Glutamate 17 | GRIN2C Glutamate 18 | GRIN2D Glutamate 19 | GRIN3A Glutamate 20 | GRIN3B Glutamate 21 | GRINA Glutamate 22 | GRIP1 Glutamate 23 | GRIP2 Glutamate 24 | GRIPAP1 Glutamate 25 | GRM1 Glutamate 26 | GRM2 Glutamate 27 | GRM3 Glutamate 28 | GRM4 Glutamate 29 | GRM5 Glutamate 30 | GRM6 Glutamate 31 | GRM7 Glutamate 32 | GRM8 Glutamate 33 | GLRA1 Glycine 34 | GLRA2 Glycine 35 | GLRA3 Glycine 36 | GLRA4 Glycine 37 | ADRA1A Epinephrine and Norepinephrine 38 | ADRA1B Epinephrine and Norepinephrine 39 | ADRA1D Epinephrine and Norepinephrine 40 | ADRA2A Epinephrine and Norepinephrine 41 | ADRA2B Epinephrine and Norepinephrine 42 | ADRA2C Epinephrine and Norepinephrine 43 | ADRB1 Epinephrine and Norepinephrine 44 | ADRB2 Epinephrine and Norepinephrine 45 | ADRB3 Epinephrine and Norepinephrine 46 | HTR1A 5-HT 47 | HTR1B 5-HT 48 | HTR1D 5-HT 49 | HTR1E 5-HT 50 | HTR1F 5-HT 51 | HTR2A 5-HT 52 | HTR2B 5-HT 53 | HTR2C 5-HT 54 | HTR3A 5-HT 55 | HTR3B 5-HT 56 | HTR3C 5-HT 57 | HTR3D 5-HT 58 | HTR3E 5-HT 59 | HTR4 5-HT 60 | HTR5A 5-HT 61 | HTR6 5-HT 62 | HTR7 5-HT 63 | GABBR1 GABA 64 | GABBR2 GABA 65 | GABRA1 GABA 66 | GABRA2 GABA 67 | GABRA3 GABA 68 | GABRA4 GABA 69 | GABRA5 GABA 70 | GABRA6 GABA 71 | GABRB1 GABA 72 | GABRB2 GABA 73 | GABRB3 GABA 74 | GABRD GABA 75 | GABRE GABA 76 | GABRG1 GABA 77 | GABRG2 GABA 78 | GABRG3 GABA 79 | GABRP GABA 80 | GABRQ GABA 81 | GABRR1 GABA 82 | GABRR2 GABA 83 | GABRR3 GABA 84 | CHRM1 Acetylcholine 85 | CHRM2 Acetylcholine 86 | CHRM3 Acetylcholine 87 | CHRM4 Acetylcholine 88 | CHRM5 Acetylcholine 89 | CHRNA1 Acetylcholine 90 | CHRNA2 Acetylcholine 91 | CHRNA3 Acetylcholine 92 | CHRNA4 Acetylcholine 93 | CHRNA5 Acetylcholine 94 | CHRNA6 Acetylcholine 95 | CHRNA7 Acetylcholine 96 | CHRNA9 Acetylcholine 97 | CHRNA10 Acetylcholine 98 | CHRNB1 Acetylcholine 99 | CHRNB2 Acetylcholine 100 | CHRNB3 Acetylcholine 101 | CHRNB4 Acetylcholine 102 | CHRND Acetylcholine 103 | CHRNE Acetylcholine 104 | CHRNG Acetylcholine -------------------------------------------------------------------------------- /data/pfc_gene_anno.txt: -------------------------------------------------------------------------------- 1 | gene Type 2 | BTK phagocytosis 3 | ITGB2 phagocytosis 4 | C3 phagocytosis 5 | CD300A phagocytosis 6 | TREM2 phagocytosis 7 | CSK phagocytosis 8 | VAV1 phagocytosis 9 | CD14 phagocytosis 10 | CYBA phagocytosis 11 | ANO6 phagocytosis 12 | RACK1 phagocytosis 13 | HCK phagocytosis 14 | PLCG2 phagocytosis 15 | PLSCR1 phagocytosis 16 | PRKCD phagocytosis 17 | CORO1A phagocytosis 18 | GAS6 phagocytosis 19 | AIF1 phagocytosis 20 | SYK phagocytosis 21 | PYCARD phagocytosis 22 | FCGR1A phagocytosis 23 | IRF8 phagocytosis 24 | FCER1G phagocytosis 25 | LRP1 phagocytosis 26 | PLD4 phagocytosis 27 | IL15 phagocytosis 28 | PECAM1 phagocytosis 29 | ITGAL phagocytosis 30 | NCF4 phagocytosis 31 | TYROBP phagocytosis 32 | LEPR phagocytosis 33 | BIN2 phagocytosis 34 | ITGAM phagocytosis 35 | CALR phagocytosis 36 | GRK3 Chemokine 37 | WAS Chemokine 38 | GRK2 Chemokine 39 | JAK3 Chemokine 40 | PIK3CD Chemokine 41 | ADCY7 Chemokine 42 | PIK3CG Chemokine 43 | PLCB2 Chemokine 44 | CXCL16 Chemokine 45 | CX3CR1 Chemokine 46 | PIK3R6 Chemokine 47 | LGALS9 Chemokine 48 | TLR7 Chemokine 49 | CSF1R Chemokine 50 | IL4R Chemokine 51 | IL17RA Chemokine 52 | HMOX1 Chemokine 53 | DDX3X Chemokine 54 | XIAP Cytokine 55 | PRKN Cytokine 56 | BST2 Cytokine 57 | TMSB4X Cytokine 58 | FCGR3A Cytokine 59 | HLA-A Cytokine 60 | HSPA1B Cytokine 61 | LILRB1 Cytokine 62 | CD81 Cytokine 63 | PARP9 Cytokine 64 | NLRC5 Cytokine 65 | KCNQ1OT1 Cytokine 66 | LRRK2 Cytokine 67 | LAPTM5 Cytokine 68 | CASP1 Cytokine 69 | NOD1 Cytokine 70 | PTPN2 Cytokine 71 | TLR1 Cytokine 72 | TNFRSF14 Cytokine 73 | CASP4 Cytokine 74 | HLA-DRB1 Cytokine 75 | PARP14 Cytokine 76 | ATP6AP2 Cytokine 77 | UFD1 Cytokine 78 | STMP1 Cytokine 79 | OTUD5 Cytokine 80 | HLA-E Cytokine 81 | LY96 Cytokine 82 | CDC37 Cytokine 83 | MIB2 Cytokine 84 | HSPA1A Cytokine 85 | IFI16 Cytokine 86 | PTAFR Cytokine 87 | B2M Cytokine 88 | HSPB1 Cytokine 89 | IRF5 Cytokine 90 | HK1 Cytokine 91 | CD4 Cytokine 92 | VSIR Cytokine 93 | GSDMD Cytokine 94 | ZFP36 Cytokine 95 | POU2F2 Cytokine 96 | GPSM3 Cytokine 97 | RPS3 Cytokine 98 | RNF135 Cytokine 99 | CCDC88B Cytokine 100 | CLEC5A Cytokine 101 | HLA-DPA1 Cytokine 102 | CEBPB Cytokine 103 | TLR5 Cytokine 104 | TRAF3IP3 Cytokine -------------------------------------------------------------------------------- /figures/Extended Data Figures/Extended Data Fig 1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Extended Data Figures/Extended Data Fig 1.pdf -------------------------------------------------------------------------------- /figures/Extended Data Figures/Extended Data Fig 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Extended Data Figures/Extended Data Fig 2.pdf -------------------------------------------------------------------------------- /figures/Extended Data Figures/Extended Data Fig. 3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Extended Data Figures/Extended Data Fig. 3.pdf -------------------------------------------------------------------------------- /figures/Extended Data Figures/Extended Data Fig. 4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Extended Data Figures/Extended Data Fig. 4.pdf -------------------------------------------------------------------------------- /figures/Extended Data Figures/Extended Data Fig. 5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Extended Data Figures/Extended Data Fig. 5.pdf -------------------------------------------------------------------------------- /figures/Extended Data Figures/Extended Data Fig. 6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Extended Data Figures/Extended Data Fig. 6.pdf -------------------------------------------------------------------------------- /figures/Main Figures/Figure 1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Main Figures/Figure 1.pdf -------------------------------------------------------------------------------- /figures/Main Figures/Figure 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Main Figures/Figure 2.pdf -------------------------------------------------------------------------------- /figures/Main Figures/Figure 3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Main Figures/Figure 3.pdf -------------------------------------------------------------------------------- /figures/Main Figures/Figure 6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Main Figures/Figure 6.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 1.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 10.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 11.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 2.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 3.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 4.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 5.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 6.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 7.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 8.pdf -------------------------------------------------------------------------------- /figures/Supplementary Figures/Supplementary Figure 9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/figures/Supplementary Figures/Supplementary Figure 9.pdf -------------------------------------------------------------------------------- /notebooks/Extended Data Figures/ExtFig. 4.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "id": "468461cf", 7 | "metadata": {}, 8 | "outputs": [], 9 | "source": [ 10 | "library(ggplot2)\n", 11 | "library(ggh4x)\n", 12 | "library(tidyverse)\n", 13 | "library(\"patchwork\")\n", 14 | "library(enrichplot)\n", 15 | "library(dplyr)\n", 16 | "library(ggrepel)\n", 17 | "library(org.Hs.eg.db)\n", 18 | "library(clusterProfiler)\n", 19 | "library(RColorBrewer)\n", 20 | "library(gridExtra)\n", 21 | "library(pheatmap)" 22 | ] 23 | }, 24 | { 25 | "cell_type": "markdown", 26 | "id": "b51601b8", 27 | "metadata": {}, 28 | "source": [ 29 | "# extended_data_fig4a\n", 30 | "# Metadata of integrated data sets across brain regions. " 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "id": "21472827", 37 | "metadata": {}, 38 | "outputs": [], 39 | "source": [ 40 | "library(sceasy)\n", 41 | "library(reticulate)\n", 42 | "use_condaenv('sceasy')\n", 43 | "sceasy::convertFormat(\"Fig4a.h5\", from=\"anndata\", to=\"seurat\",\n", 44 | " outFile='fig4a.rds')\n", 45 | "\n", 46 | "fig4<-readRDS(\"fig4a.rds\")\n", 47 | "#+scale_fill_manual(values = c(\"#0e9c9d\", \"#dda129\"))\n", 48 | "# correct \"Oligodendrocyte(PCDH9+)\" as \"Microglia(PCDH9high)\"\n", 49 | "fig4$cell2 <- factor(fig4$cell2) \n", 50 | "\n", 51 | "# Check and add new levels to factor columns\n", 52 | "if (!(\"Microglia(PCDH9high)\" %in% levels(fig4$cell2))) {\n", 53 | " levels(fig4$cell2) <- c(levels(fig4$cell2), \"Microglia(PCDH9high)\")\n", 54 | "}\n", 55 | "\n", 56 | "# substitue values\n", 57 | "fig4$cell2[fig4$cell2 == \"Oligodendrocyte(PCDH9+)\"] <- \"Microglia(PCDH9high)\"\n", 58 | "\n", 59 | "meta_data<-fig4@meta.data\n", 60 | "meta_data$type<-meta_data$study\n", 61 | "meta<-read.csv(\"fig4_metadata.csv\",header=T,row.names=1)\n", 62 | "meta_data<-meta\n", 63 | "meta_data$age <- as.numeric(gsub(\"\\\\D\", \"\", meta_data$donor_age))\n", 64 | "meta_data$range <- ifelse(meta_data$age > 20 & meta_data$age <= 40, \"21-40\",\n", 65 | " ifelse(meta_data$age > 40 & meta_data$age <= 60, \"41-60\",\n", 66 | " ifelse(meta_data$age > 60 & meta_data$age <= 80, \"61-80\",\n", 67 | " ifelse(meta_data$age > 80, \">80\", NA))))\n", 68 | "\n", 69 | "# Metadata cleansing \n", 70 | "# When the ge content of meta_data satisfies \"greater than 20 and less than or equal to 40\", fill in \"21-40\".\n", 71 | "# If \"greater than or equal to 41 and less than or equal to 60\" is satisfied, fill in \"41-60\", \n", 72 | "# if \"greater than or equal to 41 and less than or equal to 60\" is satisfied, fill in \"41-60\", \n", 73 | "# if \"more than 60 and less than or equal to 80\" is satisfied, fill in Enter \"61-80\", \n", 74 | "# if \"greater than 80\" is satisfied, fill in \">80\"\n", 75 | "\n", 76 | "meta_data$cell2<- ordered(meta_data$cell2, levels = c(\"Oligodendrocyte precursor\",\"Oligodendrocyte\",\"Newly formed oligodendrocytes\",\"Astrocyte\",\"Microglia\", \"Microglia(PCDH9high)\", \"Vascular leptomeningeal cell\",\"Fibroblast\", \"Endothelial\",\"GABAergic\",\"Glutamatergic\",\"Glutamatergic(Pyr)\"))\n", 77 | "\n", 78 | "use_colors <- c(\n", 79 | " 'Prefrontal cortex' = \"#B3128A\",\n", 80 | " 'Hippocampus' = \"#74CAFF\",\n", 81 | " 'Microglia' = \"#F0E68C\",\n", 82 | " 'Microglia(PCDH9high)' = \"#B1E71A\",\n", 83 | " 'Astrocyte'=\"#AFE1AF\",\n", 84 | " 'Endothelial' = \"#50C878\", \n", 85 | " 'Fibroblast' = \"#D3B48C\", \n", 86 | " 'GABAergic' = '#E30D5C',\n", 87 | " `Glutamatergic`=\"#CC5500\", \n", 88 | " `Glutamatergic(Pyr)`=\"#FA6055\", \n", 89 | " `Newly formed oligodendrocytes`=\"#74CAFF\",\n", 90 | " `Oligodendrocyte`=\"#5C89CC\",\n", 91 | " `Oligodendrocyte precursor`=\"#016091\",\n", 92 | " `Vascular leptomeningeal cell`=\"#8B8002\")\n", 93 | "\n", 94 | "p1 <- ggplot(meta_data, aes(\n", 95 | " y = region\n", 96 | ")) +\n", 97 | " geom_bar(aes(fill = cell2), position = \"fill\") +\n", 98 | " scale_fill_manual(values =use_colors) +\n", 99 | " ggnewscale::new_scale_fill() +\n", 100 | " geom_col(data = distinct(meta_data, region, range, study), aes(x = -.3, fill = region), width = .9) +\n", 101 | " geom_col(data = distinct(meta_data, region, range, study), aes(x = -.15), fill = \"white\", color = \"white\") +\n", 102 | " geom_text(data = distinct(meta_data,region, range, study), aes(x = -.075, label = region)) +\n", 103 | " scale_x_continuous(expand = c(0, 0)) +\n", 104 | " facet_nested(study + range~.,\n", 105 | " scale = \"free_y\", space = \"free_y\",\n", 106 | " strip = strip_nested(\n", 107 | " by_layer_y = TRUE,\n", 108 | " background_y = list(element_part_rect(side = \"l\", fill = NA, colour = \"black\", linewidth = 1),\n", 109 | " element_rect(colour = NA, fill = NA))\n", 110 | " )\n", 111 | ")\n", 112 | "\n", 113 | "p2=p1+ scale_fill_manual(values = c(\n", 114 | " `Prefrontal cortex` = \"#B3128A\",\n", 115 | " `Hippocampus` = \"#74CAFF\"))\n", 116 | "p2\n", 117 | "ggsave(filename=\"fig4-stacked-meta.pdf\",plot=p2, width = 14, height = 7)\n", 118 | "\n", 119 | "fig4$study <- factor(fig4$study)\n", 120 | "\n", 121 | "if (!(\"Lau et al.\" %in% levels(fig4$study))) {\n", 122 | " levels(fig4$study) <- c(levels(fig4$study), \"Lau et al.\")\n", 123 | "}\n", 124 | "fig4$study[fig4$study == \"human_brain_Lau_2020_10x\"] <- \"Lau et al.\"\n", 125 | "\n", 126 | "fig4$study <- factor(fig4$study)\n", 127 | "\n", 128 | "if (!(\"Kihara et al.\" %in% levels(fig4$study))) {\n", 129 | " levels(fig4$study) <- c(levels(fig4$study), \"Kihara et al.\")\n", 130 | "}\n", 131 | "fig4$study[fig4$study == \"human_brain_PFC_Kihara_2022_10x\"] <- \"Kihara et al.\"\n", 132 | "\n", 133 | "\n", 134 | "if (!(\"Ayhan et al.\" %in% levels(fig4$study))) {\n", 135 | " levels(fig4$study) <- c(levels(fig4$study), \"Ayhan et al.\")\n", 136 | "}\n", 137 | "fig4$study[fig4$study == \"human_brain_source_Fatma_2020\"] <- \"Ayhan et al.\"\n", 138 | "\n", 139 | " \n", 140 | "if (!(\"Franjic et al.\" %in% levels(fig4$study))) {\n", 141 | " levels(fig4$study) <- c(levels(fig4$study), \"Franjic et al.\")\n", 142 | "}\n", 143 | "fig4$study[fig4$study == \"human_brain_hippocampus_Franjic_2021_10x\"] <- \"Franjic et al.\"\n", 144 | "\n", 145 | "\n", 146 | "fig4_counts <- FetchData(fig4, vars = c(\"region\", \"cell2\",\"study\",\"donor_status\",\"age\")) %>% \n", 147 | " mutate(region = factor(region, levels = c(\"Hippocampus\",\"Prefrontal cortex\")))\n", 148 | "\n", 149 | "\n", 150 | " fig4_counts <- FetchData(fig4, vars = c(\"region\", \"cell2\",\"study\",\"donor_status\",\"age\")) %>% \n", 151 | " mutate(\n", 152 | " region = factor(region, levels = c(\"Hippocampus\", \"Prefrontal cortex\"), exclude = NULL)\n", 153 | " )\n", 154 | "\n", 155 | "\n", 156 | "### cell type proportion and signature genes\n", 157 | "fig4 <- readRDS(\"fig4.rds\")\n", 158 | "fig4@meta.data$cell2[fig4@meta.data$cell2 == 'Oligodendrocyte(PCDH9+)'] <- 'Microglia(PCDH9high)'\n", 159 | "\n", 160 | "use_colors <- c(\n", 161 | " `Prefrontal cortex` = \"#B3128A\",\n", 162 | " `Hippocampus` = \"#74CAFF\",\n", 163 | " `Microglia` = \"#F0E68C\",\n", 164 | " `Microglia(PCDH9high)` = \"#B1E71A\",\n", 165 | " `Astrocyte`=\"#AFE1AF\",\n", 166 | " `Endothelial`=\"#50C878\", \n", 167 | " `Fibroblast`=\"#D3B48C\", \n", 168 | " `GABAergic`=\"#E30D5C\",\n", 169 | " `Glutamatergic`=\"#CC5500\", \n", 170 | " `Glutamatergic(Pyr)`=\"#FA6055\", \n", 171 | " `Newly formed oligodendrocytes`=\"#74CAFF\",\n", 172 | " `Oligodendrocyte`=\"#5C89CC\",\n", 173 | " `Oligodendrocyte precursor`=\"#016091\",\n", 174 | " `Vascular leptomeningeal cell`=\"#8B8002\")\n", 175 | "\n", 176 | "fig4@meta.data$cell_type<- ordered(fig4@meta.data$cell2, levels = c(\"Oligodendrocyte precursor\",\"Oligodendrocyte\",\"Newly formed oligodendrocytes\",\"Astrocyte\",\"Microglia\", \"Microglia(PCDH9high)\", \"Vascular leptomeningeal cell\",\"Fibroblast\", \"Endothelial\",\"GABAergic\",\"Glutamatergic\",\"Glutamatergic(Pyr)\"))\n", 177 | "\n", 178 | "fig4@meta.data$region<- ordered(fig4@meta.data$region, levels = c(\"Hippocampus\",\"Prefrontal cortex\"))\n", 179 | "\n", 180 | "fig4_counts <- FetchData(fig4, vars = c(\"region\", \"cell_type\")) %>% \n", 181 | " mutate(region = factor(region, levels = c(\"Hippocampus\",\"Prefrontal cortex\")))\n", 182 | "\n", 183 | "\n", 184 | " # cell proportion \n", 185 | "fig4_counts_tbl <- fig4_counts %>%\n", 186 | " dplyr::count(cell_type, region)\n", 187 | "write_csv(fig4_counts_tbl, path = \"fig4_counts_tbl.csv\")\n", 188 | "\n", 189 | "ggplot(data = fig4_counts,aes(x = region, fill = cell_type)) +\n", 190 | " geom_bar(position = \"fill\") +\n", 191 | " scale_fill_manual(values = use_colors) +\n", 192 | " coord_flip() +\n", 193 | " scale_y_reverse()\n", 194 | "ggsave2(\"barplot_fig4.pdf\", path = \"/home/hlf/hpc/jupyter_dir/BCA_code\", width = 8, height = 2)\n" 195 | ] 196 | }, 197 | { 198 | "cell_type": "markdown", 199 | "id": "316c6633", 200 | "metadata": {}, 201 | "source": [ 202 | "# extended_data_fig4b\n", 203 | "The UMAP plot illustrates a subset highlighted in red circles within panel a, comprising microglia and microglia (PCDH9high) cells." 204 | ] 205 | }, 206 | { 207 | "cell_type": "code", 208 | "execution_count": null, 209 | "id": "4f2ec91c-de78-474b-ad43-9fbf44ee64f2", 210 | "metadata": {}, 211 | "outputs": [], 212 | "source": [ 213 | "import scanpy as sc\n", 214 | "import pandas as pd\n", 215 | "import numpy as np\n", 216 | "import anndata\n", 217 | "from matplotlib import rcParams\n", 218 | "sc.set_figure_params(color_map='viridis')\n", 219 | "sc.settings.verbosity = 2" 220 | ] 221 | }, 222 | { 223 | "cell_type": "code", 224 | "execution_count": null, 225 | "id": "c6e4a873-4d28-498d-98fe-4641716a91e6", 226 | "metadata": {}, 227 | "outputs": [], 228 | "source": [ 229 | "%pylab inline\n", 230 | "\n", 231 | "import warnings\n", 232 | "warnings.filterwarnings(\"ignore\")\n", 233 | "\n", 234 | "#from SCCAF import *\n", 235 | "# import scvi\n", 236 | "from gssnng import score_cells\n", 237 | "from glob import iglob\n", 238 | "from tqdm import tqdm" 239 | ] 240 | }, 241 | { 242 | "cell_type": "code", 243 | "execution_count": null, 244 | "id": "9d4dc444-7f1f-4010-bba6-07994e7e79a7", 245 | "metadata": {}, 246 | "outputs": [], 247 | "source": [ 248 | "fig4b=sc.read(\"Fig4b.h5\")\n", 249 | "#MG-State.txt is a list of differential genes from Sun et al.(https://doi.org/10.1016/j.cell.2023.08.037)\n", 250 | "score_cells.with_gene_sets(adata=fig4b, # AnnData object\n", 251 | " gene_set_file='MG-State.txt', # File path of gene sets\n", 252 | " groupby='Celltype', # Will sample neighbors within this group\n", 253 | " smooth_mode='connectivity', # Smooths matrix using distance weights from NN graph.\n", 254 | " recompute_neighbors=32, # Rebuild nearest neighbor graph with groups, 0 turns off function\n", 255 | " score_method='singscore', # Method of scoring\n", 256 | " method_params={'normalization':'theoretical'}, # Special parameters for some methods \n", 257 | " ranked=True, # Use ranked data, True or False\n", 258 | " cores=36)\n", 259 | "#MG0:homeostatic\n", 260 | "#MG1:neuronal surveillance\n", 261 | "#MG3:ribosome biogenesis\n", 262 | "#MG4:lipid homeostasis \n", 263 | "#MG5:phagocytic\n", 264 | "#MG6:stress signature\n", 265 | "#MG7:glycolytic\n", 266 | "#MG8:inflammatory II\n", 267 | "#MG10:inflammatory III\n", 268 | "#MG11:antiviral\n", 269 | "#MG12:cycling\n", 270 | "sc.pl.matrixplot(fig4b,['MG0', 'MG1', 'MG2', 'MG3', 'MG4', 'MG5', 'MG6', 'MG7', 'MG8', 'MG10', 'MG11', 'MG12'],\n", 271 | " groupby='Celltype',save='extended_data_fig4b.pdf')" 272 | ] 273 | }, 274 | { 275 | "cell_type": "markdown", 276 | "id": "5868884a", 277 | "metadata": {}, 278 | "source": [ 279 | "# extended_data_fig4c\n", 280 | "The donor status statistics of microglia and microglia (PCDH9high) clusters." 281 | ] 282 | }, 283 | { 284 | "cell_type": "code", 285 | "execution_count": null, 286 | "id": "bc3e0efa-ce68-4481-bc61-410c690e05c6", 287 | "metadata": {}, 288 | "outputs": [], 289 | "source": [ 290 | "fig4b=sc.read(\"Fig4b.h5\")\n", 291 | "cell_metadata = fig4b.obs\n", 292 | "cell_metadata\n", 293 | "cell_metadata.to_csv(\"fig4b_metadata.csv\", index=True)" 294 | ] 295 | }, 296 | { 297 | "cell_type": "code", 298 | "execution_count": null, 299 | "id": "df759f64", 300 | "metadata": {}, 301 | "outputs": [], 302 | "source": [ 303 | "meta_data<-read.csv(\"fig4b_metadata.csv\",header=T,row.names=1)\n", 304 | "library(ggplot2)\n", 305 | "library(cowplot)\n", 306 | "theme_set(theme_cowplot())\n", 307 | "\n", 308 | "# meta_data adds a range column. \n", 309 | "# When the ge content of meta_data satisfies \"greater than 20 and less than or equal to 40\", fill in \"21-40\".\n", 310 | "# If \"greater than or equal to 41 and less than or equal to 60\" is satisfied, fill in \"41-60\", \n", 311 | "# if \"greater than or equal to 41 and less than or equal to 60\" is satisfied, fill in \"41-60\", if \"more than 60 and less than or equal to 80\" is satisfied, fill in Enter \"61-80\", if \"greater than 80\" is satisfied, fill in \">80\"\n", 312 | "meta_data$donor_status<- ordered(meta_data$donor_status, levels = c(\"Healthy\",\"Temporal lobe epilepsy\",\"Alzheimer's disease\",\"Relapsing-remitting multiple sclerosis\",\"Secondary progressive multiple sclerosis\"))\n", 313 | "use_colors <- c(\n", 314 | " `Prefrontal cortex` = \"#B3128A\",\n", 315 | " `Hippocampus` = \"#74CAFF\",\n", 316 | " `Microglia` = \"#F0E68C\",\n", 317 | " `Microglia(PCDH9high)` = \"#B1E71A\",\n", 318 | " `Healthy` = \"#E68700\",\n", 319 | " `Temporal lobe epilepsy` =\"#9667BF\",\n", 320 | " `Alzheimer's disease`=\"#5D6AB3\",\n", 321 | " `Relapsing-remitting multiple sclerosis`=\"#52BEA5\",\n", 322 | " `Secondary progressive multiple sclerosis`=\"#9BCA44\")\n", 323 | "\n", 324 | "meta_data$Celltype<- ordered(meta_data$Celltype, levels = c(\"Microglia\",\"Microglia(PCDH9high)\"))\n", 325 | "\n", 326 | "use_colors <- c( `Healthy` = \"#E68700\",\n", 327 | " `Alzheimer's disease`=\"#5D6AB3\",\n", 328 | " `Temporal lobe epilepsy` =\"#9667BF\",\n", 329 | " `Relapsing-remitting multiple sclerosis`=\"#52BEA5\",\n", 330 | " `Secondary progressive multiple sclerosis`=\"#9BCA44\")\n", 331 | "p1<-ggplot(data = meta_data, aes(x = Celltype, fill = donor_status)) +\n", 332 | " geom_bar(position = \"fill\") +\n", 333 | " scale_fill_manual(values = use_colors) +\n", 334 | " coord_flip() +\n", 335 | " scale_y_reverse()\n", 336 | "\n", 337 | "use_colors3 <- c(`Prefrontal cortex` = \"#B3128A\",\n", 338 | " `Hippocampus` = \"#74CAFF\")\n", 339 | "\n", 340 | "p3<-ggplot(data = meta_data, aes(x = region, fill = donor_status)) +\n", 341 | " geom_bar(position = \"fill\") +\n", 342 | " scale_fill_manual(values = use_colors) +\n", 343 | " coord_flip() +\n", 344 | " scale_y_reverse()\n", 345 | "\n", 346 | "library(patchwork)\n", 347 | "\n", 348 | "combined_plot <- wrap_plots(p3 + theme(legend.position = \"right\"),p1 + theme(legend.position = \"right\"),ncol = 1)\n", 349 | "p4<-combined_plot + plot_layout(guides = 'collect')\n", 350 | "p4\n", 351 | "\n", 352 | "ggsave(filename=\"extended_data_fig4c.pdf\",plot=p4, width = 8, height = 4)" 353 | ] 354 | }, 355 | { 356 | "cell_type": "markdown", 357 | "id": "711513e7", 358 | "metadata": {}, 359 | "source": [ 360 | "# extended_data_fig4d\n", 361 | "# Cell proportion of microglia and microglia (PCDH9high) clusters at different ages" 362 | ] 363 | }, 364 | { 365 | "cell_type": "code", 366 | "execution_count": null, 367 | "id": "5a0576ed", 368 | "metadata": {}, 369 | "outputs": [], 370 | "source": [ 371 | "meta_data<-read.csv(\"fig4b_metadata.csv\",header=T,row.names=1)\n", 372 | "meta_data$age <- as.numeric(gsub(\"\\\\D\", \"\", meta_data$donor_age))\n", 373 | "meta_data$range <- ifelse(meta_data$age > 20 & meta_data$age <= 40, \"21-40\",\n", 374 | " ifelse(meta_data$age > 40 & meta_data$age <= 60, \"41-60\",\n", 375 | " ifelse(meta_data$age > 60 & meta_data$age <= 80, \"61-80\",\n", 376 | " ifelse(meta_data$age > 80, \">80\", NA))))\n", 377 | "\n", 378 | "\n", 379 | "use_colors <- c( `21-40` = \"#DC4D4F\",\n", 380 | " `41-60`=\"#A884C9\",\n", 381 | " `61-80`=\"#FBABA9\",\n", 382 | " `>80`= \"#468FC1\")\n", 383 | "\n", 384 | "meta_data$range<- ordered(meta_data$range, levels = c(\"21-40\",\"41-60\",\"61-80\",\">80\"))\n", 385 | "\n", 386 | "p1 <-ggplot(data = meta_data, aes(x = Celltype, fill = range)) +\n", 387 | " geom_bar(position = \"fill\") +\n", 388 | " scale_fill_manual(values = use_colors) +\n", 389 | " coord_flip() +scale_y_reverse()\n", 390 | "p1\n", 391 | "\n", 392 | "\n", 393 | "p2 <-ggplot(data = meta_data, aes(x = region, fill = range)) +\n", 394 | " geom_bar(position = \"fill\") +\n", 395 | " scale_fill_manual(values = use_colors) +\n", 396 | " coord_flip() +scale_y_reverse()\n", 397 | "p2\n", 398 | "library(cowplot)\n", 399 | "library(\"patchwork\")\n", 400 | "combined_plot <- wrap_plots(p2 + theme(legend.position = \"right\"),p1 + theme(legend.position = \"right\"),ncol = 1)\n", 401 | "p3=combined_plot + plot_layout(guides = 'collect')\n", 402 | "p3\n", 403 | "\n", 404 | "ggsave(filename=\"extended_data_fig4d.pdf\",plot=p3, width = 8, height = 4)" 405 | ] 406 | }, 407 | { 408 | "cell_type": "markdown", 409 | "id": "c3a16a24", 410 | "metadata": {}, 411 | "source": [ 412 | "# extended_data_fig4e\n", 413 | "# Gene set scoring analysis of predicted biological function" 414 | ] 415 | }, 416 | { 417 | "cell_type": "code", 418 | "execution_count": null, 419 | "id": "c3a3d6a5", 420 | "metadata": {}, 421 | "outputs": [], 422 | "source": [ 423 | "import scanpy as sc\n", 424 | "import pandas as pd\n", 425 | "import numpy as np\n", 426 | "import anndata\n", 427 | "from matplotlib import rcParams\n", 428 | "sc.set_figure_params(color_map='viridis')\n", 429 | "sc.settings.verbosity = 2\n", 430 | "%pylab inline\n", 431 | "\n", 432 | "import warnings\n", 433 | "warnings.filterwarnings(\"ignore\")\n", 434 | "\n", 435 | "#from SCCAF import *\n", 436 | "# import scvi\n", 437 | "from gssnng import score_cells\n", 438 | "from glob import iglob\n", 439 | "from tqdm import tqdm\n", 440 | "fig4b=sc.read(\"Fig4b.h5\")\n", 441 | "#All gmt files are download from MSigDB\n", 442 | "#MICROGLIAL_CELL_ACTIVATION\n", 443 | "score_cells.with_gene_sets(adata=fig4b, \n", 444 | " gene_set_file='GOBP_REGULATION_OF_MICROGLIAL_CELL_ACTIVATION.v2023.2.Hs.gmt',\n", 445 | " groupby='Celltype', \n", 446 | " smooth_mode='connectivity', \n", 447 | " recompute_neighbors=32, \n", 448 | " score_method='singscore', \n", 449 | " method_params={'normalization':'theoretical'},\n", 450 | " ranked=True, \n", 451 | " cores=48) \n", 452 | "\n", 453 | "#IMMUNE_RESPONSE\n", 454 | "score_cells.with_gene_sets(adata=fig4b, \n", 455 | " gene_set_file='GOBP_MICROGLIAL_CELL_ACTIVATION_INVOLVED_IN_IMMUNE_RESPONSE.v2023.2.Hs.gmt',\n", 456 | " groupby='Celltype', \n", 457 | " smooth_mode='connectivity', \n", 458 | " recompute_neighbors=32, \n", 459 | " score_method='singscore', \n", 460 | " method_params={'normalization':'theoretical'}, \n", 461 | " ranked=True, \n", 462 | " cores=48) \n", 463 | "#LYSOSOME\n", 464 | "score_cells.with_gene_sets(adata=fig4b, \n", 465 | " gene_set_file='LYSOSOME.v2023.2.Hs.gmt',\n", 466 | " groupby='Celltype', \n", 467 | " smooth_mode='connectivity', \n", 468 | " recompute_neighbors=32, \n", 469 | " score_method='singscore', \n", 470 | " method_params={'normalization':'theoretical'}, \n", 471 | " ranked=True, \n", 472 | " cores=48) \n", 473 | "#PHAGOCYTOSIS\n", 474 | "score_cells.with_gene_sets(adata=fig4b, \n", 475 | " gene_set_file='GOBP_PHAGOCYTOSIS.v2023.2.Hs.gmt',\n", 476 | " groupby='Celltype', \n", 477 | " smooth_mode='connectivity', \n", 478 | " recompute_neighbors=32, \n", 479 | " score_method='singscore', \n", 480 | " method_params={'normalization':'theoretical'}, \n", 481 | " ranked=True, \n", 482 | " cores=48) \n", 483 | "\n", 484 | "#GLYCOLYSIS_GLUCONEOGENESIS\n", 485 | "score_cells.with_gene_sets(adata=fig4b, \n", 486 | " gene_set_file='KEGG_GLYCOLYSIS_GLUCONEOGENESIS.v2023.2.Hs.gmt',\n", 487 | " groupby='Celltype', \n", 488 | " smooth_mode='connectivity', \n", 489 | " recompute_neighbors=32, \n", 490 | " score_method='singscore', \n", 491 | " method_params={'normalization':'theoretical'}, \n", 492 | " ranked=True, \n", 493 | " cores=48) \n", 494 | "#NEUROINFLAMMATORY_RESPONSE\n", 495 | "score_cells.with_gene_sets(adata=fig4b, \n", 496 | " gene_set_file='GOBP_NEUROINFLAMMATORY_RESPONSE.v2023.2.Hs.gmt',\n", 497 | " groupby='Celltype', \n", 498 | " smooth_mode='connectivity', \n", 499 | " recompute_neighbors=32, \n", 500 | " score_method='singscore', \n", 501 | " method_params={'normalization':'theoretical'}, \n", 502 | " ranked=True, \n", 503 | " cores=48) \n", 504 | "#INFLAMMATORY_RESPONSE\n", 505 | "score_cells.with_gene_sets(adata=fig4b, \n", 506 | " gene_set_file='GOBP_INFLAMMATORY_RESPONSE.v2023.2.Hs.gmt',\n", 507 | " groupby='Celltype', \n", 508 | " smooth_mode='connectivity', \n", 509 | " recompute_neighbors=32, \n", 510 | " score_method='singscore', \n", 511 | " method_params={'normalization':'theoretical'}, \n", 512 | " ranked=True, \n", 513 | " cores=48) \n", 514 | "#CYTOKINE_PRODUCTION\n", 515 | "score_cells.with_gene_sets(adata=fig4b, \n", 516 | " gene_set_file='GOBP_CYTOKINE_PRODUCTION_INVOLVED_IN_INFLAMMATORY_RESPONSE.v2023.2.Hs.gmt',\n", 517 | " groupby='Celltype', \n", 518 | " smooth_mode='connectivity', \n", 519 | " recompute_neighbors=32, \n", 520 | " score_method='singscore', \n", 521 | " method_params={'normalization':'theoretical'}, \n", 522 | " ranked=True, \n", 523 | " cores=48) \n", 524 | "#NFKB_PATHWAY\n", 525 | "score_cells.with_gene_sets(adata=fig4b, \n", 526 | " gene_set_file='BIOCARTA_NFKB_PATHWAY.v2023.2.Hs.gmt',\n", 527 | " groupby='Celltype', \n", 528 | " smooth_mode='connectivity', \n", 529 | " recompute_neighbors=32, \n", 530 | " score_method='singscore', \n", 531 | " method_params={'normalization':'theoretical'}, \n", 532 | " ranked=True, \n", 533 | " cores=48) \n", 534 | "#INTERFERON_ALPHA_PRODUCTION\n", 535 | "score_cells.with_gene_sets(adata=fig4b, \n", 536 | " gene_set_file='GOBP_INTERFERON_ALPHA_PRODUCTION.v2023.2.Hs.gmt',\n", 537 | " groupby='Celltype', \n", 538 | " smooth_mode='connectivity', \n", 539 | " recompute_neighbors=32, \n", 540 | " score_method='singscore', \n", 541 | " method_params={'normalization':'theoretical'}, \n", 542 | " ranked=True, \n", 543 | " cores=48) \n", 544 | "#INTERFERON_BETA_PRODUCTION\n", 545 | "score_cells.with_gene_sets(adata=fig4b, \n", 546 | " gene_set_file='GOBP_INTERFERON_BETA_PRODUCTION.v2023.2.Hs.gmt',\n", 547 | " groupby='Celltype', \n", 548 | " smooth_mode='connectivity', \n", 549 | " recompute_neighbors=32, \n", 550 | " score_method='singscore', \n", 551 | " method_params={'normalization':'theoretical'}, \n", 552 | " ranked=True, \n", 553 | " cores=48) \n", 554 | "#CELLULAR_RESPONSE_TO_INTERLEUKIN_1\n", 555 | "score_cells.with_gene_sets(adata=fig4b, \n", 556 | " gene_set_file='GOBP_CELLULAR_RESPONSE_TO_INTERLEUKIN_1.v2023.2.Hs.gmt',\n", 557 | " groupby='Celltype', \n", 558 | " smooth_mode='connectivity', \n", 559 | " recompute_neighbors=32, \n", 560 | " score_method='singscore', \n", 561 | " method_params={'normalization':'theoretical'}, \n", 562 | " ranked=True, \n", 563 | " cores=48) \n", 564 | "#INFLAMMASOME_MEDIATED_SIGNALING_PATHWAY\n", 565 | "score_cells.with_gene_sets(adata=fig4b, \n", 566 | " gene_set_file='GOBP_INFLAMMASOME_MEDIATED_SIGNALING_PATHWAY.v2023.2.Hs.gmt',\n", 567 | " groupby='Celltype', \n", 568 | " smooth_mode='connectivity', \n", 569 | " recompute_neighbors=32, \n", 570 | " score_method='singscore', \n", 571 | " method_params={'normalization':'theoretical'}, \n", 572 | " ranked=True, \n", 573 | " cores=48) \n", 574 | "\n", 575 | "bp=['GOBP_REGULATION_OF_MICROGLIAL_CELL_ACTIVATION', 'GOBP_MICROGLIAL_CELL_ACTIVATION_INVOLVED_IN_IMMUNE_RESPONSE', 'LYSOSOME', 'GOBP_PHAGOCYTOSIS', 'KEGG_GLYCOLYSIS_GLUCONEOGENESIS', 'GOBP_NEUROINFLAMMATORY_RESPONSE', 'GOBP_INFLAMMATORY_RESPONSE', 'GOBP_CYTOKINE_PRODUCTION_INVOLVED_IN_INFLAMMATORY_RESPONSE', 'BIOCARTA_NFKB_PATHWAY', 'GOBP_INTERFERON_ALPHA_PRODUCTION', 'GOBP_INTERFERON_BETA_PRODUCTION', 'GOBP_CELLULAR_RESPONSE_TO_INTERLEUKIN_1', 'GOBP_INFLAMMASOME_MEDIATED_SIGNALING_PATHWAY']\n", 576 | "sc.pl.matrixplot(fig4b,bp, cmap='RdBu_r',groupby='Celltype',save=\"extended_data_fig4e.pdf\")" 577 | ] 578 | }, 579 | { 580 | "cell_type": "markdown", 581 | "id": "85d9cf84", 582 | "metadata": {}, 583 | "source": [ 584 | "# extended_data_fig4f" 585 | ] 586 | }, 587 | { 588 | "cell_type": "code", 589 | "execution_count": null, 590 | "id": "3f312936-595e-481d-816e-7206b1fcde44", 591 | "metadata": {}, 592 | "outputs": [], 593 | "source": [ 594 | "import scanpy as sc\n", 595 | "import pandas as pd\n", 596 | "import numpy as np\n", 597 | "import anndata\n", 598 | "from matplotlib import rcParams" 599 | ] 600 | }, 601 | { 602 | "cell_type": "code", 603 | "execution_count": null, 604 | "id": "39a073b6-1a61-46bd-9bd9-1f2cbcc95451", 605 | "metadata": {}, 606 | "outputs": [], 607 | "source": [ 608 | "%pylab inline\n", 609 | "import warnings\n", 610 | "warnings.filterwarnings(\"ignore\")\n", 611 | "from glob import iglob\n", 612 | "from tqdm import tqdm\n", 613 | "sc.set_figure_params(color_map='viridis')\n", 614 | "sc.settings.verbosity = 2" 615 | ] 616 | }, 617 | { 618 | "cell_type": "code", 619 | "execution_count": null, 620 | "id": "91100094-6a7b-4ebd-a502-2eca7dcf3c83", 621 | "metadata": {}, 622 | "outputs": [], 623 | "source": [ 624 | "%matplotlib inline" 625 | ] 626 | }, 627 | { 628 | "cell_type": "code", 629 | "execution_count": null, 630 | "id": "65427bd1", 631 | "metadata": {}, 632 | "outputs": [], 633 | "source": [ 634 | "fig4b=sc.read(\"Fig4b.h5\")\n", 635 | "top0=[\"ATM\", \"SYT11\",\"LRP2\", \"LIPA\", \"RAB7A\", \"ABCA2\",\"USP4\",\"SRGN\",\"RAB31\",\"GSN\",\"RAC1\",\"CDC42\",\"ELMO1\",\"TLR2\",\"ABL1\",\"PTK2\",\"CCL3\",\"PLCG2\",\"TNFRSF1B\",\"APP\",\"FOXP1\",\"IL1RAP\",\"GPRC5B\", \"SERPINE1\",\"JAM3\",\"IRAK2\",\"REL\",\"PXK\",\"LIPA\",\"ZEB2\",\"ST18\",\"IRAK2\",\"IRAK3\",\"PLCB1\",\"VRK2\"]\n", 636 | "sc.pl.heatmap(fig4b, var_names=top0\n", 637 | " ,groupby='Celltype',vmin=-2, vmax=2,layer='scaled', cmap='RdBu_r',\n", 638 | " show_gene_labels=True,save=\"extended_data_fig4f.pdf\")" 639 | ] 640 | }, 641 | { 642 | "cell_type": "markdown", 643 | "id": "c2ed8314", 644 | "metadata": {}, 645 | "source": [ 646 | "# extended_data_fig4g" 647 | ] 648 | }, 649 | { 650 | "cell_type": "code", 651 | "execution_count": null, 652 | "id": "3fde99bf-15db-47bb-b204-a27e7d137c61", 653 | "metadata": {}, 654 | "outputs": [], 655 | "source": [ 656 | "from adpbulk import ADPBulk\n", 657 | "\n", 658 | "fig4b=sc.read(\"Fig4b.h5\")\n", 659 | "\n", 660 | "# initialize the object\n", 661 | "adpb = ADPBulk(fig4b, [\"Celltype\", \"region\"])\n", 662 | "\n", 663 | "# perform the pseudobulking\n", 664 | "pseudobulk_matrix = adpb.fit_transform()\n", 665 | "\n", 666 | "# retrieve the sample meta data (useful for easy incorporation with edgeR)\n", 667 | "sample_meta = adpb.get_meta()\n", 668 | "\n", 669 | "print(sample_meta)\n", 670 | "print(pseudobulk_matrix)\n", 671 | "import pandas as pd\n", 672 | "\n", 673 | "transposed_matrix = pseudobulk_matrix.transpose()\n", 674 | "print(transposed_matrix)\n", 675 | "#generate pseudobulk matrix\n", 676 | "transposed_matrix.to_csv('mg_cell_region_transposed_pseudobulk_matrix.csv', index=True) " 677 | ] 678 | }, 679 | { 680 | "cell_type": "code", 681 | "execution_count": null, 682 | "id": "c8c2978e", 683 | "metadata": {}, 684 | "outputs": [], 685 | "source": [ 686 | "# Keren-Shau defined DAM genes(10.1016/j.cell.2017.05.018)\n", 687 | "library(pheatmap)\n", 688 | "library(dplyr)\n", 689 | "library(RColorBrewer)\n", 690 | "rm(list=ls())\n", 691 | "gc()\n", 692 | "pseudobulk_matrix <- read.table(\"dam-SUP-CHOOSE.xls\", header = TRUE, sep=\"\\t\",row.names=1)\n", 693 | "\n", 694 | "group_list <- factor(c(rep(\"Microglia\", 6), rep(\"Microglia(PCDH9high)\", 6)))\n", 695 | "\n", 696 | "dat=log10(edgeR::cpm(pseudobulk_matrix)+1)\n", 697 | "table(group_list)\n", 698 | "n=t(scale(t(dat))) \n", 699 | "n <- na.omit(n) \n", 700 | "\n", 701 | "n[n>2]=2\n", 702 | "n[n< -2]= -2\n", 703 | "ac=data.frame(Celltype=group_list)\n", 704 | "rownames(ac)=colnames(n) \n", 705 | "ac$Region<-c(\"Prefrontal cortex\",\"Hippocampus\",\"Hippocampus\",\"Prefrontal cortex\",\"Prefrontal cortex\",\"Prefrontal cortex\",\"Prefrontal cortex\",\"Hippocampus\",\"Hippocampus\",\"Prefrontal cortex\",\"Prefrontal cortex\",\"Prefrontal cortex\")\n", 706 | "ac$Donor_status<-c(\"Healthy\",\"Healthy\",\"TLE\",\"AD\",\"RRMS\",\"SPMS\",\"Healthy\",\"Healthy\",\"TLE\",\"AD\",\"RRMS\",\"SPMS\")\n", 707 | "library(dplyr)\n", 708 | "\n", 709 | "ann_colors = list(Celltype = c(Microglia = \"#F0E68B\", `Microglia(PCDH9high)`= \"#B2E61A\"),\n", 710 | " Region = c(Hippocampus = \"#74CAFF\", `Prefrontal cortex` = \"#B3138A\"),\n", 711 | " Donor_status = c(Healthy = \"#E68700\", TLE=\"#9667BF\",AD = \"#5D6AB3\", RRMS = \"#52BEA5\", SPMS = \"#9BCA44\"))\n", 712 | "\n", 713 | "\n", 714 | "p1=pheatmap(n, \n", 715 | " scale = \"none\",\n", 716 | " color =colorRampPalette(c(\"#3d4c9e\",\"grey\", \"#eee814\"))(100), show_rownames = T,show_colnames = F,cellwidth = 10, cellheight = 10,\n", 717 | " cluster_row = T, cluster_col = FALSE, annotation_col=ac, annotation_colors = ann_colors)\n", 718 | "\n", 719 | "\n", 720 | "p1\n", 721 | "\n", 722 | "n_transposed <- t(n)\n", 723 | "p2 <- pheatmap(n_transposed, \n", 724 | " scale = \"none\",\n", 725 | " color = colorRampPalette(c(\"#3d4c9e\", \"grey\", \"#eee814\"))(100), \n", 726 | " show_rownames = FALSE,\n", 727 | " show_colnames = TRUE,\n", 728 | " cellwidth = 15,\n", 729 | " cellheight = 15,\n", 730 | " cluster_row = FALSE,\n", 731 | " cluster_col = TRUE,\n", 732 | " annotation_row = ac,\n", 733 | " annotation_colors = ann_colors)\n", 734 | "p2\n", 735 | "\n", 736 | "ggsave(filename=\"extended_data_fig4g.pdf\",plot=p2, width = 18, height = 7)" 737 | ] 738 | } 739 | ], 740 | "metadata": { 741 | "kernelspec": { 742 | "display_name": "R [conda env:sc]", 743 | "language": "R", 744 | "name": "conda-env-sc-r" 745 | }, 746 | "language_info": { 747 | "codemirror_mode": "r", 748 | "file_extension": ".r", 749 | "mimetype": "text/x-r-source", 750 | "name": "R", 751 | "pygments_lexer": "r", 752 | "version": "4.0.2" 753 | } 754 | }, 755 | "nbformat": 4, 756 | "nbformat_minor": 5 757 | } 758 | -------------------------------------------------------------------------------- /notebooks/Extended Data Figures/ExtFig. 5_6.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "649362fa-bfd4-4fd2-a144-727f211dd3f2", 6 | "metadata": {}, 7 | "source": [ 8 | "# extended_data_fig5a" 9 | ] 10 | }, 11 | { 12 | "cell_type": "code", 13 | "execution_count": null, 14 | "id": "3a26bad4-6851-4a08-b681-af0898674cc2", 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "import scanpy as sc\n", 19 | "import pandas as pd\n", 20 | "import numpy as np\n", 21 | "import anndata\n", 22 | "from matplotlib import rcParams\n", 23 | "sc.set_figure_params(color_map='viridis')\n", 24 | "sc.settings.verbosity = 2" 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": null, 30 | "id": "94ed6cdc-31c4-4be2-9f2c-40ffd3683dc3", 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "%pylab inline\n", 35 | "import warnings\n", 36 | "warnings.filterwarnings(\"ignore\")\n", 37 | "from gssnng import score_cells\n", 38 | "from glob import iglob\n", 39 | "from tqdm import tqdm" 40 | ] 41 | }, 42 | { 43 | "cell_type": "code", 44 | "execution_count": null, 45 | "id": "f6c22960-b7da-4bc1-a81e-a5ff8dbc557e", 46 | "metadata": {}, 47 | "outputs": [], 48 | "source": [ 49 | "fig4b=sc.read(\"Fig4b.h5\")" 50 | ] 51 | }, 52 | { 53 | "cell_type": "code", 54 | "execution_count": null, 55 | "id": "ad5b09b5-1f29-4f5b-b2ed-b4ed09bc560e", 56 | "metadata": {}, 57 | "outputs": [], 58 | "source": [ 59 | "figsize(4,4)\n", 60 | "sc.pl.umap(fig4b, color = [\"SPP1\",\"MOG\",\"MBP\",\"MAG\"], frameon = False,ncols=2,vmax=3,save=\"extended_data_fig5a.pdf\")" 61 | ] 62 | }, 63 | { 64 | "cell_type": "markdown", 65 | "id": "12c74ceb", 66 | "metadata": {}, 67 | "source": [ 68 | "# extended_data_fig6a" 69 | ] 70 | }, 71 | { 72 | "cell_type": "code", 73 | "execution_count": null, 74 | "id": "80613757-b4ba-46dc-a515-612d110be3a9", 75 | "metadata": {}, 76 | "outputs": [], 77 | "source": [ 78 | "fig5a=sc.read(\"Fig5a.h5\")" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": null, 84 | "id": "73faf7dc-c759-48e5-8525-7d4d41ada4b0", 85 | "metadata": {}, 86 | "outputs": [], 87 | "source": [ 88 | "#neurotransmitter_receptor_relate.gmt file consists of neurotransmitter receptor genes\n", 89 | "score_cells.with_gene_sets(adata=fig5a, # AnnData object\n", 90 | " gene_set_file='neurotransmitter_receptor_relate.gmt', # File path of gene sets\n", 91 | " groupby='region', # Will sample neighbors within this group\n", 92 | " smooth_mode='connectivity', # Smooths matrix using distance weights from NN graph.\n", 93 | " recompute_neighbors=32, # Rebuild nearest neighbor graph with groups, 0 turns off function\n", 94 | " score_method='singscore', # Method of scoring\n", 95 | " method_params={'normalization':'theoretical'}, # Special parameters for some methods \n", 96 | " ranked=True, # Use ranked data, True or False\n", 97 | " cores=36)\n", 98 | "sc.pl.matrixplot(fig5a,['Glutamate', 'Glycine', 'Acetylcholine', 'Epinephrine and Norepinephrine', '5-HT', 'GABA'],\n", 99 | " groupby='region',cmap='RdBu_r',save='extended_data_fig6a.pdf')" 100 | ] 101 | }, 102 | { 103 | "cell_type": "markdown", 104 | "id": "10fba498", 105 | "metadata": {}, 106 | "source": [ 107 | "# extended_data_fig6b" 108 | ] 109 | }, 110 | { 111 | "cell_type": "code", 112 | "execution_count": null, 113 | "id": "611bc16e-4e7e-4a22-9323-a6c0faa65a41", 114 | "metadata": {}, 115 | "outputs": [], 116 | "source": [ 117 | "from adpbulk import ADPBulk\n", 118 | "fig5a=sc.read(\"Fig5a.h5\")\n", 119 | "# initialize the object\n", 120 | "adpb = ADPBulk(fig5a, [\"donor_status\", \"region\"])\n", 121 | "\n", 122 | "# perform the pseudobulking\n", 123 | "pseudobulk_matrix = adpb.fit_transform()\n", 124 | "\n", 125 | "# retrieve the sample meta data (useful for easy incorporation with edgeR)\n", 126 | "sample_meta = adpb.get_meta()\n", 127 | "\n", 128 | "print(sample_meta)\n", 129 | "print(pseudobulk_matrix)\n", 130 | "import pandas as pd\n", 131 | "\n", 132 | "transposed_matrix = pseudobulk_matrix.transpose()\n", 133 | "print(transposed_matrix)\n", 134 | "#generate pseudobulk matrix\n", 135 | "transposed_matrix.to_csv('neurotransmitter_pseudobulk.csv', index=True) " 136 | ] 137 | }, 138 | { 139 | "cell_type": "code", 140 | "execution_count": null, 141 | "id": "dcc36493-cd24-4883-9332-c21148b27789", 142 | "metadata": {}, 143 | "outputs": [], 144 | "source": [ 145 | "library(pheatmap)\n", 146 | "library(dplyr)\n", 147 | "library(RColorBrewer)\n", 148 | "rm(list=ls())\n", 149 | "gc()\n", 150 | "#########Left\n", 151 | "pseudobulk_matrix <- read.csv(\"neurotransmitter_pseudobulk.csv\", header = TRUE, sep=\",\",row.names=1)\n", 152 | "colnames(pseudobulk_matrix)<-c(\"AD_Prefrontal cortex\",\"Healthy_Hippocampus\",\"Healthy_Prefrontal cortex\",\"RRMS_Prefrontal cortex\",\"SPMS_Prefrontal cortex\",\"TLE_Hippocampus\")\n", 153 | "desired_order <- c(\"Healthy_Hippocampus\", \"TLE_Hippocampus\", \"Healthy_Prefrontal cortex\", \"AD_Prefrontal cortex\", \"RRMS_Prefrontal cortex\", \"SPMS_Prefrontal cortex\")\n", 154 | "pseudobulk_matrix <- pseudobulk_matrix[, desired_order]\n", 155 | "\n", 156 | "group_list <- factor(c(\"Hippocampus\",\"Hippocampus\",\"Prefrontal cortex\",\"Prefrontal cortex\",\"Prefrontal cortex\",\"Prefrontal cortex\"))\n", 157 | "neu<-read.table(\"neurotransmitter.txt\",header=T,sep=\"\\t\",row.names=1)\n", 158 | "matching_genes <- intersect(rownames(pseudobulk_matrix), rownames(neu))\n", 159 | "\n", 160 | "input_data <- pseudobulk_matrix[rownames(neu), ]\n", 161 | "\n", 162 | "dat=log10(edgeR::cpm(input_data)+1)\n", 163 | "table(group_list)\n", 164 | "n=t(scale(t(dat))) \n", 165 | "n <- na.omit(n) \n", 166 | "\n", 167 | "n[n>2]=2\n", 168 | "n[n< -2]= -2\n", 169 | "\n", 170 | "ac=data.frame(Region=group_list)\n", 171 | "rownames(ac)=colnames(n) \n", 172 | "ac$Donor_status<-c(\"Healthy\",\"TLE\",\"Healthy\",\"AD\",\"RRMS\",\"SPMS\")\n", 173 | "library(dplyr)\n", 174 | "\n", 175 | "neu_row=\n", 176 | "ann_colors = list(\n", 177 | " Region = c(Hippocampus = \"#74CAFF\", `Prefrontal cortex` = \"#B3138A\"),\n", 178 | " Donor_status = c(Healthy = \"#E68700\", TLE=\"#9667BF\", AD = \"#5D6AB3\", RRMS = \"#52BEA5\", SPMS = \"#9BCA44\"),\n", 179 | " Receptor_type = c(\n", 180 | " Glutamate = \"#B89582\", Glycine = \"#EECBC8\", Acetylcholine = \"#D68985\",\n", 181 | " `Epinephrine and Norepinephrine` = \"#DEA05B\", `5-HT` = \"#363752\", GABA = \"#74717E\"\n", 182 | " )\n", 183 | ")\n", 184 | "\n", 185 | "p1=pheatmap(n, \n", 186 | " scale = \"none\",\n", 187 | " color =colorRampPalette(c(\"#3d4c9e\",\"grey\", \"#eee814\"))(100), show_rownames = T,show_colnames = F,cellwidth = 10, cellheight = 10,\n", 188 | " cluster_row = F, cluster_col = FALSE, annotation_col=ac, annotation_row=neu,annotation_colors = ann_colors)\n", 189 | "\n", 190 | "\n", 191 | "p1\n", 192 | "\n", 193 | "\n", 194 | "library(ggplot2)\n", 195 | "ggsave(filename=\"extended_data_fig6b_left.pdf\",plot=p1, width = 6, height = 18)\n", 196 | "\n", 197 | "\n", 198 | "\n", 199 | "##########Right\n", 200 | "library(pheatmap)\n", 201 | "library(dplyr)\n", 202 | "library(RColorBrewer)\n", 203 | "\n", 204 | "pseudobulk_matrix <- read.table(\"neurotransmitter_pseudobulk.csv\", header = TRUE, sep=\",\")\n", 205 | "\n", 206 | "\n", 207 | "pha<-read.table(\"pfc_gene_anno.txt\",header=T,sep=\"\\t\",row.names=1)\n", 208 | "group_list <- factor(c(\"Hippocampus\",\"Hippocampus\",\"Prefrontal cortex\",\"Prefrontal cortex\",\"Prefrontal cortex\",\"Prefrontal cortex\"))\n", 209 | "\n", 210 | "matching_genes <- intersect(rownames(pseudobulk_matrix), rownames(pha))\n", 211 | "\n", 212 | "pha_df <- pseudobulk_matrix[matching_genes, ]\n", 213 | "pha_df <- pha_df[rownames(pha), ]\n", 214 | "dat=log10(edgeR::cpm(pha_df)+1)\n", 215 | "table(group_list)\n", 216 | "n=t(scale(t(dat))) \n", 217 | "n <- na.omit(n) \n", 218 | "\n", 219 | "n[n>2]=2\n", 220 | "n[n< -2]= -2\n", 221 | "\n", 222 | "#pheatmap(n,show_colnames =F,show_rownames = F)\n", 223 | "ac=data.frame(Region=group_list)\n", 224 | "rownames(ac)=colnames(n) \n", 225 | "ac$Donor_status<-c(\"Healthy\",\"TLE\",\"Healthy\",\"AD\",\"RRMS\",\"SPMS\")\n", 226 | "library(dplyr)\n", 227 | "\n", 228 | "neu_row=\n", 229 | "ann_colors = list(\n", 230 | " Region = c(Hippocampus = \"#74CAFF\", `Prefrontal cortex` = \"#B3138A\"),\n", 231 | " Donor_status = c(Healthy = \"#E68700\", TLE=\"#9667BF\", AD = \"#5D6AB3\", RRMS = \"#52BEA5\", SPMS = \"#9BCA44\"),\n", 232 | " Type = c(\n", 233 | " phagocytosis = \"#7470B3\", Chemokine= \"#FE9389\", Cytokine = \"#FF80DE\"\n", 234 | " )\n", 235 | ")\n", 236 | "\n", 237 | "p2=pheatmap(n, \n", 238 | " scale = \"none\",\n", 239 | " color =colorRampPalette(c(\"#3d4c9e\",\"grey\", \"#eee814\"))(100), show_rownames = T,show_colnames = F,cellwidth = 10, cellheight = 10,\n", 240 | " cluster_row = F, cluster_col = FALSE, annotation_col=ac, annotation_row=pha,annotation_colors = ann_colors)\n", 241 | "\n", 242 | "\n", 243 | "p2\n", 244 | "ggsave(filename=\"extended_data_fig6b_right.pdf\",plot=p2, width = 6, height = 18)\n", 245 | "p1+p2\n" 246 | ] 247 | }, 248 | { 249 | "cell_type": "markdown", 250 | "id": "7c238790", 251 | "metadata": {}, 252 | "source": [ 253 | "# extended_data_fig6c" 254 | ] 255 | }, 256 | { 257 | "cell_type": "code", 258 | "execution_count": null, 259 | "id": "8d93d4fc-ece6-458e-9719-8b04dc385f7a", 260 | "metadata": {}, 261 | "outputs": [], 262 | "source": [ 263 | "from adpbulk import ADPBulk\n", 264 | "fig5a=sc.read(\"Fig5a.h5\")\n", 265 | "# initialize the object\n", 266 | "adpb = ADPBulk(fig5a, [\"region\", \"donor_ID\"])\n", 267 | "\n", 268 | "# perform the pseudobulking\n", 269 | "pseudobulk_matrix = adpb.fit_transform()\n", 270 | "\n", 271 | "# retrieve the sample meta data (useful for easy incorporation with edgeR)\n", 272 | "sample_meta = adpb.get_meta()\n", 273 | "\n", 274 | "print(sample_meta)\n", 275 | "print(pseudobulk_matrix)\n", 276 | "import pandas as pd\n", 277 | "\n", 278 | "transposed_matrix = pseudobulk_matrix.transpose()\n", 279 | "print(transposed_matrix)\n", 280 | "#generate pseudobulk matrix\n", 281 | "transposed_matrix.to_csv('fig5_region_donor_ID_pseudobulk.csv', index=True) " 282 | ] 283 | }, 284 | { 285 | "cell_type": "markdown", 286 | "id": "4bada7e1", 287 | "metadata": {}, 288 | "source": [ 289 | "# Pearson correlation analysis between TNF (left) and IL1A (right) with glutamatergic receptors" 290 | ] 291 | }, 292 | { 293 | "cell_type": "markdown", 294 | "id": "3bb4ae8d", 295 | "metadata": {}, 296 | "source": [ 297 | "## TNF" 298 | ] 299 | }, 300 | { 301 | "cell_type": "code", 302 | "execution_count": null, 303 | "id": "d1de5215", 304 | "metadata": { 305 | "tags": [] 306 | }, 307 | "outputs": [], 308 | "source": [ 309 | "library(tidyverse)\n", 310 | "library(ggplot2)\n", 311 | "library(ggpubr)\n", 312 | "library(cowplot)\n", 313 | "library(ggExtra)\n", 314 | "library(ggplot2)\n", 315 | "library(cols4all)\n", 316 | "pseudobulk_matrix <- read.table(\"fig5_region_donor_ID_pseudobulk.csv\", header = TRUE, sep=\",\",row.names=1\n", 317 | "dat=log10(edgeR::cpm(pseudobulk_matrix)+1)\n", 318 | "# transpose\n", 319 | "t_exp <- t(dat)\n", 320 | "# convert to data.frame\n", 321 | "t_exp <- as.data.frame(t_exp)\n", 322 | "# choose target gene\n", 323 | "target_gene <- 'TNF'\n", 324 | "\n", 325 | "# Calculate the correlation coefficient and p value between each gene and the target gene\n", 326 | "cor_list <- list()\n", 327 | "\n", 328 | "for (i in colnames(t_exp)) {\n", 329 | " # Extract the expression value of the target gene\n", 330 | " tar <- t_exp[,target_gene]\n", 331 | " # Pearson correlation test\n", 332 | " cor_res <- cor(x = tar,y = t_exp[,i],method = 'pearson')\n", 333 | " # pvalue\n", 334 | " cor_pval <- cor.test(x = tar,y = t_exp[,i])$p.value\n", 335 | " # merge results\n", 336 | " final_res <- data.frame(tar_genename = target_gene,\n", 337 | " gene_name = i,\n", 338 | " cor_results = cor_res,\n", 339 | " cor_pvalue = cor_pval)\n", 340 | " # save\n", 341 | " cor_list[[i]] <- final_res\n", 342 | "}\n", 343 | "\n", 344 | "# merge results\n", 345 | "gene_corres <- do.call('rbind',cor_list)\n", 346 | "\n", 347 | "head(gene_corres,4)\n", 348 | "write.csv(gene_corres,file=\"TNF_allgene_cor.csv\")\n", 349 | "### Get a subset matrix of correlation coefficients between TNF and glutamate receptors\n", 350 | "\n", 351 | "# Specify gene list\n", 352 | "gene_list <- c(\n", 353 | " \"GRIA1\", \"GRIA2\", \"GRIA3\", \"GRIA4\", \"GRID1\", \"GRID2\", \n", 354 | " \"GRIK1\", \"GRIK2\", \"GRIK3\", \"GRIK4\", \"GRIK5\", \"GRIN1\", \n", 355 | " \"GRIN2A\", \"GRIN2B\", \"GRIN2C\", \"GRIN2D\", \"GRIN3A\", \"GRIN3B\",\n", 356 | " \"GRINA\", \"GRM1\", \"GRM2\", \"GRM3\", \"GRM4\", \"GRM5\", \"GRM6\",\n", 357 | " \"GRM7\", \"GRM8\"\n", 358 | ")\n", 359 | "\n", 360 | "# Select a row name in the gene list to create a subset\n", 361 | "nr_gene_corres <- gene_corres[gene_corres$gene %in% gene_list, ]\n", 362 | "\n", 363 | "nr_gene_corres$change <- ifelse(nr_gene_corres$cor_results > 0, \"up\", \"down\")\n", 364 | "\n", 365 | "\n", 366 | "nr_gene_corres$'-log10pvalue' <- ifelse(\n", 367 | " nr_gene_corres$change == 'up', -log10(nr_gene_corres$cor_pvalue), -(-log10(nr_gene_corres$cor_pvalue))\n", 368 | " )\n", 369 | "head(nr_gene_corres)\n", 370 | "\n", 371 | "gene_order <- match(rownames(nr_gene_corres), gene_list)\n", 372 | "\n", 373 | "nr_gene_corres <- nr_gene_corres[gene_order, ]\n", 374 | "\n", 375 | "write.csv(nr_gene_corres,file=\"TNF_nrgene_corres.csv\")\n", 376 | "p4 <- ggplot(nr_gene_corres, aes(x = `-log10pvalue`,y = gene_name)) +\n", 377 | " geom_col(aes(fill = `-log10pvalue`), width = 0.1) +\n", 378 | " geom_point(aes(size = cor_results,\n", 379 | " color = `-log10pvalue`)) +\n", 380 | " scale_size_continuous(range = c(2, 7)) +\n", 381 | " scale_color_continuous_c4a_div('sunset', mid = 0, reverse = T) +\n", 382 | " scale_fill_continuous_c4a_div('sunset', mid = 0, reverse = T) +\n", 383 | " theme_classic()\n", 384 | "p4\n", 385 | "\n", 386 | "ggsave(filename=\"extended_data_fig6c_left.pdf\",plot=p4, width = 5, height = 10)" 387 | ] 388 | }, 389 | { 390 | "cell_type": "markdown", 391 | "id": "f9aa9ed1", 392 | "metadata": {}, 393 | "source": [ 394 | "## IL1A" 395 | ] 396 | }, 397 | { 398 | "cell_type": "code", 399 | "execution_count": null, 400 | "id": "bf5a1c6b", 401 | "metadata": {}, 402 | "outputs": [], 403 | "source": [ 404 | "library(tidyverse)\n", 405 | "library(ggplot2)\n", 406 | "library(ggpubr)\n", 407 | "library(cowplot)\n", 408 | "library(ggExtra)\n", 409 | "library(ggplot2)\n", 410 | "library(cols4all)\n", 411 | "\n", 412 | "pseudobulk_matrix <- read.csv(\"fig5_region_donor_ID_pseudobulk.csv\", header = TRUE, sep=\",\",row.names=1)\n", 413 | "\n", 414 | "dat=log10(edgeR::cpm(pseudobulk_matrix)+1)\n", 415 | "\n", 416 | "\n", 417 | "t_exp <- t(dat)\n", 418 | "\n", 419 | "t_exp <- as.data.frame(t_exp)\n", 420 | "\n", 421 | "target_gene <- 'IL1A'\n", 422 | "\n", 423 | "cor_list <- list()\n", 424 | "for (i in colnames(t_exp)) {\n", 425 | "\n", 426 | " tar <- t_exp[,target_gene]\n", 427 | "\n", 428 | " cor_res <- cor(x = tar,y = t_exp[,i],method = 'pearson')\n", 429 | "\n", 430 | " cor_pval <- cor.test(x = tar,y = t_exp[,i])$p.value\n", 431 | "\n", 432 | " final_res <- data.frame(tar_genename = target_gene,\n", 433 | " gene_name = i,\n", 434 | " cor_results = cor_res,\n", 435 | " cor_pvalue = cor_pval)\n", 436 | "\n", 437 | " cor_list[[i]] <- final_res\n", 438 | "}\n", 439 | "\n", 440 | "\n", 441 | "gene_corres <- do.call('rbind',cor_list)\n", 442 | "\n", 443 | "head(gene_corres,4)\n", 444 | "write.csv(gene_corres,file=\"IL1A_allgene_corres.csv\")\n", 445 | "\n", 446 | "\n", 447 | "# specify gene list\n", 448 | "gene_list <- c(\n", 449 | " \"GRIA1\", \"GRIA2\", \"GRIA3\", \"GRIA4\", \"GRID1\", \"GRID2\", \n", 450 | " \"GRIK1\", \"GRIK2\", \"GRIK3\", \"GRIK4\", \"GRIK5\", \"GRIN1\", \n", 451 | " \"GRIN2A\", \"GRIN2B\", \"GRIN2C\", \"GRIN2D\", \"GRIN3A\", \"GRIN3B\",\n", 452 | " \"GRINA\", \"GRM1\", \"GRM2\", \"GRM3\", \"GRM4\", \"GRM5\", \"GRM6\",\n", 453 | " \"GRM7\", \"GRM8\"\n", 454 | ")\n", 455 | "\n", 456 | "\n", 457 | "# Select a row name in the gene list to create a subset\n", 458 | "nr_gene_corres <- gene_corres[gene_corres$gene %in% gene_list, ]\n", 459 | "\n", 460 | "nr_gene_corres$change <- ifelse(nr_gene_corres$cor_results > 0, \"up\", \"down\")\n", 461 | "\n", 462 | "\n", 463 | "nr_gene_corres$'-log10pvalue' <- ifelse(\n", 464 | " nr_gene_corres$change == 'up', -log10(nr_gene_corres$cor_pvalue), -(-log10(nr_gene_corres$cor_pvalue))\n", 465 | " )\n", 466 | "head(nr_gene_corres)\n", 467 | "\n", 468 | "gene_order <- match(rownames(nr_gene_corres), gene_list)\n", 469 | "\n", 470 | "nr_gene_corres <- nr_gene_corres[gene_order, ]\n", 471 | "write.csv(nr_gene_corres,file=\"IL1A_nrgene_corres.csv\")\n", 472 | "p5 <- ggplot(nr_gene_corres, aes(x = `-log10pvalue`,y = gene_name)) +\n", 473 | " geom_col(aes(fill = `-log10pvalue`), width = 0.1) +\n", 474 | " geom_point(aes(size = cor_results,\n", 475 | " color = `-log10pvalue`)) +\n", 476 | " scale_size_continuous(range = c(2, 7)) +\n", 477 | " scale_color_continuous_c4a_div('army_rose', mid = 0, reverse = T) +\n", 478 | " scale_fill_continuous_c4a_div('army_rose', mid = 0, reverse = T) +\n", 479 | " theme_classic()\n", 480 | "p5\n", 481 | "\n", 482 | "ggsave(filename=\"extended_data_fig6c_right.pdf\",plot=p5, width = 5, height = 10)\n", 483 | "\n", 484 | "p4+p5" 485 | ] 486 | } 487 | ], 488 | "metadata": { 489 | "kernelspec": { 490 | "display_name": "R [conda env:sc]", 491 | "language": "R", 492 | "name": "conda-env-sc-r" 493 | }, 494 | "language_info": { 495 | "codemirror_mode": "r", 496 | "file_extension": ".r", 497 | "mimetype": "text/x-r-source", 498 | "name": "R", 499 | "pygments_lexer": "r", 500 | "version": "4.0.2" 501 | } 502 | }, 503 | "nbformat": 4, 504 | "nbformat_minor": 5 505 | } 506 | -------------------------------------------------------------------------------- /notebooks/Extended Data Figures/ExtFig. 7.r: -------------------------------------------------------------------------------- 1 | rm(list=ls()) 2 | gc() 3 | library(CellChat) 4 | library(ggplot2) 5 | library(patchwork) 6 | library(igraph) 7 | library(Seurat) 8 | #Read the object in Figure 6 9 | PFC<-readRDS("PFC.cellchat.rds") 10 | PFC <- updateCellChat(PFC) 11 | Hippo<-readRDS("Hippo.cellchat.rds") 12 | Hippo <- updateCellChat(Hippo) 13 | levels(Hippo@idents) 14 | My_levels <- c("Oligodendrocyte precursor", "Oligodendrocyte", "Newly formed oligodendrocytes", "Astrocyte", "Microglia", "Microglia(PCDH9high)", "Vascular leptomeningeal cell", "Fibroblast", "Endothelial", "GABAergic", "Glutamatergic", "Glutamatergic(Pyr)") 15 | Hippo@idents <- factor(Hippo@idents, levels= My_levels) 16 | levels(Hippo@idents) 17 | levels(PFC@idents) 18 | My_levels <- c("Oligodendrocyte precursor", "Oligodendrocyte", "Newly formed oligodendrocytes", "Astrocyte", "Microglia", "Microglia(PCDH9high)", "Vascular leptomeningeal cell", "Fibroblast", "Endothelial", "GABAergic", "Glutamatergic", "Glutamatergic(Pyr)") 19 | PFC@idents <- factor(PFC@idents, levels= My_levels) 20 | levels(PFC@idents) 21 | PFC <- updateCellChat(PFC) 22 | Hippo <- updateCellChat(Hippo) 23 | PFC <- updateCellChat(PFC) 24 | Hippo <- updateCellChat(Hippo) 25 | group.new = levels(Hippo@idents) 26 | PFC <- liftCellChat(PFC, group.new) 27 | object.list <- list(PFC = PFC, Hippo = Hippo) 28 | cellchat <- mergeCellChat(object.list, add.names = names(object.list), cell.prefix = TRUE) 29 | 30 | ##extended_data_fig7a 31 | #Compare outgoing (or incoming) signaling associated with each cell population 32 | library(ComplexHeatmap) 33 | i = 1 34 | pathway.union <- union(object.list[[i]]@netP$pathways, object.list[[i+1]]@netP$pathways) 35 | ht1 = netAnalysis_signalingRole_heatmap(object.list[[i]], pattern = "outgoing", signaling = pathway.union, title = names(object.list)[i], width = 6, height = 16,color.use=c("#7DF9FF", "#006091", "#5C89CC", "#74caff", "#AFE1AF", "#F0E68C", "#8B8000", "#D2B48C", "#50C878", "#E30B5C", "#CC5500", "#FA5F55")) 36 | ht2 = netAnalysis_signalingRole_heatmap(object.list[[i+1]], pattern = "outgoing", signaling = pathway.union, title = names(object.list)[i+1], width = 6, height = 16,color.use=c("#7DF9FF", "#006091", "#5C89CC", "#74caff", "#AFE1AF", "#F0E68C", "#8B8000", "#D2B48C", "#50C878", "#E30B5C", "#CC5500", "#FA5F55")) 37 | draw(ht1 + ht2, ht_gap = unit(0.5, "cm")) 38 | 39 | ##extended_data_fig7b 40 | # incoming signaling 41 | ht1 = netAnalysis_signalingRole_heatmap(object.list[[i]], pattern = "incoming", signaling = pathway.union, title = names(object.list)[i], width = 6, height = 16, color.heatmap = "GnBu",color.use=c("#7DF9FF", "#006091", "#5C89CC", "#74caff", "#AFE1AF", "#F0E68C", "#8B8000", "#D2B48C", "#50C878", "#E30B5C", "#CC5500", "#FA5F55")) 42 | ht2 = netAnalysis_signalingRole_heatmap(object.list[[i+1]], pattern = "incoming", signaling = pathway.union, title = names(object.list)[i+1], width = 6, height = 16, color.heatmap = "GnBu",color.use=c("#7DF9FF", "#006091", "#5C89CC", "#74caff", "#AFE1AF", "#F0E68C", "#8B8000", "#D2B48C", "#50C878", "#E30B5C", "#CC5500", "#FA5F55")) 43 | draw(ht1 + ht2, ht_gap = unit(0.5, "cm")) 44 | 45 | ##extended_data_fig7c 46 | pathways.show<-c("NRG","CADM", "NEGR", "LAMININ") 47 | par(mfrow=c(1,1)) 48 | netVisual_aggregate(Hippo, signaling = pathways.show, layout = "circle") 49 | 50 | ##extended_data_fig7d 51 | library(Seurat) 52 | library(ggplot2) 53 | fig4a<-readRDS("fig4a.rds") 54 | sce.all.list <- SplitObject(fig4a, split.by = "region") 55 | seu<-sce.all.list[["Hippocampus"]] 56 | ##Left 57 | L_genes<-c("CADM1", "LAMA1", "LAMA2", "LAMA3", "LAMA4", "LAMB1", "LAMC1", "LAMC3", "NEGR1", "NRG1", "NRG2", "NRG3") 58 | p1 <- DotPlot(object = seu, features = L_genes, assay = "RNA",cols = c("white", "red")) + 59 | guides(color = guide_colorbar(title = 'Scaled Average Expression')) + 60 | coord_flip() + 61 | theme(legend.position = "left", 62 | plot.margin = margin(r = 0), 63 | legend.title = element_text (size = 10), 64 | panel.border = element_rect(color = "black", fill = NA, size = 1.5), 65 | panel.grid.major = element_line(size = 0.2), 66 | axis.title = element_blank(), 67 | axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=0.1)) + 68 | scale_x_discrete(position = "top") + 69 | scale_y_discrete(position = "right") 70 | p1 71 | ggsave(filename="dot-left.pdf",plot=p1, width = 7, height = 9) 72 | 73 | #Right 74 | R_genes<-c("CADM1", "ITGAV", "ITGB8", "ITGA1", "ITGA6", "ITGA7", "ITGA9", "ITGB1", "ITGB4", "CD44", "DAG1", "SV2A", "SV2B", "NEGR1", "ERBB3", "ERBB4") 75 | p3 <- DotPlot(object = seu, features = R_genes, assay = "RNA",cols = c("white", "red")) + 76 | guides(color = guide_colorbar(title = 'Scaled Average Expression')) + 77 | coord_flip() + 78 | theme(axis.title = element_blank(), 79 | plot.margin = margin(l = 0), 80 | panel.border = element_rect(color = "black", fill = NA,size = 1.5), 81 | panel.grid.major = element_line(size = 0.2), 82 | axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=0.1)) + 83 | scale_y_discrete(position = "right") + NoLegend() 84 | p3 85 | ggsave(filename="dot-right.pdf",plot=p3, width = 5, height = 9) 86 | 87 | library(patchwork) 88 | p1 + p3 89 | p2<-p1 + p3 90 | ggsave(filename="extended_data_fig7d.pdf",plot=p2, width = 8, height = 6) -------------------------------------------------------------------------------- /notebooks/Main Figures/Fig. 5.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "fa1cc562", 6 | "metadata": {}, 7 | "source": [ 8 | "# Fig. 5" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "id": "924329d5", 14 | "metadata": {}, 15 | "source": [ 16 | "## Fig. 5a" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": null, 22 | "id": "43b4f71b", 23 | "metadata": {}, 24 | "outputs": [], 25 | "source": [ 26 | "import scanpy as sc\n", 27 | "import pandas as pd\n", 28 | "import numpy as np\n", 29 | "import anndata\n", 30 | "from matplotlib import rcParams\n", 31 | "sc.set_figure_params(dpi=300, color_map='viridis')\n", 32 | "sc.settings.verbosity = 2" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": null, 38 | "id": "e79eed18", 39 | "metadata": {}, 40 | "outputs": [], 41 | "source": [ 42 | "%pylab inline\n", 43 | "import warnings\n", 44 | "warnings.filterwarnings(\"ignore\")\n", 45 | "from glob import iglob\n", 46 | "from tqdm import tqdm" 47 | ] 48 | }, 49 | { 50 | "cell_type": "code", 51 | "execution_count": null, 52 | "id": "24b6a899", 53 | "metadata": {}, 54 | "outputs": [], 55 | "source": [ 56 | "%matplotlib inline" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": null, 62 | "id": "9512ff7a", 63 | "metadata": {}, 64 | "outputs": [], 65 | "source": [ 66 | "fig5a= sc.read(\"fig5.h5\")" 67 | ] 68 | }, 69 | { 70 | "cell_type": "code", 71 | "execution_count": null, 72 | "id": "7f035ef9", 73 | "metadata": {}, 74 | "outputs": [], 75 | "source": [ 76 | "figsize(4,4)\n", 77 | "sc.pl.pca(mg,color=[\"region\"],frameon=False,save=\"fig5a.pdf\")" 78 | ] 79 | }, 80 | { 81 | "cell_type": "markdown", 82 | "id": "27d45189", 83 | "metadata": {}, 84 | "source": [ 85 | "# Fig. 5b-d" 86 | ] 87 | }, 88 | { 89 | "cell_type": "code", 90 | "execution_count": null, 91 | "id": "4e38d83d", 92 | "metadata": {}, 93 | "outputs": [], 94 | "source": [ 95 | "%%R\n", 96 | "Sys.setenv(LANGUAGE = \"en\")\n", 97 | "options(stringsAsFactors = FALSE)\n", 98 | "suppressPackageStartupMessages(library(ggplot2))\n", 99 | "suppressPackageStartupMessages(library(dplyr))\n", 100 | "deg<-read.csv(\"fig5b_DEG.csv\",sep=\",\",header=T)\n", 101 | "\n", 102 | "########Fig. 5b\n", 103 | "library(EnhancedVolcano) \n", 104 | "keyvals <- ifelse(deg$avg_log2FC < -0.2, '#74CAFF',\n", 105 | " ifelse(deg$avg_log2FC > 0.2, '#B3128A',\n", 106 | " 'gray'))\n", 107 | "keyvals[is.na(keyvals)] <- 'gray'\n", 108 | "names(keyvals)[keyvals == '#B3128A'] <- 'Prefrontal cortex'\n", 109 | "names(keyvals)[keyvals == 'gray'] <- 'mid'\n", 110 | "names(keyvals)[keyvals == '#74CAFF'] <- 'Hippocampus'\n", 111 | "\n", 112 | "p <- EnhancedVolcano(deg,\n", 113 | " lab = rownames(deg),\n", 114 | " x = 'avg_log2FC',\n", 115 | " y = 'p_val_adj', \n", 116 | " xlab = bquote(~Log[2]~ 'fold change'),\n", 117 | " pCutoff = 10e-2,\n", 118 | " FCcutoff = 0.2,\n", 119 | " pointSize = 3,\n", 120 | " labSize = 8,\n", 121 | " colAlpha = 4/5,\n", 122 | " colCustom = keyvals,\n", 123 | " selectLab = rownames(deg)[which(names(keyvals) %in% c('Prefrontal cortex', 'Hippocampus'))]) + ggplot2::coord_cartesian(xlim=c(-1.5, 1.5)) + theme_classic(base_size = 30) + theme(legend.position=\"bottom\")\n", 124 | "p\n", 125 | "ggsave(\"volcano_PFC_vs_HIPPO.pdf\", plot=p, width=10, height=12)\n", 126 | "\n", 127 | "########Fig. 5c\n", 128 | "suppressPackageStartupMessages(library(clusterProfiler))\n", 129 | "library(tidyverse)\n", 130 | "library(KEGG.db) \n", 131 | "library(ggplot2)\n", 132 | "library(RColorBrewer)\n", 133 | "library(gridExtra)\n", 134 | "library(enrichplot)\n", 135 | "library(plyr)\n", 136 | "library(ggrepel)\n", 137 | "library(org.Hs.eg.db)\n", 138 | "library(pheatmap)\n", 139 | "library(RColorBrewer)\n", 140 | "deg$gene_name<-rownames(deg)\n", 141 | "deg$ENTREZID <- mapIds(org.Hs.eg.db,\n", 142 | " keys=deg$gene_name,\n", 143 | " column=\"ENTREZID\",\n", 144 | " keytype=\"SYMBOL\",\n", 145 | " multiVals=\"first\")\n", 146 | "\n", 147 | "deg <- deg %>% \n", 148 | " dplyr::select(gene_name,ENTREZID,avg_log2FC,group) %>% \n", 149 | " filter(ENTREZID!=\"NA\") %>% \n", 150 | " distinct(ENTREZID,.keep_all = T)\n", 151 | "PFC_deg<-deg[deg$group == \"Prefrontal cortex\", ]\n", 152 | "HIP_deg<-deg[deg$group == \"Hippocampus\", ]\n", 153 | "kk <- enrichKEGG(gene = HIP_deg$ENTREZID, organism = 'hsa',pvalueCutoff = 0.05)\n", 154 | "kk1 <- setReadable(kk, 'org.Hs.eg.db', 'ENTREZID')\n", 155 | "kk2<-as.data.frame(kk1)\n", 156 | "View(kk2)\n", 157 | "write.csv(kk2,file=\"kegg-HIPPO.csv\")\n", 158 | "GO_results <- enrichGO(gene = HIP_deg$gene_name, OrgDb = \"org.Hs.eg.db\", keyType = \"SYMBOL\", ont = \"BP\")\n", 159 | "View(GO_results)\n", 160 | "bp <- as.data.frame(GO_results)\n", 161 | "View(bp)\n", 162 | "write.csv(bp,file=\"BP-HIPPO.csv\")\n", 163 | "MF_results <- enrichGO(gene = HIP_deg$gene_name, OrgDb = \"org.Hs.eg.db\", keyType = \"SYMBOL\", ont = \"MF\")\n", 164 | "MF <- as.data.frame(MF_results)\n", 165 | "write.csv(MF,file=\"MF-HIPPO.csv\")\n", 166 | "CC_results <- enrichGO(gene = HIP_deg$gene_name, OrgDb = \"org.Hs.eg.db\", keyType = \"SYMBOL\", ont = \"CC\")\n", 167 | "CC <- as.data.frame(CC_results)\n", 168 | "write.csv(CC,file=\"CC-HIPPO.csv\")\n", 169 | "kk <- enrichKEGG(gene = PFC_deg$ENTREZID, organism = 'hsa',pvalueCutoff = 0.05)\n", 170 | "kk1 <- setReadable(kk, 'org.Hs.eg.db', 'ENTREZID')\n", 171 | "kk2<-as.data.frame(kk1)\n", 172 | "View(kk2)\n", 173 | "write.csv(kk2,file=\"kegg-PFC.csv\")\n", 174 | "GO_results <- enrichGO(gene = PFC_deg$gene_name, OrgDb = \"org.Hs.eg.db\", keyType = \"SYMBOL\", ont = \"BP\")\n", 175 | "View(GO_results)\n", 176 | "bp <- as.data.frame(GO_results)\n", 177 | "View(bp)\n", 178 | "write.csv(bp,file=\"BP-PFC.csv\")\n", 179 | "MF_results <- enrichGO(gene = PFC_deg$gene_name, OrgDb = \"org.Hs.eg.db\", keyType = \"SYMBOL\", ont = \"MF\")\n", 180 | "MF <- as.data.frame(MF_results)\n", 181 | "write.csv(MF,file=\"MF-PFC.csv\")\n", 182 | "CC_results <- enrichGO(gene = PFC_deg$gene_name, OrgDb = \"org.Hs.eg.db\", keyType = \"SYMBOL\", ont = \"CC\")\n", 183 | "CC <- as.data.frame(CC_results)\n", 184 | "write.csv(CC,file=\"CC-PFC.csv\")\n", 185 | "\n", 186 | "########Fig. 5c\n", 187 | "mytheme = theme(axis.text.x = element_text(hjust = 0.5,size = 20), \n", 188 | " axis.ticks.y = element_blank(),\n", 189 | " axis.text.y = element_text(size = 20), \n", 190 | " axis.title.x = element_text(size = 20), \n", 191 | " axis.title.y = element_text(size = 20), \n", 192 | " axis.line = element_line(size = 1),\n", 193 | " plot.margin = unit(c(1,1,1,1), \"cm\"),\n", 194 | " plot.title = element_text(hjust = 0.5,size = 22),\n", 195 | " legend.title = element_text(size = 22), \n", 196 | " legend.text = element_text(size = 22), \n", 197 | " legend.position = \"right\",\n", 198 | " legend.background = element_rect(fill = 'transparent'))\n", 199 | "\n", 200 | "library(readxl)\n", 201 | "##pfc_GO_select.xlsx and hip_GO_select.xlsx=choose pathway from Related to Fig. 5c of Supplementary Table 5.xlsx\n", 202 | "pfc = as.data.frame(read_excel(\"pfc_GO_select.xlsx\"),sheet = 1);head(pfc)\n", 203 | "hip = as.data.frame(read_excel(\"hip_GO_select.xlsx\"),sheet = 1);head(hip)\n", 204 | "kegg_down_dt <- as.data.frame(hip)\n", 205 | "kegg_up_dt <- as.data.frame(pfc)\n", 206 | "kegg_down_dt <- kegg_down_dt[order(kegg_down_dt$pvalue),]\n", 207 | "kegg_up_dt <- kegg_up_dt[order(kegg_up_dt$pvalue),]\n", 208 | "hip2 <- head(kegg_down_dt,8)\n", 209 | "hip2$group = -1\n", 210 | "pfc2 <- head(kegg_up_dt,8)\n", 211 | "pfc2$group = 1\n", 212 | "dat <- rbind(pfc2, hip2)\n", 213 | "dat$pvalue <- -log10(dat$pvalue)\n", 214 | "dat$pvalue <- dat$pvalue * dat$group\n", 215 | "dat <- dat[order(dat$pvalue, decreasing = F),];\n", 216 | "dat$threshold <- ifelse(dat$pvalue > 0,'Prefrontal cortex','Hippocampus')\n", 217 | "dat$Description <- factor(dat$Description,levels = dat$Description) \n", 218 | "\n", 219 | "\n", 220 | "p4 <- ggplot(data = dat,aes(x = Description,y = pvalue,fill = threshold)) +\n", 221 | " geom_col() +\n", 222 | " #geom_hline(yintercept = c(-2,2),color = 'grey',size = 2,lty = 'dashed') + \n", 223 | " coord_flip() +\n", 224 | " #geom_text(aes(label = GeneRatio),size =6) + \n", 225 | " scale_fill_manual(values = c('Prefrontal cortex'= '#A71981','Hippocampus'='#77C1EC')) +\n", 226 | " labs(x = NULL, y = bquote(\"-\"~Log[10]~\"(P value)\"), title = \"GO Term Enrichment\") \n", 227 | " \n", 228 | " up_pathway <- length(which(dat$pvalue > 0))\n", 229 | " down_pathway <- length(which(dat$pvalue < 0))\n", 230 | " high <- nrow(dat)\n", 231 | "p4 + geom_text(data = dat[1:up_pathway,],aes(x = Description,y = 0.1,label = Description),\n", 232 | " hjust = 0,color = 'black',size = 6) +\n", 233 | " geom_text(data = dat[(down_pathway +1):high,],aes(x = Description,y = -0.1,label = Description),\n", 234 | " hjust = 1,color = 'black',size = 6) +\n", 235 | " scale_x_discrete(labels = NULL) +\n", 236 | "\n", 237 | " scale_y_continuous(expand = expansion(add = c(0.1, 0.1)),\n", 238 | " limits = c(-17,15), breaks = seq(-15,15,5), \n", 239 | " labels = c(15,10,5,0,5,10,15)) +\n", 240 | " theme_bw() + mytheme + \n", 241 | " theme(legend.position = \"none\",\n", 242 | " axis.line.y = element_blank(),\n", 243 | " panel.grid.major = element_blank(),\n", 244 | " panel.grid.minor = element_blank(),\n", 245 | " panel.border = element_blank())\n", 246 | "\n", 247 | "########Fig. 5d\n", 248 | "##KEGG_select.xlsx =choose pathway from Related to Fig. 5d of Supplementary Table 5.xlsx\n", 249 | "rm(list=ls())\n", 250 | "gc()\n", 251 | "library(\"readxl\")\n", 252 | "kegg = as.data.frame(read_excel(\"KEGG_select.xlsx\"),sheet = 1);head(kegg)\n", 253 | "given_values <- c(\"hsa04724\", \"hsa04514\", \"hsa04728\", \"hsa04723\", \"hsa04024\", \"hsa04145\", \"hsa04142\", \"hsa04612\", \"hsa04666\", \"hsa04062\")\n", 254 | "kegg_sec <- subset(kegg, ID %in% given_values)\n", 255 | "kegg_sec$neg_log10_p <- -log10(kegg_sec$pvalue)\n", 256 | "kegg_sec <- kegg_sec[, c(\"ID\",\"Group\", \"neg_log10_p\")]\n", 257 | "kegg_sec$neg_log10_p <- as.numeric(as.character(kegg_sec$neg_log10_p))\n", 258 | "kegg_sec <- kegg_sec[!is.na(kegg_sec$neg_log10_p), ]\n", 259 | "kegg_sec$HIPPO<-kegg_sec$neg_log10_p\n", 260 | "kegg_sec$HIPPO[kegg_sec$Group == \"PFC\"] <- NA\n", 261 | "print(kegg_sec$HIPPO)\n", 262 | "kegg_sec$PFC<-kegg_sec$neg_log10_p\n", 263 | "##hsa04514\tCell adhesion molecules also in PFC\n", 264 | "kegg_sec$PFC[kegg_sec$Group == \"HIPPO\" & kegg_sec$ID != \"hsa04514\"] <- NA\n", 265 | "kegg_sec$PFC[kegg_sec$ID == \"hsa04514\"] <- 0.000602117801055997\n", 266 | "kegg_sec<-kegg_sec[, c(\"ID\", \"PFC\",\"HIPPO\")]\n", 267 | "rownames(kegg_sec)<-kegg_sec$ID\n", 268 | "kegg_sec<-kegg_sec[, c(\"HIPPO\",\"PFC\")]\n", 269 | "colnames(kegg_sec)<-c(\"Hippocampus\",\"Prefrontal cortex\")\n", 270 | "dat=log2(kegg_sec+1)\n", 271 | "#group_list <- as.factor(c(\"Prefrontal cortex\",\"Hippocampus\"))\n", 272 | "#table(group_list)\n", 273 | "#n=t(scale(t(dat))) \n", 274 | "#n <- na.omit(dat) \n", 275 | "n=dat\n", 276 | "n[n>3]=3\n", 277 | "n[n< 1]= 1\n", 278 | "##Fig. 5d\n", 279 | "pheatmap(n,\n", 280 | " scale = \"none\",\n", 281 | " color = colorRampPalette(c(\"#3d4c9e\", \"white\", \"#eee814\"))(100),\n", 282 | " show_rownames = TRUE,\n", 283 | " show_colnames = TRUE,\n", 284 | " cellwidth = 35,\n", 285 | " cellheight = 35,\n", 286 | " cluster_row = FALSE,\n", 287 | " cluster_col = FALSE,\n", 288 | "border_color = \"white\",\n", 289 | "na_col = \"#808080\")" 290 | ] 291 | }, 292 | { 293 | "cell_type": "markdown", 294 | "id": "1a25929c", 295 | "metadata": {}, 296 | "source": [ 297 | "## Fig. 5e" 298 | ] 299 | }, 300 | { 301 | "cell_type": "code", 302 | "execution_count": null, 303 | "id": "fe96b8cd", 304 | "metadata": {}, 305 | "outputs": [], 306 | "source": [ 307 | "all=sc.read(\"fig5a.h5\")" 308 | ] 309 | }, 310 | { 311 | "cell_type": "code", 312 | "execution_count": null, 313 | "id": "d0468c0a", 314 | "metadata": {}, 315 | "outputs": [], 316 | "source": [ 317 | "joint_gene_bp=[\"PCDH9\", \"CADM2\", \"MBP\",\"SORT1\", \"UNC5C\", \"NRXN3\", \"NCAM1\", \"DIP2B\",\"AUTS2\",\"PTK2\",\"CDH20\", \"AKAP6\", \"PEX5L\", \"PDE3B\"]" 318 | ] 319 | }, 320 | { 321 | "cell_type": "code", 322 | "execution_count": null, 323 | "id": "438a01e9", 324 | "metadata": {}, 325 | "outputs": [], 326 | "source": [ 327 | "sc.pl.stacked_violin(all,joint_gene_bp, groupby='region',save='joint_gene_bp.pdf',vmax=1)" 328 | ] 329 | }, 330 | { 331 | "cell_type": "code", 332 | "execution_count": null, 333 | "id": "e450b5db", 334 | "metadata": {}, 335 | "outputs": [], 336 | "source": [ 337 | "pfc_go_gene=[\"PTPRC\", \"ATM\",\"C3\",\"CD74\",\"CSF1R\", \"DOCK2\", \"JAK2\", \"IFNGR1\", \"SNCA\", \"TLR2\", \"PLCG2\", \"SYK\"]" 338 | ] 339 | }, 340 | { 341 | "cell_type": "code", 342 | "execution_count": null, 343 | "id": "adf0567c", 344 | "metadata": {}, 345 | "outputs": [], 346 | "source": [ 347 | "ax = sc.pl.stacked_violin(all, pfc_go_gene,cmap='Greens',groupby='region',vmin=0,vmax=2, swap_axes=False,save=\"pfc_spe_gene_.bp.pdf\")" 348 | ] 349 | }, 350 | { 351 | "cell_type": "code", 352 | "execution_count": null, 353 | "id": "ae31b2f9", 354 | "metadata": {}, 355 | "outputs": [], 356 | "source": [ 357 | "hip_spe_gene_bp=[\"NRXN1\", \"NRG3\", \"ROBO2\", \"HOMER1\", \"NEGR1\", \"PPFIA2\", \"LRRC4C\", \"GRID1\", \"DSCAM\", \"KLF7\", \"DSCAML1\", \"ROBO1\", \"GRIK2\", \"GRIA2\", \"CADM1\", \"PDE4D\"]" 358 | ] 359 | }, 360 | { 361 | "cell_type": "code", 362 | "execution_count": null, 363 | "id": "739b30f9", 364 | "metadata": {}, 365 | "outputs": [], 366 | "source": [ 367 | "ax = sc.pl.stacked_violin(all, hip_spe_gene_bp, cmap='Reds',groupby='region',vmin=0,vmax=2, swap_axes=False,save=\"hip_spe_gene_.bp.pdf\")" 368 | ] 369 | }, 370 | { 371 | "cell_type": "markdown", 372 | "id": "9ff2c933", 373 | "metadata": {}, 374 | "source": [ 375 | "## Fig. 5f" 376 | ] 377 | }, 378 | { 379 | "cell_type": "code", 380 | "execution_count": null, 381 | "id": "eb62e867", 382 | "metadata": {}, 383 | "outputs": [], 384 | "source": [ 385 | "%%R\n", 386 | "Sys.setenv(LANGUAGE = \"en\")\n", 387 | "options(stringsAsFactors = FALSE)\n", 388 | "library(clusterProfiler)\n", 389 | "library(org.Hs.eg.db)\n", 390 | "library(GseaVis)\n", 391 | "# load diffgene\n", 392 | "deg<-read.csv(\"fig5b_DEG.csv\",sep=\",\",header=T,row.names = 1)\n", 393 | "deg$ENTREZID <- mapIds(org.Hs.eg.db,\n", 394 | " keys=rownames(deg),\n", 395 | " column=\"ENTREZID\",\n", 396 | " keytype=\"SYMBOL\",\n", 397 | " multiVals=\"first\")\n", 398 | "deg$gene_name=rownames(deg)\n", 399 | "deg_hip <- subset(deg, group == \"Hippocampus\")\n", 400 | "deg_hip<-na.omit(deg_hip)\n", 401 | "library(dplyr)\n", 402 | "deg_hip$avg_log2FC <- abs(deg_hip$avg_log2FC)\n", 403 | "gene_df <- deg_hip %>% \n", 404 | " dplyr::select(avg_log2FC,ENTREZID,gene_name) %>% \n", 405 | " filter(ENTREZID!=\"NA\") %>% \n", 406 | " distinct(ENTREZID,.keep_all = T)\n", 407 | "geneList <- gene_df$avg_log2FC\n", 408 | "names(geneList) = gene_df$ENTREZID\n", 409 | "geneList = sort(geneList, decreasing = TRUE)\n", 410 | "head(geneList)\n", 411 | "gsym.fc.id.sorted <- gene_df[order(gene_df$avg_log2FC, decreasing = T),]\n", 412 | "id.fc <- gsym.fc.id.sorted$avg_log2FC\n", 413 | "names(id.fc) <- gsym.fc.id.sorted$ENTREZID\n", 414 | "kk <- gseKEGG(id.fc, organism = \"hsa\", pvalueCutoff = 1)\n", 415 | "dim(kk)\n", 416 | "kk1 <- setReadable(kk, 'org.Hs.eg.db', 'ENTREZID')\n", 417 | "kk2<-as.data.frame(kk1)\n", 418 | "View(kk2)\n", 419 | "write.csv(kk2,file=\"HIP_mg(pcdh9hi)_gsea_output.csv\")\n", 420 | "#head(kk)\n", 421 | "\n", 422 | "kk.gsym <- setReadable(kk, 'org.Hs.eg.db', \n", 423 | " 'ENTREZID')\n", 424 | "\n", 425 | "sortkk <- kk.gsym[order(kk.gsym$enrichmentScore, decreasing = T),]\n", 426 | "#head(sortkk)\n", 427 | "#tail(sortkk)\n", 428 | "#hsa04724 Glutamatergic synapse\n", 429 | "#GRIK2/DLGAP1/HOMER1/GRIA2/GRM5/GRIA1/PLCB1/GRM7/KCNJ3/GRIN2B/GRIA4/GRIN2A\n", 430 | "#hsa04514 Cell adhesion molecules\n", 431 | "#hsa04728 Dopaminergic synapse\n", 432 | "#hsa04723 Retrograde endocannabinoid signaling\n", 433 | "#hsa04024 cAMP signaling pathway\n", 434 | "\n", 435 | "# choose pathways\n", 436 | "geneSetID <- c(\"hsa04724\", \"hsa04514\",\"hsa04728\",\"hsa04723\",\"hsa04024\")\n", 437 | "\n", 438 | "# highlight gene names\n", 439 | "selectedGeneID <- c(\"GRIK2\",\"GRIA2\",\"PLCB1\",\"MAPK10\",\"GABRB2\",\"PDE4D\",\"RYR2\")\n", 440 | "\n", 441 | "# define colors\n", 442 | "mycol <- c(\"#088247\",\"#58CDD9\",\"#7A142C\",\"#5D90BA\",\"#431A3D\",\"#91612D\",\"#6E568C\",\"#E0367A\",\"#D8D155\",\"#64495D\",\"#7CC767\")\n", 443 | "\n", 444 | "\n", 445 | "for (i in sortkk$geneSetID) {\n", 446 | " gseaplot(kk, i)\n", 447 | " myGeneList <- enrichplot:::gsInfo(kk, i)\n", 448 | " row.names(myGeneList) <- gsym.fc$gsym\n", 449 | " myGeneList$id <- gsym.fc$ENTREZID \n", 450 | " write.csv(myGeneList, paste0(\"gsea_genelist_\", i, \"_hip.csv\"))\n", 451 | "}\n", 452 | "\n", 453 | "x <- kk\n", 454 | "geneList <- position <- NULL ## to satisfy codetool\n", 455 | "\n", 456 | "#merge multiple pathways\n", 457 | "gsdata <- do.call(rbind, lapply(geneSetID, enrichplot:::gsInfo, object = x))\n", 458 | "gsdata$gsym <- rep(gsym.fc.id.sorted$gene_name,5)\n", 459 | "\n", 460 | "# running score\n", 461 | "p.res <- ggplot(gsdata, aes_(x = ~x)) + xlab(NULL) +\n", 462 | " geom_line(aes_(y = ~runningScore, color= ~Description), size=1) +\n", 463 | " scale_color_manual(values = mycol) +\n", 464 | " \n", 465 | " #scale_x_continuous(expand=c(0,0)) + \n", 466 | " geom_hline(yintercept = 0, lty = \"longdash\", lwd = 0.2) + \n", 467 | " ylab(\"Enrichment\\n Score\") +\n", 468 | " \n", 469 | " theme_bw() +\n", 470 | " theme(panel.grid = element_blank()) + \n", 471 | " \n", 472 | " theme(legend.position = \"top\", legend.title = element_blank(),\n", 473 | " legend.background = element_rect(fill = \"transparent\")) +\n", 474 | " \n", 475 | " theme(axis.text.y=element_text(size = 12, face = \"bold\"),\n", 476 | " axis.text.x=element_blank(),\n", 477 | " axis.ticks.x=element_blank(),\n", 478 | " axis.line.x=element_blank(),\n", 479 | " axis.line.y = element_line(),\n", 480 | " plot.margin=margin(t=.2, r = .2, b=0, l=.2, unit=\"cm\"))\n", 481 | "#p.res\n", 482 | "\n", 483 | "\n", 484 | "# rank\n", 485 | "rel_heights <- c(1.5, .5, 1.5) \n", 486 | "\n", 487 | "i <- 0\n", 488 | "for (term in unique(gsdata$Description)) {\n", 489 | " idx <- which(gsdata$ymin != 0 & gsdata$Description == term)\n", 490 | " gsdata[idx, \"ymin\"] <- i\n", 491 | " gsdata[idx, \"ymax\"] <- i + 1\n", 492 | " i <- i + 1\n", 493 | "}\n", 494 | "#head(gsdata)\n", 495 | "\n", 496 | "p2 <- ggplot(gsdata, aes_(x = ~x)) +\n", 497 | " geom_linerange(aes_(ymin=~ymin, ymax=~ymax, color=~Description)) +\n", 498 | " xlab(NULL) + ylab(NULL) + \n", 499 | " scale_color_manual(values = mycol) + \n", 500 | " theme_bw() +\n", 501 | " theme(panel.grid = element_blank()) + \n", 502 | "\n", 503 | " theme(legend.position = \"none\",\n", 504 | " plot.margin = margin(t=-.1, b=0,unit=\"cm\"),\n", 505 | " axis.ticks = element_blank(),\n", 506 | " axis.text = element_blank(),\n", 507 | " axis.line.y = element_line(),\n", 508 | " axis.line.x = element_blank()) +\n", 509 | " #scale_x_continuous(expand=c(0,0)) +\n", 510 | " scale_y_continuous(expand=c(0,0))\n", 511 | "#p2\n", 512 | "\n", 513 | "\n", 514 | "# fold changes\n", 515 | "df2 <- p.res$data\n", 516 | "df2$y <- p.res$data$geneList[df2$x]\n", 517 | "df2$gsym <- p.res$data$gsym[df2$x]\n", 518 | "\n", 519 | "#head(df2)\n", 520 | "selectgenes <- data.frame(gsym = selectedGeneID)\n", 521 | "selectgenes <- merge(selectgenes, df2, by = \"gsym\")\n", 522 | "selectgenes <- selectgenes[selectgenes$position == 1,]\n", 523 | "head(selectgenes)\n", 524 | "\n", 525 | "\n", 526 | "p.pos <- ggplot(selectgenes, aes(x, y, fill = Description, color = Description, label = gsym)) + \n", 527 | " geom_segment(data=df2, aes_(x=~x, xend=~x, y=~y, yend=0), \n", 528 | " color = \"grey\") +\n", 529 | " geom_bar(position = \"dodge\", stat = \"identity\") +\n", 530 | " scale_fill_manual(values = mycol, guide=FALSE) + \n", 531 | " scale_color_manual(values = mycol, guide=FALSE) + \n", 532 | "\n", 533 | " #scale_x_continuous(expand=c(0,0)) +\n", 534 | " geom_hline(yintercept = 0, lty = 2, lwd = 0.2) +\n", 535 | " ylab(\"Ranked list\\n metric\") +\n", 536 | " xlab(\"Rank in ordered dataset\") +\n", 537 | " \n", 538 | " theme_bw() +\n", 539 | " theme(axis.text.y=element_text(size = 12, face = \"bold\"),axis.line.y = element_line(),\n", 540 | " panel.grid = element_blank()) +\n", 541 | "\n", 542 | " # show gene names\n", 543 | " geom_text_repel(data = selectgenes, \n", 544 | " show.legend = FALSE, \n", 545 | " direction = \"x\", \n", 546 | " ylim = c(2, NA), \n", 547 | " angle = 90, \n", 548 | " size = 2.5, box.padding = unit(0.35, \"lines\"), \n", 549 | " point.padding = unit(0.3, \"lines\")) +\n", 550 | " theme(plot.margin=margin(t = -.1, r = .2, b=.2, l=.2, unit=\"cm\"))\n", 551 | "#p.pos\n", 552 | "\n", 553 | "library(\"cowplot\")\n", 554 | "# 组图\n", 555 | "plotlist <- list(p.res, p2, p.pos)\n", 556 | "n <- length(plotlist)\n", 557 | "plotlist[[n]] <- plotlist[[n]] +\n", 558 | " theme(axis.line.x = element_line(),\n", 559 | " axis.ticks.x = element_line(),\n", 560 | " axis.text.x = element_text(size = 12, face = \"bold\"))\n", 561 | "\n", 562 | "plot_grid(plotlist = plotlist, ncol = 1, align=\"v\", rel_heights = rel_heights)" 563 | ] 564 | }, 565 | { 566 | "cell_type": "markdown", 567 | "id": "fbc6a609", 568 | "metadata": {}, 569 | "source": [ 570 | "# Fig. 5g" 571 | ] 572 | }, 573 | { 574 | "cell_type": "code", 575 | "execution_count": null, 576 | "id": "81281974", 577 | "metadata": {}, 578 | "outputs": [], 579 | "source": [ 580 | "%%R\n", 581 | "Sys.setenv(LANGUAGE = \"en\")\n", 582 | "options(stringsAsFactors = FALSE)\n", 583 | "library(clusterProfiler)\n", 584 | "library(org.Hs.eg.db)\n", 585 | "library(GseaVis)\n", 586 | "# load diffgene\n", 587 | "deg<-read.csv(\"fig5b_DEG.csv\",sep=\",\",header=T,row.names = 1)\n", 588 | "deg$ENTREZID <- mapIds(org.Hs.eg.db,\n", 589 | " keys=rownames(deg),\n", 590 | " column=\"ENTREZID\",\n", 591 | " keytype=\"SYMBOL\",\n", 592 | " multiVals=\"first\")\n", 593 | "deg$gene_name=rownames(deg)\n", 594 | "deg_pfc <- subset(deg, group == \"Prefrontal cortex\")\n", 595 | "deg_pfc<-na.omit(deg_pfc)\n", 596 | "library(dplyr)\n", 597 | "gene_df <- deg_pfc %>% \n", 598 | " dplyr::select(avg_log2FC,ENTREZID,gene_name) %>% \n", 599 | " filter(ENTREZID!=\"NA\") %>% \n", 600 | " distinct(ENTREZID,.keep_all = T)\n", 601 | "geneList <- gene_df$avg_log2FC\n", 602 | "names(geneList) = gene_df$ENTREZID\n", 603 | "geneList = sort(geneList, decreasing = TRUE)\n", 604 | "head(geneList)\n", 605 | "gsym.fc.id.sorted <- gene_df[order(gene_df$avg_log2FC, decreasing = T),]\n", 606 | "id.fc <- gsym.fc.id.sorted$avg_log2FC\n", 607 | "names(id.fc) <- gsym.fc.id.sorted$ENTREZID\n", 608 | "kk <- gseKEGG(id.fc, organism = \"hsa\", pvalueCutoff = 1)\n", 609 | "dim(kk)\n", 610 | "kk.gsym <- setReadable(kk, 'org.Hs.eg.db', \n", 611 | " 'ENTREZID')\n", 612 | "sortkk <- kk.gsym[order(kk.gsym$enrichmentScore, decreasing = T),]\n", 613 | "\n", 614 | "##choose pathway\n", 615 | "geneSetID <- c(\"hsa04145\", \"hsa04142\",\"hsa04612\",\"hsa04666\",\"hsa04062\")\n", 616 | "\n", 617 | "##highlight genes\n", 618 | "selectedGeneID <- c(\"CTSB\",\"LAMP2\",\"C3\",\"MSR1\",\"CD74\",\"PTPRC\",\"PLCG2\",\"JAK2\")\n", 619 | "\n", 620 | "###define colors\n", 621 | "mycol <- c(\"darkgreen\",\"chocolate4\",\"blueviolet\",\"#223D6C\",\"#D20A13\",\"#088247\",\"#58CDD9\",\"#7A142C\",\"#5D90BA\",\"#431A3D\",\"#91612D\",\"#6E568C\",\"#E0367A\",\"#D8D155\",\"#64495D\",\"#7CC767\")\n", 622 | "for (i in sortkk$geneSetID) {\n", 623 | " gseaplot(kk, i)\n", 624 | " myGeneList <- enrichplot:::gsInfo(kk, i)\n", 625 | " row.names(myGeneList) <- gsym.fc$gsym\n", 626 | " myGeneList$id <- gsym.fc$ENTREZID \n", 627 | " write.csv(myGeneList, paste0(\"gsea_genelist_\", i, \"_pfc.csv\"))\n", 628 | "}\n", 629 | "\n", 630 | "x <- kk\n", 631 | "geneList <- position <- NULL ## to satisfy codetool\n", 632 | "\n", 633 | "# merge multiple pathways\n", 634 | "gsdata <- do.call(rbind, lapply(geneSetID, enrichplot:::gsInfo, object = x))\n", 635 | "gsdata$gsym <- rep(gsym.fc.id.sorted$gene_name,5)\n", 636 | "\n", 637 | "# running score\n", 638 | "p.res <- ggplot(gsdata, aes_(x = ~x)) + xlab(NULL) +\n", 639 | " geom_line(aes_(y = ~runningScore, color= ~Description), size=1) +\n", 640 | " scale_color_manual(values = mycol) +\n", 641 | " \n", 642 | " #scale_x_continuous(expand=c(0,0)) + \n", 643 | " geom_hline(yintercept = 0, lty = \"longdash\", lwd = 0.2) + \n", 644 | " ylab(\"Enrichment\\n Score\") +\n", 645 | " \n", 646 | " theme_bw() +\n", 647 | " theme(panel.grid = element_blank()) + \n", 648 | " \n", 649 | " theme(legend.position = \"top\", legend.title = element_blank(),\n", 650 | " legend.background = element_rect(fill = \"transparent\")) +\n", 651 | " \n", 652 | " theme(axis.text.y=element_text(size = 12, face = \"bold\"),\n", 653 | " axis.text.x=element_blank(),\n", 654 | " axis.ticks.x=element_blank(),\n", 655 | " axis.line.x=element_blank(),\n", 656 | " axis.line.y = element_line(),\n", 657 | " plot.margin=margin(t=.2, r = .2, b=0, l=.2, unit=\"cm\"))\n", 658 | "#p.res\n", 659 | "\n", 660 | "# rank\n", 661 | "rel_heights <- c(1.5, .5, 1.5) \n", 662 | "\n", 663 | "i <- 0\n", 664 | "for (term in unique(gsdata$Description)) {\n", 665 | " idx <- which(gsdata$ymin != 0 & gsdata$Description == term)\n", 666 | " gsdata[idx, \"ymin\"] <- i\n", 667 | " gsdata[idx, \"ymax\"] <- i + 1\n", 668 | " i <- i + 1\n", 669 | "}\n", 670 | "#head(gsdata)\n", 671 | "\n", 672 | "p2 <- ggplot(gsdata, aes_(x = ~x)) +\n", 673 | " geom_linerange(aes_(ymin=~ymin, ymax=~ymax, color=~Description)) +\n", 674 | " xlab(NULL) + ylab(NULL) + \n", 675 | " scale_color_manual(values = mycol) + \n", 676 | "\n", 677 | " theme_bw() +\n", 678 | " theme(panel.grid = element_blank()) + \n", 679 | "\n", 680 | " theme(legend.position = \"none\",\n", 681 | " plot.margin = margin(t=-.1, b=0,unit=\"cm\"),\n", 682 | " axis.ticks = element_blank(),\n", 683 | " axis.text = element_blank(),\n", 684 | " axis.line.y = element_line(),\n", 685 | " axis.line.x = element_blank()) +\n", 686 | " #scale_x_continuous(expand=c(0,0)) +\n", 687 | " scale_y_continuous(expand=c(0,0))\n", 688 | "#p2\n", 689 | "\n", 690 | "\n", 691 | "# plot fold change\n", 692 | "df2 <- p.res$data\n", 693 | "df2$y <- p.res$data$geneList[df2$x]\n", 694 | "df2$gsym <- p.res$data$gsym[df2$x]\n", 695 | "\n", 696 | "#head(df2)\n", 697 | "\n", 698 | "# extract fold change\n", 699 | "selectgenes <- data.frame(gsym = selectedGeneID)\n", 700 | "selectgenes <- merge(selectgenes, df2, by = \"gsym\")\n", 701 | "selectgenes <- selectgenes[selectgenes$position == 1,]\n", 702 | "head(selectgenes)\n", 703 | "\n", 704 | "\n", 705 | "p.pos <- ggplot(selectgenes, aes(x, y, fill = Description, color = Description, label = gsym)) + \n", 706 | " geom_segment(data=df2, aes_(x=~x, xend=~x, y=~y, yend=0), \n", 707 | " color = \"grey\") +\n", 708 | " geom_bar(position = \"dodge\", stat = \"identity\") +\n", 709 | " scale_fill_manual(values = mycol, guide=FALSE) + \n", 710 | " scale_color_manual(values = mycol, guide=FALSE) + \n", 711 | "\n", 712 | " #scale_x_continuous(expand=c(0,0)) +\n", 713 | " geom_hline(yintercept = 0, lty = 2, lwd = 0.2) +\n", 714 | " ylab(\"Ranked list\\n metric\") +\n", 715 | " xlab(\"Rank in ordered dataset\") +\n", 716 | " \n", 717 | " theme_bw() +\n", 718 | " theme(axis.text.y=element_text(size = 12, face = \"bold\"),\n", 719 | " panel.grid = element_blank()) +\n", 720 | "\n", 721 | " # show gene name\n", 722 | " geom_text_repel(data = selectgenes, \n", 723 | " show.legend = FALSE, \n", 724 | " direction = \"x\", \n", 725 | " ylim = c(2, NA), \n", 726 | " angle = 90, \n", 727 | " size = 2.5, box.padding = unit(0.35, \"lines\"), \n", 728 | " point.padding = unit(0.3, \"lines\")) +\n", 729 | " theme(plot.margin=margin(t = -.1, r = .2, b=.2, l=.2, unit=\"cm\"))\n", 730 | "#p.pos\n", 731 | "\n", 732 | "library(\"cowplot\")\n", 733 | "# group image\n", 734 | "plotlist <- list(p.res, p2, p.pos)\n", 735 | "n <- length(plotlist)\n", 736 | "plotlist[[n]] <- plotlist[[n]] +\n", 737 | " theme(axis.line.x = element_line(),\n", 738 | " axis.ticks.x = element_line(),\n", 739 | " axis.line.y = element_line(),\n", 740 | " axis.text.x = element_text(size = 12, face = \"bold\"))\n", 741 | "\n", 742 | "plot_grid(plotlist = plotlist, ncol = 1, align=\"v\", rel_heights = rel_heights)\n" 743 | ] 744 | } 745 | ], 746 | "metadata": { 747 | "kernelspec": { 748 | "display_name": "Python [conda env:sceasy]", 749 | "language": "python", 750 | "name": "conda-env-sceasy-py" 751 | }, 752 | "language_info": { 753 | "codemirror_mode": { 754 | "name": "ipython", 755 | "version": 3 756 | }, 757 | "file_extension": ".py", 758 | "mimetype": "text/x-python", 759 | "name": "python", 760 | "nbconvert_exporter": "python", 761 | "pygments_lexer": "ipython3", 762 | "version": "3.9.18" 763 | }, 764 | "toc": { 765 | "base_numbering": 1, 766 | "nav_menu": {}, 767 | "number_sections": true, 768 | "sideBar": true, 769 | "skip_h1_title": false, 770 | "title_cell": "Table of Contents", 771 | "title_sidebar": "Contents", 772 | "toc_cell": false, 773 | "toc_position": {}, 774 | "toc_section_display": true, 775 | "toc_window_display": false 776 | } 777 | }, 778 | "nbformat": 4, 779 | "nbformat_minor": 5 780 | } 781 | -------------------------------------------------------------------------------- /notebooks/Main Figures/Fig. 6.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "id": "1ad823ec", 7 | "metadata": {}, 8 | "outputs": [], 9 | "source": [ 10 | "import scanpy as sc\n", 11 | "import pandas as pd\n", 12 | "import numpy as np\n", 13 | "import anndata\n", 14 | "from matplotlib import rcParams\n", 15 | "sc.set_figure_params(dpi=300, color_map='viridis')\n", 16 | "sc.settings.verbosity = 2" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": null, 22 | "id": "8dfc1c84", 23 | "metadata": {}, 24 | "outputs": [], 25 | "source": [ 26 | "%pylab inline\n", 27 | "import warnings\n", 28 | "warnings.filterwarnings(\"ignore\")\n", 29 | "from glob import iglob\n", 30 | "from tqdm import tqdm" 31 | ] 32 | }, 33 | { 34 | "cell_type": "code", 35 | "execution_count": null, 36 | "id": "652adfb4", 37 | "metadata": {}, 38 | "outputs": [], 39 | "source": [ 40 | "%matplotlib inline" 41 | ] 42 | }, 43 | { 44 | "cell_type": "code", 45 | "execution_count": null, 46 | "id": "79f7bcf1", 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [ 50 | "##scanpy2matrix\n", 51 | "adata= sc.read(\"Fig4a.h5\")\n", 52 | "def anndata_to_10x(adata:sc.AnnData, _dir):\n", 53 | " from scipy.io import mmwrite\n", 54 | " from os.path import join, exists\n", 55 | " from os import makedirs\n", 56 | " if not exists(_dir):\n", 57 | " makedirs(_dir)\n", 58 | " X = adata.X.T.tocoo()\n", 59 | " mmwrite(join(_dir, 'matrix.mtx'), X)\n", 60 | " gene_df = adata.var\n", 61 | " gene_df['ENS-0-0'] = gene_df.index\n", 62 | " gene_df.index = gene_df.index.values.tolist() \n", 63 | " gene_df.drop('ENS-0-0', axis=1, inplace=True)\n", 64 | " gene_df.to_csv(join(_dir, 'genes.tsv'), sep='\\t', header=False, index=True)\n", 65 | " adata.obs.to_csv(join(_dir, 'barcodes.tsv'), sep='\\t', header=False, index=True)\n", 66 | "\n", 67 | "anndata_to_10x(adata, './scanpy_10x')" 68 | ] 69 | }, 70 | { 71 | "cell_type": "code", 72 | "execution_count": null, 73 | "id": "a1987526", 74 | "metadata": {}, 75 | "outputs": [], 76 | "source": [ 77 | "###write metadata\n", 78 | "cell_metadata = adata.obs\n", 79 | "cell_metadata\n", 80 | "cell_metadata.to_csv(\"cell_metadata.csv\", index=True)" 81 | ] 82 | }, 83 | { 84 | "cell_type": "code", 85 | "execution_count": null, 86 | "id": "8b02b965", 87 | "metadata": {}, 88 | "outputs": [], 89 | "source": [ 90 | "%%R\n", 91 | "Sys.setenv(LANGUAGE = \"en\")\n", 92 | "options(stringsAsFactors = FALSE)\n", 93 | "library(Seurat)\n", 94 | "data <- Read10X(data.dir =\"~/scanpy_10x\")\n", 95 | "seurat_obj <- CreateSeuratObject(counts = data, min.cells = 0, min.features = 0, assay = 'RNA')\n", 96 | "metadata <- read.csv(\"cell_metadata.csv\",header=T,row.names=1)\n", 97 | "seurat_obj@meta.data<-metadata\n", 98 | "saveRDS(seurat_obj,file=\"seurat_obj.rds\")\n", 99 | "##split by region\n", 100 | "seurat_obj <- readRDS(\"seurat_obj.rds\")\n", 101 | "sce <- SplitObject(seurat_obj, split.by = \"region\")\n", 102 | "sce\n", 103 | "Idents(sce[[\"Prefrontal cortex\"]])<-\"Celltype\"\n", 104 | "My_levels <- c(\"Oligodendrocyte precursor\", \"Oligodendrocyte\", \"Newly formed oligodendrocytes\", \"Astrocyte\", \"Microglia\", \"Microglia(PCDH9high)\", \"Vascular leptomeningeal cell\", \"Fibroblast\", \"Endothelial\", \"GABAergic\", \"Glutamatergic\", \"Glutamatergic(Pyr)\")\n", 105 | "Idents(sce[[\"Prefrontal cortex\"]]) <- factor(Idents(sce[[\"Prefrontal cortex\"]]), levels= My_levels)\n", 106 | "levels(Idents(sce[[\"Prefrontal cortex\"]]))\n", 107 | "saveRDS(sce[[\"Prefrontal cortex\"]],file=\"PFC_input.rds\")\n", 108 | "\n", 109 | "##region2\n", 110 | "Idents(sce[[\"Hippocampus\"]])<-\"Celltype\"\n", 111 | "My_levels <- c(\"Oligodendrocyte precursor\", \"Oligodendrocyte\", \"Newly formed oligodendrocytes\", \"Astrocyte\", \"Microglia\", \"Microglia(PCDH9high)\", \"Vascular leptomeningeal cell\", \"Fibroblast\", \"Endothelial\", \"GABAergic\", \"Glutamatergic\", \"Glutamatergic(Pyr)\")\n", 112 | "Idents(sce[[\"Hippocampus\"]]) <- factor(Idents(sce[[\"Hippocampus\"]]), levels= My_levels)\n", 113 | "levels(Idents(sce[[\"Hippocampus\"]]))\n", 114 | "saveRDS(sce[[\"Hippocampus\"]],file=\"Hippo_input.rds\")\n", 115 | "\n", 116 | "rm(list=ls())\n", 117 | "gc()\n", 118 | "library(CellChat)\n", 119 | "library(ggplot2) \n", 120 | "library(patchwork)\n", 121 | "library(igraph)\n", 122 | "PFC <- readRDS(\"PFC_input.rds\")\n", 123 | "PFC.data.input <- GetAssayData(PFC, assay = \"RNA\", slot = \"data\")\n", 124 | "PFC.identity <- subset(PFC@meta.data, select = \"Celltype\")\n", 125 | "cellchat <- createCellChat(object = PFC.data.input, meta = PFC.identity, group.by = \"Celltype\")\n", 126 | "cellchat <- addMeta(cellchat, meta = PFC.identity, meta.name = \"labels\")\n", 127 | "cellchat <- setIdent(cellchat, ident.use = \"labels\") \n", 128 | "levels(cellchat@idents)\n", 129 | "My_levels <- c(\"Oligodendrocyte precursor\", \"Oligodendrocyte\", \"Newly formed oligodendrocytes\", \"Astrocyte\", \"Microglia\", \"Microglia(PCDH9high)\", \"Vascular leptomeningeal cell\", \"Fibroblast\", \"Endothelial\", \"GABAergic\", \"Glutamatergic\", \"Glutamatergic(Pyr)\")\n", 130 | "cellchat@idents <- factor(cellchat@idents, levels= My_levels)\n", 131 | "levels(cellchat@idents)\n", 132 | "groupSize <- as.numeric(table(cellchat@idents))\n", 133 | "#Set the ligand-receptor interaction database\n", 134 | "CellChatDB <- CellChatDB.human \n", 135 | "showDatabaseCategory(CellChatDB)\n", 136 | "#ggsave(\"cellchat.human.summary.pdf\",width = 8, height = 7)\n", 137 | "setwd(\"./Cellchat\")\n", 138 | "dplyr::glimpse(CellChatDB$interaction)\n", 139 | "CellChatDB.use <- subsetDB(CellChatDB, search = c(\"Secreted Signaling\",\"ECM-Receptor\",\"Cell-Cell Contact\" ))\n", 140 | "cellchat@DB <- CellChatDB.use \n", 141 | "cellchat <- subsetData(cellchat)\n", 142 | "cellchat <- identifyOverExpressedGenes(cellchat)\n", 143 | "cellchat <- identifyOverExpressedInteractions(cellchat)\n", 144 | "cellchat <- projectData(cellchat, PPI.human )\n", 145 | "cellchat <- computeCommunProb(cellchat)\n", 146 | "cellchat <- filterCommunication(cellchat, min.cells = 10)\n", 147 | "cellchat <- computeCommunProbPathway(cellchat)\n", 148 | "cellchat <- aggregateNet(cellchat)\n", 149 | "levels(cellchat@idents)\n", 150 | "groupSize <- as.numeric(table(cellchat@idents))\n", 151 | "par(mfrow = c(1,2), xpd=TRUE)\n", 152 | "netVisual_circle(cellchat@net$count, vertex.weight = groupSize, weight.scale = T, label.edge= F, title.name = \"Number of interactions\",color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 153 | "netVisual_circle(cellchat@net$weight, vertex.weight = groupSize, weight.scale = T, label.edge= F, title.name = \"Interaction weights/strength\",color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 154 | "\n", 155 | "weight<-as.data.frame(cellchat@net$weight)\n", 156 | "write.table(weight,file=\"weight_Cerebral.xls\",sep=\"\\t\")\n", 157 | "count<-as.data.frame(cellchat@net$count)\n", 158 | "write.table(count,file=\"count_Cerebral.xls\",sep=\"\\t\")\n", 159 | "netP<-as.data.frame(cellchat@netP[[\"prob\"]])\n", 160 | "write.table(netP,file=\"netP_Cerebral.xls\",sep=\"\\t\")\n", 161 | "\n", 162 | "# Access all the signaling pathways showing significant communications\n", 163 | "pathways.show.all <- cellchat@netP$pathways\n", 164 | "# check the order of cell identity to set suitable vertex.receiver\n", 165 | "levels(cellchat@idents)\n", 166 | "vertex.receiver = seq(1,4)\n", 167 | "for (i in 1:length(pathways.show.all)) {\n", 168 | " # Visualize communication network associated with both signaling pathway and individual L-R pairs\n", 169 | " netVisual(cellchat, signaling = pathways.show.all[i], vertex.receiver = vertex.receiver, layout = \"hierarchy\")\n", 170 | " # Compute and visualize the contribution of each ligand-receptor pair to the overall signaling pathway\n", 171 | " gg <- netAnalysis_contribution(cellchat, signaling = pathways.show.all[i])\n", 172 | " ggsave(filename=paste0(pathways.show.all[i], \"_L-R_contribution.pdf\"), plot=gg, width = 3, height = 2, units = 'in', dpi = 300)\n", 173 | "}\n", 174 | "\n", 175 | "##Compute and visualize the network centrality scores\n", 176 | "#cellchat <- netAnalysis_computeCentrality(cellchat, slot.name = \"netP\")\n", 177 | "#netAnalysis_signalingRole_network(cellchat, signaling = pathways.show, width = 8, height = 2.5, font.size = 10,color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 178 | "\n", 179 | "ht1 <- netAnalysis_signalingRole_heatmap(cellchat, pattern = \"outgoing\",width = 8, height = 14, color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 180 | "ht2 <- netAnalysis_signalingRole_heatmap(cellchat, pattern = \"incoming\",width = 8, height = 14,color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 181 | "ht1 + ht2\n", 182 | "#10,15\n", 183 | "saveRDS(cellchat,file = 'PFC.cellchat.rds')\n", 184 | "##region2\n", 185 | "rm(list=ls())\n", 186 | "library(CellChat)\n", 187 | "library(ggplot2) \n", 188 | "library(patchwork)\n", 189 | "library(igraph)\n", 190 | "library(Seurat)\n", 191 | "Hippo <- readRDS(\"Hippo_input.rds\")\n", 192 | "Hippo.data.input <- GetAssayData(Hippo, assay = \"RNA\", slot = \"data\")\n", 193 | "Hippo.identity <- subset(Hippo@meta.data, select = \"Celltype\")\n", 194 | "cellchat <- createCellChat(object = Hippo.data.input, meta = Hippo.identity, group.by = \"Celltype\")\n", 195 | "cellchat <- addMeta(cellchat, meta = Hippo.identity, meta.name = \"labels\")\n", 196 | "cellchat <- setIdent(cellchat, ident.use = \"labels\") \n", 197 | "levels(cellchat@idents)\n", 198 | "My_levels <- c(\"Oligodendrocyte precursor\", \"Oligodendrocyte\", \"Newly formed oligodendrocytes\", \"Astrocyte\", \"Microglia\", \"Microglia(PCDH9high)\", \"Vascular leptomeningeal cell\", \"Fibroblast\", \"Endothelial\", \"GABAergic\", \"Glutamatergic\", \"Glutamatergic(Pyr)\")\n", 199 | "cellchat@idents <- factor(cellchat@idents, levels= My_levels)\n", 200 | "levels(cellchat@idents)\n", 201 | "groupSize <- as.numeric(table(cellchat@idents))\n", 202 | "#Set the ligand-receptor interaction database\n", 203 | "CellChatDB <- CellChatDB.human \n", 204 | "showDatabaseCategory(CellChatDB)\n", 205 | "dplyr::glimpse(CellChatDB$interaction)\n", 206 | "CellChatDB.use <- subsetDB(CellChatDB, search = c(\"Secreted Signaling\",\"ECM-Receptor\",\"Cell-Cell Contact\" ))\n", 207 | "cellchat@DB <- CellChatDB.use \n", 208 | "cellchat <- subsetData(cellchat)\n", 209 | "cellchat <- identifyOverExpressedGenes(cellchat)\n", 210 | "cellchat <- identifyOverExpressedInteractions(cellchat)\n", 211 | "cellchat <- projectData(cellchat, PPI.human )\n", 212 | "cellchat <- computeCommunProb(cellchat)\n", 213 | "cellchat <- filterCommunication(cellchat, min.cells = 10)\n", 214 | "cellchat <- computeCommunProbPathway(cellchat)\n", 215 | "cellchat <- aggregateNet(cellchat)\n", 216 | "levels(cellchat@idents)\n", 217 | "groupSize <- as.numeric(table(cellchat@idents))\n", 218 | "setwd(\"./Cellchat\")\n", 219 | "par(mfrow = c(1,2), xpd=TRUE)\n", 220 | "netVisual_circle(cellchat@net$count, vertex.weight = groupSize, weight.scale = T, label.edge= F, title.name = \"Number of interactions\",color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 221 | "netVisual_circle(cellchat@net$weight, vertex.weight = groupSize, weight.scale = T, label.edge= F, title.name = \"Interaction weights/strength\",color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 222 | "\n", 223 | "weight<-as.data.frame(cellchat@net$weight)\n", 224 | "write.table(weight,file=\"weight_Hippo.xls\",sep=\"\\t\")\n", 225 | "count<-as.data.frame(cellchat@net$count)\n", 226 | "write.table(count,file=\"count_Hippo.xls\",sep=\"\\t\")\n", 227 | "netP<-as.data.frame(cellchat@netP[[\"prob\"]])\n", 228 | "write.table(netP,file=\"netP_Hippo.xls\",sep=\"\\t\")\n", 229 | "\n", 230 | "# Access all the signaling pathways showing significant communications\n", 231 | "pathways.show.all <- cellchat@netP$pathways\n", 232 | "# check the order of cell identity to set suitable vertex.receiver\n", 233 | "levels(cellchat@idents)\n", 234 | "vertex.receiver = seq(1,4)\n", 235 | "for (i in 1:length(pathways.show.all)) {\n", 236 | " # Visualize communication network associated with both signaling pathway and individual L-R pairs\n", 237 | " netVisual(cellchat, signaling = pathways.show.all[i], vertex.receiver = vertex.receiver, layout = \"hierarchy\")\n", 238 | " # Compute and visualize the contribution of each ligand-receptor pair to the overall signaling pathway\n", 239 | " gg <- netAnalysis_contribution(cellchat, signaling = pathways.show.all[i])\n", 240 | " ggsave(filename=paste0(pathways.show.all[i], \"_L-R_contribution.pdf\"), plot=gg, width = 3, height = 2, units = 'in', dpi = 300)\n", 241 | "}\n", 242 | "\n", 243 | "##Compute and visualize the network centrality scores\n", 244 | "#cellchat <- netAnalysis_computeCentrality(cellchat, slot.name = \"netP\")\n", 245 | "#netAnalysis_signalingRole_network(cellchat, signaling = pathways.show, width = 8, height = 2.5, font.size = 10,color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 246 | "ht1 <- netAnalysis_signalingRole_heatmap(cellchat, pattern = \"outgoing\",width = 8, height = 14, color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 247 | "ht2 <- netAnalysis_signalingRole_heatmap(cellchat, pattern = \"incoming\",width = 8, height = 14,color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 248 | "ht1 + ht2\n", 249 | "saveRDS(cellchat,file = 'Hippo.cellchat.rds')\n", 250 | "rm(list=ls())\n", 251 | "library(CellChat)\n", 252 | "library(ggplot2) \n", 253 | "library(patchwork)\n", 254 | "library(igraph)\n", 255 | "library(Seurat)\n", 256 | "##merge 2 regions\n", 257 | "PFC<-readRDS(\"PFC.cellchat.rds\")\n", 258 | "PFC <- updateCellChat(PFC)\n", 259 | "Hippo<-readRDS(\"Hippo.cellchat.rds\")\n", 260 | "Hippo <- updateCellChat(Hippo)\n", 261 | "levels(Hippo@idents)\n", 262 | "My_levels <- c(\"Oligodendrocyte precursor\", \"Oligodendrocyte\", \"Newly formed oligodendrocytes\", \"Astrocyte\", \"Microglia\", \"Microglia(PCDH9high)\", \"Vascular leptomeningeal cell\", \"Fibroblast\", \"Endothelial\", \"GABAergic\", \"Glutamatergic\", \"Glutamatergic(Pyr)\")\n", 263 | "Hippo@idents <- factor(Hippo@idents, levels= My_levels)\n", 264 | "levels(Hippo@idents)\n", 265 | "levels(PFC@idents)\n", 266 | "My_levels <- c(\"Oligodendrocyte precursor\", \"Oligodendrocyte\", \"Newly formed oligodendrocytes\", \"Astrocyte\", \"Microglia\", \"Microglia(PCDH9high)\", \"Vascular leptomeningeal cell\", \"Fibroblast\", \"Endothelial\", \"GABAergic\", \"Glutamatergic\", \"Glutamatergic(Pyr)\")\n", 267 | "PFC@idents <- factor(PFC@idents, levels= My_levels)\n", 268 | "levels(PFC@idents)\n", 269 | "PFC <- updateCellChat(PFC)\n", 270 | "Hippo <- updateCellChat(Hippo)\n", 271 | "PFC <- updateCellChat(PFC)\n", 272 | "Hippo <- updateCellChat(Hippo)\n", 273 | "group.new = levels(Hippo@idents)\n", 274 | "PFC <- liftCellChat(PFC, group.new)\n", 275 | "object.list <- list(PFC = PFC, Hippo = Hippo)\n", 276 | "cellchat <- mergeCellChat(object.list, add.names = names(object.list), cell.prefix = TRUE)\n", 277 | "#object.list <- list(PFC = PFC, Hippo = Hippo)\n", 278 | "#cellchat <- mergeCellChat(object.list, add.names = names(object.list))\n", 279 | "#Fig.7a/b\n", 280 | "par(mfrow = c(1,2), xpd=TRUE)\n", 281 | "netVisual_diffInteraction(cellchat, weight.scale = T,color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 282 | "netVisual_diffInteraction(cellchat, weight.scale = T, measure = \"weight\",color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 283 | "ggsave(filename=\"interaction_circle2.pdf\",width = 12, height = 7)\n", 284 | "#Fig.7c/d\n", 285 | "weight.max <- getMaxWeight(object.list, attribute = c(\"idents\",\"count\"))\n", 286 | "par(mfrow = c(1,2), xpd=TRUE)\n", 287 | "for (i in 1:length(object.list)) {\n", 288 | " netVisual_circle(object.list[[i]]@net$count, weight.scale = T, label.edge= F, color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"),edge.weight.max = weight.max[2], edge.width.max = 12, title.name = paste0(\"Number of interactions - \", names(object.list)[i]))\n", 289 | "}\n", 290 | "\n", 291 | "#Fig.7e\n", 292 | "gg1 <- rankNet(cellchat, mode = \"comparison\", stacked = T, do.stat = TRUE,color.use=c(\"#B3128A\",\"#74CAFF\"))\n", 293 | "gg2 <- rankNet(cellchat, mode = \"comparison\", stacked = F, do.stat = TRUE,color.use=c(\"#B3128A\",\"#74CAFF\"))\n", 294 | "p3=gg1 + gg2\n", 295 | "p3\n", 296 | "ggsave(filename=\"flow.pdf\",plot=p3, width = 12, height = 8)\n", 297 | "\n", 298 | "#Supplemental Table 6.xlsx\n", 299 | "g1<-netVisual_bubble(cellchat, sources.use = c(1,2,3,4,5,6,7,8,9,10,11,12), targets.use = c(1,2,3,4,5,6,7,8,9,10,11,12), comparison = c(1, 2), angle.x = 45,color.text=c(\"#B3128A\",\"#74CAFF\"))\n", 300 | "g1data<-as.data.frame(g1$data)\n", 301 | "write.table(g1data,file=\"All_ineration_info.xls\",sep=\"\\t\")\n", 302 | "saveRDS(cellchat,file = 'Merge.cellchat.rds')\n", 303 | "\n", 304 | "#Fig.7f\n", 305 | "num.link <- sapply(object.list, function(x) {rowSums(x@net$count) + colSums(x@net$count)-diag(x@net$count)})\n", 306 | "weight.MinMax <- c(min(num.link), max(num.link)) # control the dot size in the different datasets\n", 307 | "gg <- list()\n", 308 | "for (i in 1:length(object.list)) {\n", 309 | " gg[[i]] <- netAnalysis_signalingRole_scatter(object.list[[i]], title = names(object.list)[i], weight.MinMax = weight.MinMax, color.use=c(\"#006091\", \"#5C89CC\", \"#74caff\", \"#AFE1AF\", \"#F0E68C\", \"#B2E71A\", \"#8B8000\", \"#D2B48C\", \"#50C878\", \"#E30B5C\", \"#CC5500\", \"#FA5F55\"))\n", 310 | "}\n", 311 | "\n", 312 | "p1=patchwork::wrap_plots(plots = gg)\n", 313 | "ggsave(filename=\"major_scatter.pdf\",plot=p1, width = 8, height = 4)\n", 314 | "\n", 315 | "#Fig.7g\n", 316 | "gg1 <- netAnalysis_signalingChanges_scatter(cellchat, idents.use = \"Microglia(PCDH9high)\", color.use = c(\"#7AB000\", \"#B3128A\",\"#74CAFF\"))\n", 317 | "gg1data<-as.data.frame(gg1$data)\n", 318 | "write.table(gg1data,file=\"Microglia(PCDH9high)_scatter_info.xls\",sep=\"\\t\")\n", 319 | "ggsave(filename=\"Microglia(PCDH9high)_scatter.pdf\",plot=gg1, width = 6, height = 4)\n", 320 | "\n", 321 | "#Fig.7h\n", 322 | "#from all senders to Microglia2\n", 323 | "pairLR.use <- extractEnrichedLR(cellchat, signaling = c(\"NRG\",\"CADM\",\"NEGR\",\"LAMININ\"))\n", 324 | "netVisual_bubble(cellchat, sources.use = c(1:12), targets.use = 6, pairLR.use = pairLR.use, remove.isolate = TRUE, comparison = c(1, 2), angle.x = 45,thresh=0.05)\n", 325 | "# filter p-value> 0.05\n", 326 | "netVisual_bubble(Hippo, sources.use = c(1:12), targets.use = 6, pairLR.use = pairLR.use, remove.isolate = TRUE)\n", 327 | "\n", 328 | "#Fig.7i\n", 329 | "#from Microglia(PCDH9high) to receivers\n", 330 | "pairLR.use <- extractEnrichedLR(cellchat, signaling = c(\"NRG\",\"CADM\",\"NEGR\",\"LAMININ\"))\n", 331 | "netVisual_bubble(cellchat, sources.use = 6, targets.use = c(1:12), pairLR.use = pairLR.use, remove.isolate = TRUE, comparison = c(1, 2), angle.x = 45)\n", 332 | "# filter p-value> 0.05\n", 333 | "netVisual_bubble(Hippo, sources.use = 6, targets.use = c(1:12), pairLR.use = pairLR.use, remove.isolate = TRUE)\n" 334 | ] 335 | } 336 | ], 337 | "metadata": { 338 | "kernelspec": { 339 | "display_name": "Python [conda env:sceasy]", 340 | "language": "python", 341 | "name": "conda-env-sceasy-py" 342 | }, 343 | "language_info": { 344 | "codemirror_mode": { 345 | "name": "ipython", 346 | "version": 3 347 | }, 348 | "file_extension": ".py", 349 | "mimetype": "text/x-python", 350 | "name": "python", 351 | "nbconvert_exporter": "python", 352 | "pygments_lexer": "ipython3", 353 | "version": "3.9.18" 354 | }, 355 | "toc": { 356 | "base_numbering": 1, 357 | "nav_menu": {}, 358 | "number_sections": true, 359 | "sideBar": true, 360 | "skip_h1_title": false, 361 | "title_cell": "Table of Contents", 362 | "title_sidebar": "Contents", 363 | "toc_cell": false, 364 | "toc_position": {}, 365 | "toc_section_display": true, 366 | "toc_window_display": false 367 | } 368 | }, 369 | "nbformat": 4, 370 | "nbformat_minor": 5 371 | } 372 | -------------------------------------------------------------------------------- /results/Supplementary Table 1.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/results/Supplementary Table 1.xlsx -------------------------------------------------------------------------------- /results/Supplementary Table 2.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/results/Supplementary Table 2.xlsx -------------------------------------------------------------------------------- /results/Supplementary Table 3.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/results/Supplementary Table 3.xlsx -------------------------------------------------------------------------------- /results/Supplementary Table 4.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/results/Supplementary Table 4.xlsx -------------------------------------------------------------------------------- /results/Supplementary Table 5.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/results/Supplementary Table 5.xlsx -------------------------------------------------------------------------------- /results/Supplementary Table 6.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/results/Supplementary Table 6.xlsx -------------------------------------------------------------------------------- /results/Supplementary Table 7.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/results/Supplementary Table 7.xlsx -------------------------------------------------------------------------------- /results/Supplementary Table 8.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rnacentre/BrainCellAtlas-reproducibility/927b94d3357626e8d7403e9f1894ab53c3bfec0d/results/Supplementary Table 8.xlsx -------------------------------------------------------------------------------- /scripts/NPC_DEG_analysis.r: -------------------------------------------------------------------------------- 1 | #edgeR 2 | library(Libra) 3 | library(MAST) 4 | library(Seurat) 5 | library(dplyr) 6 | library(EnhancedVolcano) 7 | library(stringr) 8 | library(tidyverse) 9 | library(edgeR) 10 | library(readxl) 11 | library(ggvenn) 12 | 13 | edgeR_DE <- function(counts, group, design, cont, n_top_genes = Inf, method = 'TMM') { 14 | y <- DGEList(counts = counts, group = group) %>% 15 | calcNormFactors(method = method) %>% 16 | estimateDisp(design) 17 | 18 | fit <- glmFit(y, design = design) 19 | if (is.null(cont)) { 20 | test <- glmLRT(fit) 21 | } else { 22 | contrast <- makeContrasts(contrasts = cont, levels = design) 23 | test <- glmLRT(fit, contrast = contrast) 24 | } 25 | res <- topTags(test, n = n_top_genes) %>% 26 | as.data.frame() %>% 27 | rownames_to_column('gene') 28 | 29 | return(res) 30 | } 31 | 32 | npc_meta = readRDS('npc/data/annot.rds') 33 | i = 'NPC' 34 | npc$sample_group = ifelse(npc$state==i, i, "Others") 35 | npc$sample_group = factor(npc$sample_group, levels = c('Others', i)) 36 | mat = to_pseudobulk(npc, cell_type_col = "group", label_col = "sample_group", replicate_col = 'sampleID') 37 | 38 | group = npc@meta.data %>% distinct(sampleID, sample_group, .keep_all = T) %>% select(sampleID, sample_group) %>% remove_rownames() 39 | rownames(group) = paste0(group$sampleID,':',group$sample_group) 40 | group 41 | 42 | counts = mat[[1]][rownames(group)] 43 | counts 44 | 45 | group$sampleID = as.character(group$sampleID) 46 | group$sampleID %>% unique 47 | 48 | # for TMM 49 | design <- model.matrix(~ 50 | sampleID+ 51 | sample_group, data = group) 52 | 53 | resTmm = edgeR_DE(counts, group = group$group, design, method = 'TMM', cont = 'sample_groupNPC') 54 | write.csv(resTmm, 'npc/results/npc_rmdonor_DEG.csv') 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | library(ggplot2) 67 | library(org.Hs.eg.db) 68 | library(clusterProfiler) 69 | library(stringr) 70 | library(purrr) 71 | library(Seurat) 72 | 73 | library(sceasy) 74 | ad = convertFormat("~/projA/data/hipngs/hm3f4a_noBr_hip_integration_rmPyr_Micro_qc1_reharmony_anno_a2n_sp100.h5ad", from="anndata", to="seurat", outFile=NULL) 75 | obs<-ad@meta.data 76 | 77 | 78 | 79 | #all NPC 80 | deg_all_npc<-FindMarkers(ad,ident.1 = "NPC", group.by = "anno",test.use = "wilcox",logfc.threshold = 0.1) 81 | write.csv(deg_all_npc,file="~/projA/data/hipngs/hm3f4a_noBr_hip_integration_rmPyr_Micro_qc1_reharmony_anno_a2n_sp100_DEG.csv") 82 | sum((deg_all_npc$p_val_adj<0.05) & (abs(deg_all_npc$avg_log2FC)>0.5)) 83 | write.csv(deg_all_npc[((deg_all_npc$p_val_adj<0.05) & (abs(deg_all_npc$avg_log2FC)>0.5)),],file="~/projA/data/hipngs/hm3f4a_noBr_hip_integration_rmPyr_Micro_qc1_reharmony_anno_a2n_sp100_DEG1.csv") 84 | 85 | 86 | library(EnhancedVolcano) 87 | 88 | EnhancedVolcano(deg_all_npc, 89 | lab = rownames(deg_all_npc), 90 | selectLab = c('UBE2C', 'HMGB2', 'TOP2A'), 91 | x = 'avg_log2FC', 92 | y = 'p_val', 93 | #drawConnectors = TRUE, 94 | #pointSize = 1, 95 | #labSize = 2.5, 96 | xlim = c(-2, 2), 97 | gridlines.major = FALSE, 98 | gridlines.minor = FALSE) 99 | 100 | 101 | 102 | options(repr.plot.width = 4, repr.plot.height = 4) 103 | EnhancedVolcano(deg_all_npc, 104 | lab = rownames(deg_all_npc), 105 | selectLab = c('UBE2C', 'HMGB2', 'TOP2A', 'EOMES', 'CKS2', 'SMC4', 'HES6', 'TUBAIB'), 106 | x = 'avg_log2FC', 107 | y = 'p_val', 108 | #drawConnectors = TRUE, 109 | #pointSize = 1, 110 | #labSize = 2.5, 111 | xlim = c(-2, 2), 112 | gridlines.major = FALSE, 113 | gridlines.minor = FALSE) 114 | 115 | 116 | deg_stage_npc<-lapply(names(table(obs$stage)),function(g){ 117 | ad1<-subset(ad,subset=stage==g) 118 | degdf <- FindMarkers(ad1,ident.1 = "NPC", group.by = "anno",test.use = "wilcox") 119 | return(degdf) 120 | }) 121 | names(deg_stage_npc)<- names(table(obs$stage)) 122 | 123 | 124 | 125 | tmp<-deg_homo_neu[-log10(deg_homo_neu$p_val_adj)<300,] 126 | EnhancedVolcano(tmp, 127 | lab = rownames(tmp), 128 | #selectLab = c('UBE2C', 'HMGB2', 'TOP2A'), 129 | x = 'avg_log2FC', 130 | y = 'p_val_adj', 131 | labhjust = 1, 132 | #drawConnectors = TRUE, 133 | #pointSize = 1, 134 | #labSize = 2.5, 135 | FCcutoff = 0.5, 136 | xlim = c(-1, 1), 137 | gridlines.major = FALSE, 138 | gridlines.minor = FALSE) 139 | 140 | 141 | 142 | display_venn <- function(x, ...){ 143 | library(VennDiagram) 144 | grid.newpage() 145 | venn_object <- venn.diagram(x, filename = NULL, ...) 146 | grid.draw(venn_object) 147 | } 148 | 149 | 150 | 151 | display_venn( 152 | lapply(names(table(obs$stage)),function(i)rownames(deg_stage_npc[[i]])), 153 | category.names = names(table(obs$stage)), 154 | fill = c("#0073C2FF", "#EFC000FF", "#868686FF", "#CD534CFF") 155 | ) 156 | 157 | 158 | degwcx <- lapply(names(table(obs$select)),function(s)FindMarkers(ad,ident.1 = s, group.by = "select",test.use = "wilcox",logfc.threshold = 0.1)) 159 | names(degwcx)<-names(table(obs$select)) 160 | 161 | 162 | --------------------------------------------------------------------------------