text: tcga_study_abbr_dict = {
      "LAML": "Acute Myeloid Leukemia",
      "ACC": "Adrenocortical carcinoma",
      "BLCA": "Bladder Urothelial Carcinoma",
      "LGG": "Brain Lower Grade Glioma",
      "BRCA": "Breast invasive carcinoma",
      "CESC": "Cervical squamous cell carcinoma and endocervical adenocarcinoma",
      "CHOL": "Cholangiocarcinoma",
      "LCML": "Chronic Myelogenous Leukemia",
      "COAD": "Colon adenocarcinoma",
      "CNTL": "Controls",
      "ESCA": "Esophageal carcinoma",
      "FPPP": "FFPE Pilot Phase II",
      "GBM": "Glioblastoma multiforme",
      "HNSC": "Head and Neck squamous cell carcinoma",
      "KICH": "Kidney Chromophobe",
      "KIRC": "Kidney renal clear cell carcinoma",
      "KIRP": "Kidney renal papillary cell carcinoma",
      "LIHC": "Liver hepatocellular carcinoma",
      "LUAD": "Lung adenocarcinoma",
      "LUSC": "Lung squamous cell carcinoma",
      "DLBC": "Lymphoid Neoplasm Diffuse Large B-cell Lymphoma",
      "MESO": "Mesothelioma",
      "MISC": "Miscellaneous",
      "OV": "Ovarian serous cystadenocarcinoma",
      "PAAD": "Pancreatic adenocarcinoma",
      "PCPG": "Pheochromocytoma and Paraganglioma",
      "PRAD": "Prostate adenocarcinoma",
      "READ": "Rectum adenocarcinoma",
      "SARC": "Sarcoma",
      "SKCM": "Skin Cutaneous Melanoma",
      "STAD": "Stomach adenocarcinoma",
      "TGCT": "Testicular Germ Cell Tumors",
      "THYM": "Thymoma",
      "THCA": "Thyroid carcinoma",
      "UCS": "Uterine Carcinosarcoma",
      "UCEC": "Uterine Corpus Endometrial Carcinoma",
      "UVM": "Uveal Melanoma"
  }
  
  tcga_study_abbr_dict2 = {k: v + ' (' + k + ')' for k, v in tcga_study_abbr_dict.items()}
  
  tcga_sample_type_dict = {
      "01": "Primary Solid Tumor",
      "02": "Recurrent Solid Tumor",
      "03": "Primary Blood Derived Cancer - Peripheral Blood",
      "04": "Recurrent Blood Derived Cancer - Bone Marrow",
      "05": "Additional - New Primary",
      "06": "Metastatic",
      "07": "Additional Metastatic",
      "08": "Human Tumor Original Cells",
      "09": "Primary Blood Derived Cancer - Bone Marrow",
      "10": "Blood Derived Normal",
      "11": "Solid Tissue Normal",
      "12": "Buccal Cell Normal",
      "13": "EBV Immortalized Normal",
      "14": "Bone Marrow Normal",
      "15": "sample type 15",
      "16": "sample type 16",
      "20": "Control Analyte",
      "40": "Recurrent Blood Derived Cancer - Peripheral Blood",
      "50": "Cell Lines",
      "60": "Primary Xenograft Tissue",
      "61": "Cell Line Derived Xenograft Tissue",
      "99": "sample type 99"
  }
  
  cell_types = ['B.cells.naive', 'B.cells.memory', 'Plasma.cells', 'T.cells.CD8',
         'T.cells.CD4.naive', 'T.cells.CD4.memory.resting',
         'T.cells.CD4.memory.activated', 'T.cells.follicular.helper',
         'T.cells.regulatory..Tregs.', 'T.cells.gamma.delta', 'NK.cells.resting',
         'NK.cells.activated', 'Monocytes', 'Macrophages.M0', 'Macrophages.M1',
         'Macrophages.M2', 'Dendritic.cells.resting',
         'Dendritic.cells.activated', 'Mast.cells.resting',
         'Mast.cells.activated', 'Eosinophils', 'Neutrophils']
  
  augmented_cell_types = ['B.cells.naive',
   'B.cells.memory',
   'Plasma.cells',
   'T.cells.CD8',
   'T.cells.CD4.naive',
   'T.cells.CD4.memory.resting',
   'T.cells.CD4.memory.activated',
   'T.cells.follicular.helper',
   'T.cells.regulatory..Tregs.',
   'T.cells.gamma.delta',
   'NK.cells.resting',
   'NK.cells.activated',
   'Monocytes',
   'Macrophages.M0',
   'Macrophages.M1',
   'Macrophages.M2',
   'Dendritic.cells.resting',
   'Dendritic.cells.activated',
   'Mast.cells.resting',
   'Mast.cells.activated',
   'Eosinophils',
   'Neutrophils',
   'T.cells.all',
   'B.cells.all',
   'Nk.cells.all',
   'Macrophages.all',
   'Dendritic.cells.all',
   'Mast.cells.all']
  
  cell_types_cosmetic_dict = {
   'B.cells.naive': 'Naive B cells',
   'B.cells.memory': 'Memory B cells',
   'Plasma.cells': 'Plasma cells',
   'T.cells.CD8': 'CD8 T cells',
   'T.cells.CD4.naive': 'Naive CD4 T cells',
   'T.cells.CD4.memory.resting': 'Resting memory CD4 T cells',
   'T.cells.CD4.memory.activated': 'Activated memory CD4 T cells',
   'T.cells.follicular.helper': 'Follicular helper T cells',
   'T.cells.regulatory..Tregs.': 'Regulatory T cells',
   'T.cells.gamma.delta': 'Gamma-delta T cells',
   'NK.cells.resting': 'Resting NK cells',
   'NK.cells.activated': 'Activated NK cells',
   'Monocytes': 'Monocytes',
   'Macrophages.M0': 'M0 Macrophages',
   'Macrophages.M1': 'M1 Macrophages',
   'Macrophages.M2': 'M2 Macrophages', 
   'Dendritic.cells.resting': 'Resting dendritic cells',
   'Dendritic.cells.activated': 'Activated dendritic cells',
   'Mast.cells.resting': 'Resting mast cells',
   'Mast.cells.activated': 'Activated mast cells',
   'Eosinophils': 'Eosinophils',
   'Neutrophils': 'Neutrophils',
   'T.cells.all': 'T cells cells',
   'B.cells.all': 'B cells cells',
   'Nk.cells.all': 'NK cells cells',
   'Macrophages.all': 'Macrophages',
   'Dendritic.cells.all': 'Dendritic cells cells',
   'Mast.cells.all': 'Mast cells cells'
  }
  
  cell_types_cosmetic_dict_short = {k:(v[:-6] if v[-5:] == 'cells' else v) for k, v in cell_types_cosmetic_dict.items()}
  
  plot_cell_types = [
   'B.cells.all',
   'B.cells.naive',
   'B.cells.memory',
   'Plasma.cells',
   'T.cells.all',
   'T.cells.CD8',
   'T.cells.CD4.naive',
   'T.cells.CD4.memory.resting',
   'T.cells.CD4.memory.activated',
   'T.cells.follicular.helper',
   'T.cells.regulatory..Tregs.',
   'T.cells.gamma.delta',
   'Nk.cells.all',
   'NK.cells.resting',
   'NK.cells.activated',
   'Monocytes',
   'Eosinophils',
   'Neutrophils',
   'Macrophages.all',
   'Dendritic.cells.all',
   'Mast.cells.all'
  ]