############ colormap ###############

colormap_crc98_ct_group = {
    "Tumor cE01 (Stem/TA-like)": "#ff9999",
    "Tumor cE02 (Stem/TA-like/Immature Goblet)": "#ffa599",
    "Tumor cE03 (Stem/TA-like prolif)": "#ecf4dd",
    "Tumor cE04 (Enterocyte 1)": "#ffbd99",
    "Tumor cE05 (Enterocyte 2)": "#d8a7b1",
    "Tumor cE06 (Immature Goblet)": "#ffd699",
    "Tumor cE07 (Goblet/Enterocyte)": "#ffe299",
    "Tumor cE08 (Goblet)": "#ffee99",
    "Tumor cE09 (Best4)": "#fffa99",
    "Tumor cE10 (Tuft)": "#f6ff99",
    "Tumor cE11 (Enteroendocrine)": "#fe817d",
    "cB1 (B IGD+IgM+)": "#b2e87c",
    "cB2 (B GC-like)": "#aee87c",
    "cB3 (B CD40+ GC-like)": "#aae87c",
    "cE01 (Stem/TA-like)": "#a6e87c",
    "cE02 (Stem/TA-like/Immature Goblet)": "#a2e87c",
    "cE03 (Stem/TA-like prolif)": "#9de87c",
    "cE04 (Enterocyte 1)": "#99e87c",
    "cE05 (Enterocyte 2)": "#95e87c",
    "cE06 (Immature Goblet)": "#91e87c",
    "cE07 (Goblet/Enterocyte)": "#8de87c",
    "cE08 (Goblet)": "#89e87c",
    "cE09 (Best4)": "#85e87c",
    "cE10 (Tuft)": "#81e87c",
    "cE11 (Enteroendocrine)": "#7de87c",
    "cM01 (Monocyte)": "#00a087",
    "cM02 (Macrophage-like)": "#aed185",
    "cM03 (DC1)": "#7ce889",
    "cM04 (DC2)": "#7ce88d",
    "cM05 (DC2 C1Q+)": "#7ce891",
    "cM06 (DC IL22RA2)": "#7ce895",
    "cM07 (pDC)": "#7ce899",
    "cM08 (AS-DC)": "#7ce89d",
    "cM09 (mregDC)": "#7ce8a1",
    "cM10 (Granulocyte)": "#7ce8a5",
    "cMA01 (Mast)": "#7ce8aa",
    "cP1 (Plasma IgA)": "#7ce8ae",
    "cP2 (Plasma IgG)": "#efbb8a",
    "cP3 (Plasma IgG prolif)": "#af6c63",
    "cS01 (Endo arterial)": "#7ce8ba",
    "cS02 (Endo capillary)": "#7ce8be",
    "cS03 (Endo capillary)": "#c1e8ee",
    "cS04 (Endo)": "#92b4c8",
    "cS05 (Endo venous)": "#7ce8ca",
    "cS06 (Endo lymphatic)": "#7ce8cf",
    "cS07 (Endo capillary-like)": "#7ce8d3",
    "cS08 (Endo arterial-like)": "#7ce8d7",
    "cS09 (Endo)": "#7ce8db",
    "cS10 (Endo tip cells)": "#7ce8df",
    "cS11 (Endo proif)": "#7ce8e3",
    "cS12 (Endo)": "#7ce8e7",
    "cS13 (Endo venous-like)": "#7ce4e8",
    "cS14 (Endo)": "#9ec1d4",
    "cS15 (Pericyte)": "#7cdce8",
    "cS16 (Pericyte)": "#7cd7e8",
    "cS17 (Pericyte)": "#7cd3e8",
    "cS18 (Pericyte)": "#7ccfe8",
    "cS19 (Pericyte)": "#7ccbe8",
    "cS20 (Pericyte prolif)": "#7cc7e8",
    "cS21 (Fibro stem cell niche)": "#7cc3e8",
    "cS22 (Fibro stem cell niche)": "#7cbfe8",
    "cS23 (Fibro BMP-producing)": "#7cbbe8",
    "cS24 (Fibro BMP-producing)": "#7cb7e8",
    "cS25 (Fibro CCL8+)": "#7cb2e8",
    "cS26 (Myofibro)": "#7caee8",
    "cS27 (CXCL14+ CAF)": "#7caae8",
    "cS28 (GREM1+ CAF)": "#7ca6e8",
    "cS29 (MMP3+ CAF)": "#7ca2e8",
    "cS30 (CAF CCL8 Fibro-like)": "#7c9ee8",
    "cS31 (CAF stem niche Fibro-like)": "#7c9ae8",
    "cS32 (Smooth Muscle)": "#7c96e8",
    "cS33 (Schwann)": "#7c92e8",
    "cTNI01 (CD4+ IL7R+)": "#7c8ee8",
    "cTNI02 (CD4+ IL7R+SELL+)": "#7c89e8",
    "cTNI03 (CD4+ IL7R+HSP+)": "#7c85e8",
    "cTNI04 (CD4+ IL7R+CCL5+)": "#7c81e8",
    "cTNI05 (CD4+ IL17+)": "#7c7de8",
    "cTNI06 (CD4+ TFH)": "#807ce8",
    "cTNI07 (CD4+ CXCL13+)": "#847ce8",
    "cTNI08 (CD4+ Treg)": "#887ce8",
    "cTNI09 (CD4+ Treg prolif)": "#8c7ce8",
    "cTNI10 (CD8+ IL7R+)": "#907ce8",
    "cTNI11 (CD8+GZMK+)": "#947ce8",
    "cTNI12 (CD8+ IL7R+)": "#997ce8",
    "cTNI13 (CD8+ T IL17+)": "#9d7ce8",
    "cTNI14 (CD8+ CXCL13+)": "#a17ce8",
    "cTNI15 (CD8+ CXCL13+ HSP+)": "#a57ce8",
    "cTNI16 (CD8+ CXCL13+ prolif)": "#a97ce8",
    "cTNI17 (gd-like T)": "#ad7ce8",
    "cTNI18 (gd-like T PDCD1+)": "#b17ce8",
    "cTNI19 (gd-like T prolif)": "#b57ce8",
    "cTNI20 (PLZF+ T)": "#b97ce8",
    "cTNI21 (PLZF+ T prolif)": "#be7ce8",
    "cTNI22 (cTNI22)": "#c27ce8",
    "cTNI23 (NK CD16A+)": "#c67ce8",
    "cTNI24 (NK GZMK+)": "#ca7ce8",
    "cTNI25 (NK XCL1+)": "#ce7ce8",
    "cTNI26 (ILC3)": "#d27ce8",
}

colormap_coloncatlas_98 = {
    "p_ct_Tumor cE01 (Stem/TA-like)": "#ff9999",
    "p_ct_Tumor cE02 (Stem/TA-like/Immature Goblet)": "#ffa599",
    "p_ct_Tumor cE03 (Stem/TA-like prolif)": "#ecf4dd",
    "p_ct_Tumor cE04 (Enterocyte 1)": "#ffbd99",
    "p_ct_Tumor cE05 (Enterocyte 2)": "#d8a7b1",
    "p_ct_Tumor cE06 (Immature Goblet)": "#ffd699",
    "p_ct_Tumor cE07 (Goblet/Enterocyte)": "#ffe299",
    "p_ct_Tumor cE08 (Goblet)": "#ffee99",
    "p_ct_Tumor cE09 (Best4)": "#fffa99",
    "p_ct_Tumor cE10 (Tuft)": "#f6ff99",
    "p_ct_Tumor cE11 (Enteroendocrine)": "#fe817d",
    "p_ct_cB1 (B IGD+IgM+)": "#b2e87c",
    "p_ct_cB2 (B GC-like)": "#aee87c",
    "p_ct_cB3 (B CD40+ GC-like)": "#aae87c",
    "p_ct_cE01 (Stem/TA-like)": "#a6e87c",
    "p_ct_cE02 (Stem/TA-like/Immature Goblet)": "#a2e87c",
    "p_ct_cE03 (Stem/TA-like prolif)": "#9de87c",
    "p_ct_cE04 (Enterocyte 1)": "#99e87c",
    "p_ct_cE05 (Enterocyte 2)": "#95e87c",
    "p_ct_cE06 (Immature Goblet)": "#91e87c",
    "p_ct_cE07 (Goblet/Enterocyte)": "#8de87c",
    "p_ct_cE08 (Goblet)": "#89e87c",
    "p_ct_cE09 (Best4)": "#85e87c",
    "p_ct_cE10 (Tuft)": "#81e87c",
    "p_ct_cE11 (Enteroendocrine)": "#7de87c",
    "p_ct_cM01 (Monocyte)": "#00a087",
    "p_ct_cM02 (Macrophage-like)": "#aed185",
    "p_ct_cM03 (DC1)": "#7ce889",
    "p_ct_cM04 (DC2)": "#7ce88d",
    "p_ct_cM05 (DC2 C1Q+)": "#7ce891",
    "p_ct_cM06 (DC IL22RA2)": "#7ce895",
    "p_ct_cM07 (pDC)": "#7ce899",
    "p_ct_cM08 (AS-DC)": "#7ce89d",
    "p_ct_cM09 (mregDC)": "#7ce8a1",
    "p_ct_cM10 (Granulocyte)": "#7ce8a5",
    "p_ct_cMA01 (Mast)": "#7ce8aa",
    "p_ct_cP1 (Plasma IgA)": "#7ce8ae",
    "p_ct_cP2 (Plasma IgG)": "#efbb8a",
    "p_ct_cP3 (Plasma IgG prolif)": "#af6c63",
    "p_ct_cS01 (Endo arterial)": "#7ce8ba",
    "p_ct_cS02 (Endo capillary)": "#7ce8be",
    "p_ct_cS03 (Endo capillary)": "#c1e8ee",
    "p_ct_cS04 (Endo)": "#92b4c8",
    "p_ct_cS05 (Endo venous)": "#7ce8ca",
    "p_ct_cS06 (Endo lymphatic)": "#7ce8cf",
    "p_ct_cS07 (Endo capillary-like)": "#7ce8d3",
    "p_ct_cS08 (Endo arterial-like)": "#7ce8d7",
    "p_ct_cS09 (Endo)": "#7ce8db",
    "p_ct_cS10 (Endo tip cells)": "#7ce8df",
    "p_ct_cS11 (Endo proif)": "#7ce8e3",
    "p_ct_cS12 (Endo)": "#7ce8e7",
    "p_ct_cS13 (Endo venous-like)": "#7ce4e8",
    "p_ct_cS14 (Endo)": "#9ec1d4",
    "p_ct_cS15 (Pericyte)": "#7cdce8",
    "p_ct_cS16 (Pericyte)": "#7cd7e8",
    "p_ct_cS17 (Pericyte)": "#7cd3e8",
    "p_ct_cS18 (Pericyte)": "#7ccfe8",
    "p_ct_cS19 (Pericyte)": "#7ccbe8",
    "p_ct_cS20 (Pericyte prolif)": "#7cc7e8",
    "p_ct_cS21 (Fibro stem cell niche)": "#7cc3e8",
    "p_ct_cS22 (Fibro stem cell niche)": "#7cbfe8",
    "p_ct_cS23 (Fibro BMP-producing)": "#7cbbe8",
    "p_ct_cS24 (Fibro BMP-producing)": "#7cb7e8",
    "p_ct_cS25 (Fibro CCL8+)": "#7cb2e8",
    "p_ct_cS26 (Myofibro)": "#7caee8",
    "p_ct_cS27 (CXCL14+ CAF)": "#7caae8",
    "p_ct_cS28 (GREM1+ CAF)": "#7ca6e8",
    "p_ct_cS29 (MMP3+ CAF)": "#7ca2e8",
    "p_ct_cS30 (CAF CCL8 Fibro-like)": "#7c9ee8",
    "p_ct_cS31 (CAF stem niche Fibro-like)": "#7c9ae8",
    "p_ct_cS32 (Smooth Muscle)": "#7c96e8",
    "p_ct_cS33 (Schwann)": "#7c92e8",
    "p_ct_cTNI01 (CD4+ IL7R+)": "#7c8ee8",
    "p_ct_cTNI02 (CD4+ IL7R+SELL+)": "#7c89e8",
    "p_ct_cTNI03 (CD4+ IL7R+HSP+)": "#7c85e8",
    "p_ct_cTNI04 (CD4+ IL7R+CCL5+)": "#7c81e8",
    "p_ct_cTNI05 (CD4+ IL17+)": "#7c7de8",
    "p_ct_cTNI06 (CD4+ TFH)": "#807ce8",
    "p_ct_cTNI07 (CD4+ CXCL13+)": "#847ce8",
    "p_ct_cTNI08 (CD4+ Treg)": "#887ce8",
    "p_ct_cTNI09 (CD4+ Treg prolif)": "#8c7ce8",
    "p_ct_cTNI10 (CD8+ IL7R+)": "#907ce8",
    "p_ct_cTNI11 (CD8+GZMK+)": "#947ce8",
    "p_ct_cTNI12 (CD8+ IL7R+)": "#997ce8",
    "p_ct_cTNI13 (CD8+ T IL17+)": "#9d7ce8",
    "p_ct_cTNI14 (CD8+ CXCL13+)": "#a17ce8",
    "p_ct_cTNI15 (CD8+ CXCL13+ HSP+)": "#a57ce8",
    "p_ct_cTNI16 (CD8+ CXCL13+ prolif)": "#a97ce8",
    "p_ct_cTNI17 (gd-like T)": "#ad7ce8",
    "p_ct_cTNI18 (gd-like T PDCD1+)": "#b17ce8",
    "p_ct_cTNI19 (gd-like T prolif)": "#b57ce8",
    "p_ct_cTNI20 (PLZF+ T)": "#b97ce8",
    "p_ct_cTNI21 (PLZF+ T prolif)": "#be7ce8",
    "p_ct_cTNI22 (cTNI22)": "#c27ce8",
    "p_ct_cTNI23 (NK CD16A+)": "#c67ce8",
    "p_ct_cTNI24 (NK GZMK+)": "#ca7ce8",
    "p_ct_cTNI25 (NK XCL1+)": "#ce7ce8",
    "p_ct_cTNI26 (ILC3)": "#d27ce8",
    "ambiguous": "#d3d3d3",
    "filtered": "#848884",
}

colormap_coloncatlas_98_light = {
    "p_ct_Tumor cE01 (Stem/TA-like)": "#ffe5e5",
    "p_ct_Tumor cE02 (Stem/TA-like/Immature Goblet)": "#ffe8e5",
    "p_ct_Tumor cE03 (Stem/TA-like prolif)": "#fafcf6",
    "p_ct_Tumor cE04 (Enterocyte 1)": "#ffeee5",
    "p_ct_Tumor cE05 (Enterocyte 2)": "#f5e9eb",
    "p_ct_Tumor cE06 (Immature Goblet)": "#fff4e5",
    "p_ct_Tumor cE07 (Goblet/Enterocyte)": "#fff7e5",
    "p_ct_Tumor cE08 (Goblet)": "#fffae5",
    "p_ct_Tumor cE09 (Best4)": "#fffde5",
    "p_ct_Tumor cE10 (Tuft)": "#fcffe5",
    "p_ct_Tumor cE11 (Enteroendocrine)": "#fedfde",
    "p_ct_cB1 (B IGD+IgM+)": "#ebf9de",
    "p_ct_cB2 (B GC-like)": "#eaf9de",
    "p_ct_cB3 (B CD40+ GC-like)": "#e9f9de",
    "p_ct_cE01 (Stem/TA-like)": "#e8f9de",
    "p_ct_cE02 (Stem/TA-like/Immature Goblet)": "#e7f9de",
    "p_ct_cE03 (Stem/TA-like prolif)": "#e6f9de",
    "p_ct_cE04 (Enterocyte 1)": "#e5f9de",
    "p_ct_cE05 (Enterocyte 2)": "#e4f9de",
    "p_ct_cE06 (Immature Goblet)": "#e3f9de",
    "p_ct_cE07 (Goblet/Enterocyte)": "#e2f9de",
    "p_ct_cE08 (Goblet)": "#e1f9de",
    "p_ct_cE09 (Best4)": "#e0f9de",
    "p_ct_cE10 (Tuft)": "#dff9de",
    "p_ct_cE11 (Enteroendocrine)": "#def9de",
    "p_ct_cM01 (Monocyte)": "#bfe7e1",
    "p_ct_cM02 (Macrophage-like)": "#eaf3e0",
    "p_ct_cM03 (DC1)": "#def9e1",
    "p_ct_cM04 (DC2)": "#def9e2",
    "p_ct_cM05 (DC2 C1Q+)": "#def9e3",
    "p_ct_cM06 (DC IL22RA2)": "#def9e4",
    "p_ct_cM07 (pDC)": "#def9e5",
    "p_ct_cM08 (AS-DC)": "#def9e6",
    "p_ct_cM09 (mregDC)": "#def9e7",
    "p_ct_cM10 (Granulocyte)": "#def9e8",
    "p_ct_cMA01 (Mast)": "#def9e9",
    "p_ct_cP1 (Plasma IgA)": "#def9ea",
    "p_ct_cP2 (Plasma IgG)": "#fbeee1",
    "p_ct_cP3 (Plasma IgG prolif)": "#ebdad8",
    "p_ct_cS01 (Endo arterial)": "#def9ed",
    "p_ct_cS02 (Endo capillary)": "#def9ee",
    "p_ct_cS03 (Endo capillary)": "#eff9fa",
    "p_ct_cS04 (Endo)": "#e3ecf1",
    "p_ct_cS05 (Endo venous)": "#def9f1",
    "p_ct_cS06 (Endo lymphatic)": "#def9f3",
    "p_ct_cS07 (Endo capillary-like)": "#def9f4",
    "p_ct_cS08 (Endo arterial-like)": "#def9f5",
    "p_ct_cS09 (Endo)": "#def9f6",
    "p_ct_cS10 (Endo tip cells)": "#def9f7",
    "p_ct_cS11 (Endo proif)": "#def9f8",
    "p_ct_cS12 (Endo)": "#def9f9",
    "p_ct_cS13 (Endo venous-like)": "#def8f9",
    "p_ct_cS14 (Endo)": "#e6eff4",
    "p_ct_cS15 (Pericyte)": "#def6f9",
    "p_ct_cS16 (Pericyte)": "#def5f9",
    "p_ct_cS17 (Pericyte)": "#def4f9",
    "p_ct_cS18 (Pericyte)": "#def3f9",
    "p_ct_cS19 (Pericyte)": "#def2f9",
    "p_ct_cS20 (Pericyte prolif)": "#def1f9",
    "p_ct_cS21 (Fibro stem cell niche)": "#def0f9",
    "p_ct_cS22 (Fibro stem cell niche)": "#deeff9",
    "p_ct_cS23 (Fibro BMP-producing)": "#deeef9",
    "p_ct_cS24 (Fibro BMP-producing)": "#deedf9",
    "p_ct_cS25 (Fibro CCL8+)": "#deebf9",
    "p_ct_cS26 (Myofibro)": "#deeaf9",
    "p_ct_cS27 (CXCL14+ CAF)": "#dee9f9",
    "p_ct_cS28 (GREM1+ CAF)": "#dee8f9",
    "p_ct_cS29 (MMP3+ CAF)": "#dee7f9",
    "p_ct_cS30 (CAF CCL8 Fibro-like)": "#dee6f9",
    "p_ct_cS31 (CAF stem niche Fibro-like)": "#dee5f9",
    "p_ct_cS32 (Smooth Muscle)": "#dee4f9",
    "p_ct_cS33 (Schwann)": "#dee3f9",
    "p_ct_cTNI01 (CD4+ IL7R+)": "#dee2f9",
    "p_ct_cTNI02 (CD4+ IL7R+SELL+)": "#dee1f9",
    "p_ct_cTNI03 (CD4+ IL7R+HSP+)": "#dee0f9",
    "p_ct_cTNI04 (CD4+ IL7R+CCL5+)": "#dedff9",
    "p_ct_cTNI05 (CD4+ IL17+)": "#dedef9",
    "p_ct_cTNI06 (CD4+ TFH)": "#dfdef9",
    "p_ct_cTNI07 (CD4+ CXCL13+)": "#e0def9",
    "p_ct_cTNI08 (CD4+ Treg)": "#e1def9",
    "p_ct_cTNI09 (CD4+ Treg prolif)": "#e2def9",
    "p_ct_cTNI10 (CD8+ IL7R+)": "#e3def9",
    "p_ct_cTNI11 (CD8+GZMK+)": "#e4def9",
    "p_ct_cTNI12 (CD8+ IL7R+)": "#e5def9",
    "p_ct_cTNI13 (CD8+ T IL17+)": "#e6def9",
    "p_ct_cTNI14 (CD8+ CXCL13+)": "#e7def9",
    "p_ct_cTNI15 (CD8+ CXCL13+ HSP+)": "#e8def9",
    "p_ct_cTNI16 (CD8+ CXCL13+ prolif)": "#e9def9",
    "p_ct_cTNI17 (gd-like T)": "#eadef9",
    "p_ct_cTNI18 (gd-like T PDCD1+)": "#ebdef9",
    "p_ct_cTNI19 (gd-like T prolif)": "#ecdef9",
    "p_ct_cTNI20 (PLZF+ T)": "#eddef9",
    "p_ct_cTNI21 (PLZF+ T prolif)": "#eedef9",
    "p_ct_cTNI22 (cTNI22)": "#efdef9",
    "p_ct_cTNI23 (NK CD16A+)": "#f0def9",
    "p_ct_cTNI24 (NK GZMK+)": "#f1def9",
    "p_ct_cTNI25 (NK XCL1+)": "#f2def9",
    "p_ct_cTNI26 (ILC3)": "#f3def9",
    "ambiguous": "#f4f4f4",
    "filtered": "#e0e1e0",
}

colormap_coloncatlas_98_dark = {
    "p_ct_Tumor cE01 (Stem/TA-like)": "#ff6666",
    "p_ct_Tumor cE02 (Stem/TA-like/Immature Goblet)": "#ff7866",
    "p_ct_Tumor cE03 (Stem/TA-like prolif)": "#e2eecc",
    "p_ct_Tumor cE04 (Enterocyte 1)": "#ff9c66",
    "p_ct_Tumor cE05 (Enterocyte 2)": "#c47b8a",
    "p_ct_Tumor cE06 (Immature Goblet)": "#ffc166",
    "p_ct_Tumor cE07 (Goblet/Enterocyte)": "#ffd366",
    "p_ct_Tumor cE08 (Goblet)": "#ffe566",
    "p_ct_Tumor cE09 (Best4)": "#fff766",
    "p_ct_Tumor cE10 (Tuft)": "#f1ff66",
    "p_ct_Tumor cE11 (Enteroendocrine)": "#fd423c",
    "p_ct_cB1 (B IGD+IgM+)": "#8bdc3a",
    "p_ct_cB2 (B GC-like)": "#85dc3a",
    "p_ct_cB3 (B CD40+ GC-like)": "#7fdc3a",
    "p_ct_cE01 (Stem/TA-like)": "#79dc3a",
    "p_ct_cE02 (Stem/TA-like/Immature Goblet)": "#73dc3a",
    "p_ct_cE03 (Stem/TA-like prolif)": "#6cdc3a",
    "p_ct_cE04 (Enterocyte 1)": "#66dc3a",
    "p_ct_cE05 (Enterocyte 2)": "#60dc3a",
    "p_ct_cE06 (Immature Goblet)": "#5adc3a",
    "p_ct_cE07 (Goblet/Enterocyte)": "#54dc3a",
    "p_ct_cE08 (Goblet)": "#4edc3a",
    "p_ct_cE09 (Best4)": "#48dc3a",
    "p_ct_cE10 (Tuft)": "#42dc3a",
    "p_ct_cE11 (Enteroendocrine)": "#3cdc3a",
    "p_ct_cM01 (Monocyte)": "#00704b",
    "p_ct_cM02 (Macrophage-like)": "#85ba48",
    "p_ct_cM03 (DC1)": "#3adc4e",
    "p_ct_cM04 (DC2)": "#3adc54",
    "p_ct_cM05 (DC2 C1Q+)": "#3adc5a",
    "p_ct_cM06 (DC IL22RA2)": "#3adc60",
    "p_ct_cM07 (pDC)": "#3adc66",
    "p_ct_cM08 (AS-DC)": "#3adc6c",
    "p_ct_cM09 (mregDC)": "#3adc72",
    "p_ct_cM10 (Granulocyte)": "#3adc78",
    "p_ct_cMA01 (Mast)": "#3adc7f",
    "p_ct_cP1 (Plasma IgA)": "#3adc85",
    "p_ct_cP2 (Plasma IgG)": "#e7994f",
    "p_ct_cP3 (Plasma IgG prolif)": "#872215",
    "p_ct_cS01 (Endo arterial)": "#3adc97",
    "p_ct_cS02 (Endo capillary)": "#3adc9d",
    "p_ct_cS03 (Endo capillary)": "#a2dce5",
    "p_ct_cS04 (Endo)": "#5b8eac",
    "p_ct_cS05 (Endo venous)": "#3adcaf",
    "p_ct_cS06 (Endo lymphatic)": "#3adcb7",
    "p_ct_cS07 (Endo capillary-like)": "#3adcbd",
    "p_ct_cS08 (Endo arterial-like)": "#3adcc3",
    "p_ct_cS09 (Endo)": "#3adcc9",
    "p_ct_cS10 (Endo tip cells)": "#3adccf",
    "p_ct_cS11 (Endo proif)": "#3adcd5",
    "p_ct_cS12 (Endo)": "#3adcdb",
    "p_ct_cS13 (Endo venous-like)": "#3ad6dc",
    "p_ct_cS14 (Endo)": "#6da2be",
    "p_ct_cS15 (Pericyte)": "#3acadc",
    "p_ct_cS16 (Pericyte)": "#3ac3dc",
    "p_ct_cS17 (Pericyte)": "#3abddc",
    "p_ct_cS18 (Pericyte)": "#3ab7dc",
    "p_ct_cS19 (Pericyte)": "#3ab1dc",
    "p_ct_cS20 (Pericyte prolif)": "#3aabdc",
    "p_ct_cS21 (Fibro stem cell niche)": "#3aa5dc",
    "p_ct_cS22 (Fibro stem cell niche)": "#3a9fdc",
    "p_ct_cS23 (Fibro BMP-producing)": "#3a99dc",
    "p_ct_cS24 (Fibro BMP-producing)": "#3a93dc",
    "p_ct_cS25 (Fibro CCL8+)": "#3a8bdc",
    "p_ct_cS26 (Myofibro)": "#3a85dc",
    "p_ct_cS27 (CXCL14+ CAF)": "#3a7fdc",
    "p_ct_cS28 (GREM1+ CAF)": "#3a79dc",
    "p_ct_cS29 (MMP3+ CAF)": "#3a73dc",
    "p_ct_cS30 (CAF CCL8 Fibro-like)": "#3a6ddc",
    "p_ct_cS31 (CAF stem niche Fibro-like)": "#3a67dc",
    "p_ct_cS32 (Smooth Muscle)": "#3a61dc",
    "p_ct_cS33 (Schwann)": "#3a5bdc",
    "p_ct_cTNI01 (CD4+ IL7R+)": "#3a55dc",
    "p_ct_cTNI02 (CD4+ IL7R+SELL+)": "#3a4edc",
    "p_ct_cTNI03 (CD4+ IL7R+HSP+)": "#3a48dc",
    "p_ct_cTNI04 (CD4+ IL7R+CCL5+)": "#3a42dc",
    "p_ct_cTNI05 (CD4+ IL17+)": "#3a3cdc",
    "p_ct_cTNI06 (CD4+ TFH)": "#403adc",
    "p_ct_cTNI07 (CD4+ CXCL13+)": "#463adc",
    "p_ct_cTNI08 (CD4+ Treg)": "#4c3adc",
    "p_ct_cTNI09 (CD4+ Treg prolif)": "#523adc",
    "p_ct_cTNI10 (CD8+ IL7R+)": "#583adc",
    "p_ct_cTNI11 (CD8+GZMK+)": "#5e3adc",
    "p_ct_cTNI12 (CD8+ IL7R+)": "#663adc",
    "p_ct_cTNI13 (CD8+ T IL17+)": "#6c3adc",
    "p_ct_cTNI14 (CD8+ CXCL13+)": "#723adc",
    "p_ct_cTNI15 (CD8+ CXCL13+ HSP+)": "#783adc",
    "p_ct_cTNI16 (CD8+ CXCL13+ prolif)": "#7e3adc",
    "p_ct_cTNI17 (gd-like T)": "#843adc",
    "p_ct_cTNI18 (gd-like T PDCD1+)": "#8a3adc",
    "p_ct_cTNI19 (gd-like T prolif)": "#903adc",
    "p_ct_cTNI20 (PLZF+ T)": "#963adc",
    "p_ct_cTNI21 (PLZF+ T prolif)": "#9d3adc",
    "p_ct_cTNI22 (cTNI22)": "#a33adc",
    "p_ct_cTNI23 (NK CD16A+)": "#a93adc",
    "p_ct_cTNI24 (NK GZMK+)": "#af3adc",
    "p_ct_cTNI25 (NK XCL1+)": "#b53adc",
    "p_ct_cTNI26 (ILC3)": "#bb3adc",
    "ambiguous": "#bdbdbd",
    "filtered": "#464c46",
}


#############column order ##################

crc98_order_col = [
    "p_ct_Tumor cE01 (Stem/TA-like)",
    "p_ct_Tumor cE02 (Stem/TA-like/Immature Goblet)",
    "p_ct_Tumor cE03 (Stem/TA-like prolif)",
    "p_ct_Tumor cE04 (Enterocyte 1)",
    "p_ct_Tumor cE05 (Enterocyte 2)",
    "p_ct_Tumor cE06 (Immature Goblet)",
    "p_ct_Tumor cE07 (Goblet/Enterocyte)",
    "p_ct_Tumor cE08 (Goblet)",
    "p_ct_Tumor cE09 (Best4)",
    "p_ct_Tumor cE10 (Tuft)",
    "p_ct_Tumor cE11 (Enteroendocrine)",
    "p_ct_cE01 (Stem/TA-like)",
    "p_ct_cE02 (Stem/TA-like/Immature Goblet)",
    "p_ct_cE03 (Stem/TA-like prolif)",
    "p_ct_cE04 (Enterocyte 1)",
    "p_ct_cE05 (Enterocyte 2)",
    "p_ct_cE06 (Immature Goblet)",
    "p_ct_cE07 (Goblet/Enterocyte)",
    "p_ct_cE08 (Goblet)",
    "p_ct_cE09 (Best4)",
    "p_ct_cE10 (Tuft)",
    "p_ct_cE11 (Enteroendocrine)",
    "p_ct_cM01 (Monocyte)",
    "p_ct_cM02 (Macrophage-like)",
    "p_ct_cM03 (DC1)",
    "p_ct_cM04 (DC2)",
    "p_ct_cM05 (DC2 C1Q+)",
    "p_ct_cM06 (DC IL22RA2)",
    "p_ct_cM07 (pDC)",
    "p_ct_cM08 (AS-DC)",
    "p_ct_cM09 (mregDC)",
    "p_ct_cM10 (Granulocyte)",
    "p_ct_cMA01 (Mast)",
    "p_ct_cB1 (B IGD+IgM+)",
    "p_ct_cB2 (B GC-like)",
    "p_ct_cB3 (B CD40+ GC-like)",
    "p_ct_cP1 (Plasma IgA)",
    "p_ct_cP2 (Plasma IgG)",
    "p_ct_cP3 (Plasma IgG prolif)",
    "p_ct_cTNI01 (CD4+ IL7R+)",
    "p_ct_cTNI02 (CD4+ IL7R+SELL+)",
    "p_ct_cTNI03 (CD4+ IL7R+HSP+)",
    "p_ct_cTNI04 (CD4+ IL7R+CCL5+)",
    "p_ct_cTNI05 (CD4+ IL17+)",
    "p_ct_cTNI06 (CD4+ TFH)",
    "p_ct_cTNI07 (CD4+ CXCL13+)",
    "p_ct_cTNI08 (CD4+ Treg)",
    "p_ct_cTNI09 (CD4+ Treg prolif)",
    "p_ct_cTNI10 (CD8+ IL7R+)",
    "p_ct_cTNI11 (CD8+GZMK+)",
    "p_ct_cTNI12 (CD8+ IL7R+)",
    "p_ct_cTNI13 (CD8+ T IL17+)",
    "p_ct_cTNI14 (CD8+ CXCL13+)",
    "p_ct_cTNI15 (CD8+ CXCL13+ HSP+)",
    "p_ct_cTNI16 (CD8+ CXCL13+ prolif)",
    "p_ct_cTNI17 (gd-like T)",
    "p_ct_cTNI18 (gd-like T PDCD1+)",
    "p_ct_cTNI19 (gd-like T prolif)",
    "p_ct_cTNI20 (PLZF+ T)",
    "p_ct_cTNI21 (PLZF+ T prolif)",
    "p_ct_cTNI22 (cTNI22)",
    "p_ct_cTNI23 (NK CD16A+)",
    "p_ct_cTNI24 (NK GZMK+)",
    "p_ct_cTNI25 (NK XCL1+)",
    "p_ct_cTNI26 (ILC3)",
    "p_ct_cS01 (Endo arterial)",
    "p_ct_cS02 (Endo capillary)",
    "p_ct_cS03 (Endo capillary)",
    "p_ct_cS04 (Endo)",
    "p_ct_cS05 (Endo venous)",
    "p_ct_cS06 (Endo lymphatic)",
    "p_ct_cS07 (Endo capillary-like)",
    "p_ct_cS08 (Endo arterial-like)",
    "p_ct_cS09 (Endo)",
    "p_ct_cS10 (Endo tip cells)",
    "p_ct_cS11 (Endo proif)",
    "p_ct_cS12 (Endo)",
    "p_ct_cS13 (Endo venous-like)",
    "p_ct_cS14 (Endo)",
    "p_ct_cS15 (Pericyte)",
    "p_ct_cS16 (Pericyte)",
    "p_ct_cS17 (Pericyte)",
    "p_ct_cS18 (Pericyte)",
    "p_ct_cS19 (Pericyte)",
    "p_ct_cS20 (Pericyte prolif)",
    "p_ct_cS21 (Fibro stem cell niche)",
    "p_ct_cS22 (Fibro stem cell niche)",
    "p_ct_cS23 (Fibro BMP-producing)",
    "p_ct_cS24 (Fibro BMP-producing)",
    "p_ct_cS25 (Fibro CCL8+)",
    "p_ct_cS26 (Myofibro)",
    "p_ct_cS27 (CXCL14+ CAF)",
    "p_ct_cS28 (GREM1+ CAF)",
    "p_ct_cS29 (MMP3+ CAF)",
    "p_ct_cS30 (CAF CCL8 Fibro-like)",
    "p_ct_cS31 (CAF stem niche Fibro-like)",
    "p_ct_cS32 (Smooth Muscle)",
    "p_ct_cS33 (Schwann)",
    "ambiguous",
    "filtered",
]

crc98_major_col = {
    "TumorEpi": [
        "p_ct_Tumor cE01 (Stem/TA-like)",
        "p_ct_Tumor cE02 (Stem/TA-like/Immature Goblet)",
        "p_ct_Tumor cE03 (Stem/TA-like prolif)",
        "p_ct_Tumor cE04 (Enterocyte 1)",
        "p_ct_Tumor cE05 (Enterocyte 2)",
        "p_ct_Tumor cE06 (Immature Goblet)",
        "p_ct_Tumor cE07 (Goblet/Enterocyte)",
        "p_ct_Tumor cE08 (Goblet)",
        "p_ct_Tumor cE09 (Best4)",
        "p_ct_Tumor cE10 (Tuft)",
        "p_ct_Tumor cE11 (Enteroendocrine)",
    ],
    "NormalEpi": [
        "p_ct_cE01 (Stem/TA-like)",
        "p_ct_cE02 (Stem/TA-like/Immature Goblet)",
        "p_ct_cE03 (Stem/TA-like prolif)",
        "p_ct_cE04 (Enterocyte 1)",
        "p_ct_cE05 (Enterocyte 2)",
        "p_ct_cE06 (Immature Goblet)",
        "p_ct_cE07 (Goblet/Enterocyte)",
        "p_ct_cE08 (Goblet)",
        "p_ct_cE09 (Best4)",
        "p_ct_cE10 (Tuft)",
        "p_ct_cE11 (Enteroendocrine)",
    ],
    "Myeloid": [
        "p_ct_cMA01 (Mast)",
        "p_ct_cM01 (Monocyte)",
        "p_ct_cM02 (Macrophage-like)",
        "p_ct_cM03 (DC1)",
        "p_ct_cM04 (DC2)",
        "p_ct_cM05 (DC2 C1Q+)",
        "p_ct_cM06 (DC IL22RA2)",
        "p_ct_cM07 (pDC)",
        "p_ct_cM08 (AS-DC)",
        "p_ct_cM09 (mregDC)",
        "p_ct_cM10 (Granulocyte)",
    ],
    "B": [
        "p_ct_cB1 (B IGD+IgM+)",
        "p_ct_cB2 (B GC-like)",
        "p_ct_cB3 (B CD40+ GC-like)",
        "p_ct_cP1 (Plasma IgA)",
        "p_ct_cP2 (Plasma IgG)",
        "p_ct_cP3 (Plasma IgG prolif)",
    ],
    "T": [
        "p_ct_cTNI01 (CD4+ IL7R+)",
        "p_ct_cTNI02 (CD4+ IL7R+SELL+)",
        "p_ct_cTNI03 (CD4+ IL7R+HSP+)",
        "p_ct_cTNI04 (CD4+ IL7R+CCL5+)",
        "p_ct_cTNI05 (CD4+ IL17+)",
        "p_ct_cTNI06 (CD4+ TFH)",
        "p_ct_cTNI07 (CD4+ CXCL13+)",
        "p_ct_cTNI08 (CD4+ Treg)",
        "p_ct_cTNI09 (CD4+ Treg prolif)",
        "p_ct_cTNI10 (CD8+ IL7R+)",
        "p_ct_cTNI11 (CD8+GZMK+)",
        "p_ct_cTNI12 (CD8+ IL7R+)",
        "p_ct_cTNI13 (CD8+ T IL17+)",
        "p_ct_cTNI14 (CD8+ CXCL13+)",
        "p_ct_cTNI15 (CD8+ CXCL13+ HSP+)",
        "p_ct_cTNI16 (CD8+ CXCL13+ prolif)",
        "p_ct_cTNI17 (gd-like T)",
        "p_ct_cTNI18 (gd-like T PDCD1+)",
        "p_ct_cTNI19 (gd-like T prolif)",
        "p_ct_cTNI20 (PLZF+ T)",
        "p_ct_cTNI21 (PLZF+ T prolif)",
        "p_ct_cTNI22 (cTNI22)",
        "p_ct_cTNI23 (NK CD16A+)",
        "p_ct_cTNI24 (NK GZMK+)",
        "p_ct_cTNI25 (NK XCL1+)",
        "p_ct_cTNI26 (ILC3)",
    ],
    "EndoStromal": [
        "p_ct_cS01 (Endo arterial)",
        "p_ct_cS02 (Endo capillary)",
        "p_ct_cS03 (Endo capillary)",
        "p_ct_cS04 (Endo)",
        "p_ct_cS05 (Endo venous)",
        "p_ct_cS06 (Endo lymphatic)",
        "p_ct_cS07 (Endo capillary-like)",
        "p_ct_cS08 (Endo arterial-like)",
        "p_ct_cS09 (Endo)",
        "p_ct_cS10 (Endo tip cells)",
        "p_ct_cS11 (Endo proif)",
        "p_ct_cS12 (Endo)",
        "p_ct_cS13 (Endo venous-like)",
        "p_ct_cS14 (Endo)",
        "p_ct_cS15 (Pericyte)",
        "p_ct_cS16 (Pericyte)",
        "p_ct_cS17 (Pericyte)",
        "p_ct_cS18 (Pericyte)",
        "p_ct_cS19 (Pericyte)",
        "p_ct_cS20 (Pericyte prolif)",
        "p_ct_cS21 (Fibro stem cell niche)",
        "p_ct_cS22 (Fibro stem cell niche)",
        "p_ct_cS23 (Fibro BMP-producing)",
        "p_ct_cS24 (Fibro BMP-producing)",
        "p_ct_cS25 (Fibro CCL8+)",
        "p_ct_cS26 (Myofibro)",
        "p_ct_cS27 (CXCL14+ CAF)",
        "p_ct_cS28 (GREM1+ CAF)",
        "p_ct_cS29 (MMP3+ CAF)",
        "p_ct_cS30 (CAF CCL8 Fibro-like)",
        "p_ct_cS31 (CAF stem niche Fibro-like)",
        "p_ct_cS32 (Smooth Muscle)",
        "p_ct_cS33 (Schwann)",
    ],
    "filtered": [
        "ambiguous",
        "filtered",
    ],
    ### separate types for dotplot
    "Endo": [
        "p_ct_cS01 (Endo arterial)",
        "p_ct_cS02 (Endo capillary)",
        "p_ct_cS03 (Endo capillary)",
        "p_ct_cS04 (Endo)",
        "p_ct_cS05 (Endo venous)",
        "p_ct_cS06 (Endo lymphatic)",
        "p_ct_cS07 (Endo capillary-like)",
        "p_ct_cS08 (Endo arterial-like)",
        "p_ct_cS09 (Endo)",
        "p_ct_cS10 (Endo tip cells)",
        "p_ct_cS11 (Endo proif)",
        "p_ct_cS12 (Endo)",
        "p_ct_cS13 (Endo venous-like)",
        "p_ct_cS14 (Endo)",
    ],
    "Peri": [
        "p_ct_cS15 (Pericyte)",
        "p_ct_cS16 (Pericyte)",
        "p_ct_cS17 (Pericyte)",
        "p_ct_cS18 (Pericyte)",
        "p_ct_cS19 (Pericyte)",
        "p_ct_cS20 (Pericyte prolif)",
    ],
    "Fibro": [
        "p_ct_cS21 (Fibro stem cell niche)",
        "p_ct_cS22 (Fibro stem cell niche)",
        "p_ct_cS23 (Fibro BMP-producing)",
        "p_ct_cS24 (Fibro BMP-producing)",
        "p_ct_cS25 (Fibro CCL8+)",
        "p_ct_cS26 (Myofibro)",
        "p_ct_cS27 (CXCL14+ CAF)",
        "p_ct_cS28 (GREM1+ CAF)",
        "p_ct_cS29 (MMP3+ CAF)",
        "p_ct_cS30 (CAF CCL8 Fibro-like)",
        "p_ct_cS31 (CAF stem niche Fibro-like)",
        #'p_ct_cS32 (Smooth Muscle)',
        #'p_ct_cS33 (Schwann)',
    ],
    "CD4T": [
        "p_ct_cTNI01 (CD4+ IL7R+)",
        "p_ct_cTNI02 (CD4+ IL7R+SELL+)",
        "p_ct_cTNI03 (CD4+ IL7R+HSP+)",
        "p_ct_cTNI04 (CD4+ IL7R+CCL5+)",
        "p_ct_cTNI05 (CD4+ IL17+)",
        "p_ct_cTNI06 (CD4+ TFH)",
        "p_ct_cTNI07 (CD4+ CXCL13+)",
        "p_ct_cTNI08 (CD4+ Treg)",
        "p_ct_cTNI09 (CD4+ Treg prolif)",
    ],
    "CD8T": [
        "p_ct_cTNI10 (CD8+ IL7R+)",
        "p_ct_cTNI11 (CD8+GZMK+)",
        "p_ct_cTNI12 (CD8+ IL7R+)",
        "p_ct_cTNI13 (CD8+ T IL17+)",
        "p_ct_cTNI14 (CD8+ CXCL13+)",
        "p_ct_cTNI15 (CD8+ CXCL13+ HSP+)",
        "p_ct_cTNI16 (CD8+ CXCL13+ prolif)",
    ],
    "Tother": [
        "p_ct_cTNI17 (gd-like T)",
        "p_ct_cTNI18 (gd-like T PDCD1+)",
        "p_ct_cTNI19 (gd-like T prolif)",
        "p_ct_cTNI20 (PLZF+ T)",
        "p_ct_cTNI21 (PLZF+ T prolif)",
        "p_ct_cTNI22 (cTNI22)",
        "p_ct_cTNI23 (NK CD16A+)",
        "p_ct_cTNI24 (NK GZMK+)",
        "p_ct_cTNI25 (NK XCL1+)",
        "p_ct_cTNI26 (ILC3)",
    ],
}


crc98_epicol = [
    "p_ct_cE01 (Stem/TA-like)",
    "p_ct_Tumor cE01 (Stem/TA-like)",
    "p_ct_cE02 (Stem/TA-like/Immature Goblet)",
    "p_ct_Tumor cE02 (Stem/TA-like/Immature Goblet)",
    "p_ct_cE03 (Stem/TA-like prolif)",
    "p_ct_Tumor cE03 (Stem/TA-like prolif)",
    "p_ct_cE04 (Enterocyte 1)",
    "p_ct_Tumor cE04 (Enterocyte 1)",
    "p_ct_cE05 (Enterocyte 2)",
    "p_ct_Tumor cE05 (Enterocyte 2)",
    "p_ct_cE06 (Immature Goblet)",
    "p_ct_Tumor cE06 (Immature Goblet)",
    "p_ct_cE07 (Goblet/Enterocyte)",
    "p_ct_Tumor cE07 (Goblet/Enterocyte)",
    "p_ct_cE08 (Goblet)",
    "p_ct_Tumor cE08 (Goblet)",
    "p_ct_cE09 (Best4)",
    "p_ct_Tumor cE09 (Best4)",
    "p_ct_cE10 (Tuft)",
    "p_ct_Tumor cE10 (Tuft)",
    "p_ct_cE11 (Enteroendocrine)",
    "p_ct_Tumor cE11 (Enteroendocrine)",
]

crc98_normalepicol = [
    "p_ct_cE01 (Stem/TA-like)",
    "p_ct_cE02 (Stem/TA-like/Immature Goblet)",
    "p_ct_cE03 (Stem/TA-like prolif)",
    "p_ct_cE04 (Enterocyte 1)",
    "p_ct_cE05 (Enterocyte 2)",
    "p_ct_cE06 (Immature Goblet)",
    "p_ct_cE07 (Goblet/Enterocyte)",
    "p_ct_cE08 (Goblet)",
    "p_ct_cE09 (Best4)",
    "p_ct_cE10 (Tuft)",
    "p_ct_cE11 (Enteroendocrine)",
]
crc98_tumorepicol = [
    "p_ct_Tumor cE01 (Stem/TA-like)",
    "p_ct_Tumor cE02 (Stem/TA-like/Immature Goblet)",
    "p_ct_Tumor cE03 (Stem/TA-like prolif)",
    "p_ct_Tumor cE04 (Enterocyte 1)",
    "p_ct_Tumor cE05 (Enterocyte 2)",
    "p_ct_Tumor cE06 (Immature Goblet)",
    "p_ct_Tumor cE07 (Goblet/Enterocyte)",
    "p_ct_Tumor cE08 (Goblet)",
    "p_ct_Tumor cE09 (Best4)",
    "p_ct_Tumor cE10 (Tuft)",
    "p_ct_Tumor cE11 (Enteroendocrine)",
]


################ gene marker #################

#'PHGR1','GAPDH','PTMA','ACTB',
marker_crc98_dict = {
    "NormalEpi": [
        "LEFTY1",
        "EPHB3",
        "LGR5",
        "ALDH1B1",
        "CDCA7",
        "OLFM4",
        "STMN1",
        "HMGB2",
        "MKI67",
        "CLCA4",
        "AQP8",
        "TMIGD1",
        "GUCA2B",
        "SULT1A2",
        "SLC26A3",
        "SLC26A2",
        "CA1",
        "SPINK1",
        "CLCA1",
        "ITLN1",
        "LRRC26",
        "RETNLB",
        "SPINK4",
        "FCGBP",
        "MUC2",
        "ZG16",
        "BCAS1",
        "ENTPD8",
        "MUC1",
        "TFF1",
        "S100P",
        "NOTCH2NL",
        "OTOP3",
        "REN",
        "BEST4",
        "OTOP2",
        "CA7",
        "AZGP1",
        "HCK",
        "LRMP",
        "SH2D6",
        "HPGDS",
        "PTGS1",
        "CHGA",
        "CRYBA2",
        "SCGN",
        "PYY",
        "SCT",
        "INSL5",
    ],
    "CD4T": [
        "IL7R",
        "LEF1",
        "SELL",
        "CCR7",
        "TCF7",
        "HSPA1A",
        "HSPA1B",
        "CCL5",
        "CD40LG",
        "KLRB1",
        "RORA",
        "IL17A",
        "ICA1",
        "IL6ST",
        "PASK",
        "BCL6",
        "CXCR5",
        "ZBED2",
        "CXCL13",
        "TNFRSF18",
        "CTLA4",
        "TNFRSF4",
        "BATF",
        "FOXP3",
        "IL2RA",
        "IL1RL1",
        "SOX4",
        "STMN1",
        "HMGB2",
        "MKI67",
    ],
    "CD8T": [
        "IL7R",
        "TCF7",
        "GZMK",
        "RORA",
        "KLRB1",
        "IL17A",
        "TOX",
        "ITGB7",
        "ITGAE",
        "RBPJ",
        "ETV1",
        "PDCD1",
        "LAG3",
        "HAVCR2",
        "TIGIT",
        "IFNG",
        "PRF1",
        "GNLY",
        "GZMH",
        "GZMB",
        "CXCL13",
        "TNFSF4",
        "ENTPD1",
        "ZBED2",
        "HSPA1A",
        "HSPA1B",
        "STMN1",
        "HMGB2",
        "MKI67",
    ],
    "Tother": [
        "TRGC1",
        "TRGC2",
        "KLRC2",
        "LAG3",
        "HAVCR2",
        "PDCD1",
        "GZMB",
        "GNLY",
        "PRF1",
        "ZBTB16",
        "TYROBP",
        "FCER1G",
        "STMN1",
        "HMGB2",
        "MK167",
        "CD8A",
        "CD8B",
        "KLF2",
        "GZMH",
        "LYAR",
        "KLRG1",
        "B3GAT1",
        "TBX21",
        "FGFBP2",
        "CX3CR1",
        "FCGR3A",
        "KLRF1",
        "CMC1",
        "KLRC1",
        "NCAM1",
        "XCL1",
        "XCL2",
        "SOX4",
        "KLRB1",
        "BCL6",
        "LST1",
        "RORC",
    ],
    "B": [
        "CD79A",
        "CD74",
        "MS4A1",
        "CXCR5",
        "CD19",
        "TCL1A",
        "FCER2",
        "IGHD",
        "IGHM",
        "TNFRSF13B",
        "GPR183",
        "CD40",
        "CD86",
        "CD80",
        "MARCKSL1",
        "RGS13",
        "AICDA",
        "CD27",
        "IGHA1",
        "SDC1",
        "TNFRSF17",
        "JCHAIN",
        "MZB1",
        "DERL3",
        "CD38",
        "IGHG1",
        "IGHG3",
        "IGHG4",
        "STMN1",
        "HMGB2",
        "MKI67",
    ],
    "Myeloid": [
        "TPSAB1",
        "CPA3",
        "KIT",
        "FCN1",
        "VCAN",
        "CD300E",
        "S100A12",
        "CD163",
        "APOC1",
        "LIPA",
        "C1QA",
        "CSF1R",
        "CLEC9A",
        "XCR1",
        "BATF3",
        "FCER1A",
        "CD1C",
        "CLEC10A",
        "CD1E",
        "PAK1",
        "IL22RA2",
        "CLEC4C",
        "IRF7",
        "CXCR3",
        "LILRA4",
        "SIGLEC6",
        "PPP1R14A",
        "AXL",
        "LAMP3",
        "CCL19",
        "CCL22",
        "CCR7",
        "CD274",
        "FCGR3B",
        "HCAR2",
        "GPR109B",
        "CSF3R",
    ],
    "Endo": [
        "LTC4S",
        "PCSK5",
        "BMX",
        "SEMA3G",
        "HEY1",
        "ACE",
        "CD320",
        "ENPP2",
        "SLC14A1",
        "TMEM88",
        "CD36",
        "CA4",
        "PASK",
        "HIGD1B",
        "COX412",
        "NOTCH3",
        "PDGFRB",
        "RGS5",
        "MYL9",
        "ACTA2",
        "MCAM",
        "NID1",
        "NID2",
        "CPE",
        "ADGRG6",
        "MADCAM1",
        "ACKR1",
        "IL1R1",
        "CCL14",
        "CCL23",
        "CCL21",
        "LYVE1",
        "MMRN1",
        "RBP7",
        "PPARG",
        "FABP4",
        "BTNL9",
        "CD300LG",
        "GJA4",
        "GJA5",
        "VEGFC",
        "HECW2",
        "GRB10",
        "CA2",
        "ANGPT2",
        "ESMT",
        "APLN",
        "PDGFB",
        "PGF",
        "CXCR4",
        "STMN1",
        "HMGN2",
        "HMGB2",
        "MK167",
        "CSF3",
        "HIF1A",
        "S100A3",
        "SELE",
        "SELP",
        "IL33",
        "VCAM1",
    ],
    "Peri": [
        "RGS5",
        "ADAMDEC1",
        "COX412",
        "HIGD1B",
        "CD36",
        "STEAP4",
        "APOE",
        "FABP4",
        "MT1M",
        "SYNPO2",
        "HOPX",
        "SMOC2",
        "MYH11",
        "MIR",
        "143HG",
        "MAP3K7CL",
        "NOTCH3",
        "MYLK",
        "ACTA2",
        "GJA4",
        "MMP11",
        "LURAP1L",
        "NDUFA4L2",
        "KCNJ8",
        "PLXDC1",
        "EDNRA",
        "CCDC102B",
        "HIF1A",
        "ERRFI1",
        "COL15A1",
        "PRRX1",
        "SULF1",
        "TSPAN15",
        "EMP1",
        "IL32",
        "GOS2",
        "VCAN",
        "S100A10",
        "POSTN",
    ],
    "Fibro": [
        "LOXL1",
        "PCOLCE2",
        "SEMA3B",
        "CLEC3B",
        "TPPP3",
        "WNT2B",
        "MFAP5",
        "CD34",
        "SFRP2",
        "CXCL12",
        "RSPO3",
        "GREM1",
        "CXCL14",
        "COL4A5",
        "CXCR4",
        "WNT5B",
        "COL4A6",
        "BMP4",
        "SOX6",
        "FRZB",
        "ENHO",
        "BMP5",
        "BMP2",
        "CCL2",
        "CCL8",
        "CCL11",
        "CCL13",
        "TAGLN",
        "ACTA2",
        "MYH11",
        "PDPN",
        "INHBA",
        "DKK3",
        "THY1",
        "MMP11",
        "WNT4",
        "AGT",
        "COL11A1",
        "ADAM12",
        "CTHRC1",
        "FAP",
        "TNC",
        "COL7A1",
        "MMP1",
        "CXCL1",
        "CXCL5",
        "MMP3",
        "CXCL3",
        "CXCL8",
        "L24",
        "STC1",
        "ADAM28",
        "FABP5",
        "TFPI2",
        "PAPPA",
        "PTGDS",
        "CHRDL1",
        "NT5E",
        "IGF1",
        "PLA2G2A",
        "BOC",
        "LXN",
        "RARRES1",
    ],
}
colon_epithelial_marker = [
    "LEFTY1",
    "EPHB3",
    "LGR5",
    "ALDH1B1",
    "CDCA7",
    "OLFM4",
    "STMN1",
    "HMGB2",
    "MKI67",
    "CLCA4",
    "AQP8",
    "TMIGD1",
    "GUCA2B",
    "SULT1A2",
    "SLC26A3",
    "SLC26A2",
    "CA1",
    "SPINK1",
    "CLCA1",
    "ITLN1",
    "LRRC26",
    "RETNLB",
    "SPINK4",
    "FCGBP",
    "MUC2",
    "ZG16",
    "ENTPD8",
    "MUC1",
    "TFF1",
    "S100P",
    "OTOP3",
    "REN",
    "BEST4",
    "OTOP2",
    "CA7",
    "AZGP1",
    "HCK",
    "LRMP",
    "SH2D6",
    "HPGDS",
    "PTGS1",
    "CHGA",
    "CRYBA2",
    "SCGN",
    "PYY",
    "SCT",
    "INSL5",
]  # no NOTCH2NL, BCAS1 in ST data

colon_epithelial_marker_dict = {
    "Stem/TA-like": [
        "LEFTY1",
        "EPHB3",
        "LGR5",
        "ALDH1B1",
        "CDCA7",
        "OLFM4",
        "STMN1",
        "HMGB2",
        "MKI67",
    ],
    "Enterocyte": [
        "CLCA4",
        "AQP8",
        "TMIGD1",
        "GUCA2B",
        "SULT1A2",
        "SLC26A3",
        "SLC26A2",
        "CA1",
    ],
    "Goblet": [
        "SPINK1",
        "CLCA1",
        "ITLN1",
        "LRRC26",
        "RETNLB",
        "SPINK4",
        "FCGBP",
        "MUC2",
        "ZG16",
        "BCAS1",
        "ENTPD8",
        "MUC1",
        "TFF1",
        "S100P",
    ],
    "Best4": [
        "NOTCH2NL",
        "OTOP3",
        "REN",
        "BEST4",
        "OTOP2",
        "CA7",
    ],
    "Tuft": ["AZGP1", "HCK", "LRMP", "SH2D6", "HPGDS", "PTGS1"],
    "Enteroendocrine": ["CHGA", "CRYBA2", "SCGN", "PYY", "SCT", "INSL5"],
}

# marker: see https://www.nature.com/articles/s41588-022-01088-x
# regev group https://pdf.sciencedirectassets.com/272196/1-s2.0-S0092867418X00166/1-s2.0-S0092867419307329/main.pdf?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEKj%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIQC0M9TltK3%2FGqfzKVCoFTekhWxFDTq1kmt6GO%2Bw%2BzHb7AIgPnjjDMDI0wyi5PwJRj27%2B7lNuzylkfJL2%2BSQE4xmB8oquwUI4f%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARAFGgwwNTkwMDM1NDY4NjUiDNI6up%2BqTA2HVTJQ3iqPBWk2VVzzIz%2BNMfb8ulYVaxQV3Op5DpiiRondhVEWDLR5hx3G0K1cXpuBfDEax5kg%2FHx3M2dLrDLGwe34iHH0jwHeAPudcTMln388K%2FTAyiFwobN4IUqYpdgcMTnNjEzIZfkiXGrnFAOKnPb%2BCxNpHmOCIilhwxjwOhuYK4QKtw6q5JJITdm0Z5pqGHJf6nHTamzlR1nnv4w99iGfL1of6yPLlWkxIvA3BnlQ6pLAvApSDEA%2Fv1gjjJyneAI1PnoVkWU0facrKJ9V2H43xL%2BVqXudu5wBfSgvWGCpmdyhqKUm6Jx32GEP758d24aqSgXamGRjxioJST363X5lGf3r3hV1erh6TO2494LXFoKWkpojCFVGcS1vhaj7c0Vl2S4pfKRb6MH6ET2AnylrVhcW8VoqY1hiA10m3y3acwW4oAol49QaiukQsr9ZdGEi0qlWUSYeRxx2yjgyuv5WcDi0HCTzp1piqvu6cQrwK18tCXUuY3ttv5C2jLZVRL7EkpUWeL51w9U%2FGuPQVG%2FpnhwV%2B26djMM%2BCj9lvobEPy1Gv4x4hRO44%2BDTQO0fJA7MLlPB7wIboOSCc1oCCDvFoZzyxigl%2BVg958j5LHK9YNVspskN79HhEJxD%2FGkv7blDRRUkVEy59uId8%2BX3FGBwtV0f73fmHLsNcQi%2B5QJN1TPGumWunl8y0PmHx7k8l9w00CH2cQ69lIVIBvbOD6CMfP5olwHnmGbjB2reQ1w6iWn2JmD0z%2BTO6Ww8VxFY69RDzphtvp7qX5WvamdJaALqkZ6RAg%2Bx9uVX0ZxZI6YKUDUQQwKNQwa%2F4Mn2Tuo%2F5z4dGOO%2BJzIG4%2BALLRFn%2FacAVFJLGeByh0T5pDL1i4snOyELAV4wwb%2BBsQY6sQH2JeI%2Fof%2FpkjEgMSjfgAcev0tdZRrbZLM2IQJws7hK3ogs2XtcLse0qvS0b5ibT2yMWWEbr0F%2Bbpkh0tYY34GLbBmUUY3LCmwDc4PaK2BULUCDYi8LGu224Kt9NWz9oUGD2oadKwyHm2qRjbyQiU7ZMGRpv7TQhf05YR8sJTAQpimkcBiloP2WA5JKM%2FlMOrm2IyCOH8MF7aUbt4puy7D46dgVk5l9xd%2F5zNlzg%2F3s5RE%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240418T005238Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Credential=ASIAQ3PHCVTY3K6HJILE%2F20240418%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=f574f3d248efc5c3aa7bf43648b7522f90b46d4d65d4e6010214ab116b4f4c11&hash=41f0658a3a0552a478aaf0a832744ce3d8d4df99c8241178aad8f568d82641cd&host=68042c943591013ac2b2430a89b270f6af2c76d8dfd086a07176afe7c76c2c61&pii=S0092867419307329&tid=spdf-24a30430-2430-4ed3-b0cf-178094bf0b23&sid=3001fddd53ddd140fb7b77c36339939fbaabgxrqa&type=client&tsoh=d3d3LnNjaWVuY2VkaXJlY3QuY29t&ua=1315585657510e0d5106&rr=8760ac5b3e7a9e05&cc=us
markers_regev_epi = [
    "ASCL2",
    "LGR5",
    "LEFTY1",
    "CDC25C",
    "SLC26A2",
    "FABP1",
    "CA1",
    "EPCAM",
    "RBP2",
    "SLC26A3",
    "CCL20",
    "TNFRSF11A",
    "BEST4",
    "TFF1",
    "MUC2",
    "HCK",
    "TRPM5",
    "SCGN",
    "CHGA",
    "CCL7",
    "CCL13",
]
markers_regev_stroma = [
    "RSPO3",
    "CCL11",
    "WNT5B",
    "BMP4",
    "CHI3L1",
    "TAGLN",
    "ACTA2",
    "WNT2B",
    "SOX17",
    "RBP7",
    "VWA1",
    "PLVAP",
    "CDH5",
    "CD36",
    "MADCAM1",
    "DARC",
    "RGS5",
    "SOX10",
    "S100B",
    "CD68",
    "XCR1",
    "CLEC9A",
]
markers_regev_myeloid = [
    "CD1C",
    "S100A8",
    "S100A9",
    "TPSAB1",
    "OSM",
    "NKG7",
    "KLRC1",
    "CCR7",
]
markers_regev_t = ["CCR7", "FOXP3", "CTLA4", "CD8B", "CXCR6", "CD3D"]
markers_regev_b = ["MZB1", "IGHA1", "SELL", "CD19", "AICDA"]
colon_markers_regev_dict = {
    "Epi": [
        "ASCL2",
        "LGR5",
        "LEFTY1",
        "CDC25C",
        "SLC26A2",
        "FABP1",
        "CA1",
        "EPCAM",
        "RBP2",
        "SLC26A3",
        "CCL20",
        "TNFRSF11A",
        "BEST4",
        "TFF1",
        "MUC2",
        "HCK",
        "TRPM5",
        "SCGN",
        "CHGA",
        "CCL7",
        "CCL13",
    ],
    "Myeloid": [
        "S100B",
        "CD68",
        "XCR1",
        "CLEC9A",
        "CD1C",
        "S100A8",
        "S100A9",
        "TPSAB1",
        "OSM",
    ],
    "T": ["NKG7", "KLRC1", "CCR7", "FOXP3", "CTLA4", "CD8B", "CXCR6", "CD3D"],
    "B": ["MZB1", "IGHA1", "SELL", "CD19", "AICDA"],
    "Stroma": [
        "RSPO3",
        "CCL11",
        "WNT5B",
        "BMP4",
        "CHI3L1",
        "TAGLN",
        "ACTA2",
        "WNT2B",
        "SOX17",
        "RBP7",
        "VWA1",
        "PLVAP",
        "CDH5",
        "CD36",
        "MADCAM1",
        "DARC",
        "RGS5",
        "SOX10",
    ],
}

# top fc from human colon cancer atlas
# markers = ['GPX2',  'OLFM4',  'AHCY',  'PERP',  'SPINK1',  'SLC12A2',  'SLC39A4',  'KRT18',  'PCCA',  'HMGA1',  'ASS1',  'ZFAS1',  'SH3YL1',  'TSPAN8',  'HSPD1',  'PPP1R16A',  'KRT19',  'AGR2',  'EPCAM',  'SFN',  'SPINK4',  'GMDS',  'TFF3',  'STARD10',  'GALNT7',  'MUC2',  'AKAP1',  'ATP1B1',  'CANT1',  'TMEM141',  'PAICS',  'GGCT',  'NME1',  'MGST1',  'HSPE1',  'WDR34',  'CSE1L',  'UBE2S',  'CEACAM6',  'MUC13',  'TSPAN1',  'CEACAM5',  'SLC40A1',  'ISG15',  'MDK',  'PLAC8',  'PIGR',  'SMIM22',  'C19orf33',  'IFI27',  'ERO1A',  'CLDN4',  'HOOK2',  'LLGL2',  'TMEM63A',  'WDR60',  'PAXBP1',  'DGAT1',  'FABP1',  'CC2D1A',  'PYGB',  'AHI1',  'VPS13A',  'SLC26A2',  'FCGBP',  'LGALS4',  'TSTA3',  'S100A6',  'ZG16',  'PHGR1',  'USP53',  'FXYD3',  'TRIB1',  'LDLR',  'ANKRD37',  'APOL1',  'IFI6',  'TSPAN3',  'CD55',  'CXCL16',  'QSOX1',  'KRT8',  'GSKIP',  'CYSTM1',  'ANXA4',  'SOX4',  'MARCKSL1',  'MIB2',  'SPINT2',  'SEC11C',  'NDUFB9',  'NTHL1',  'ZKSCAN1']
