# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01_static.ipynb.

# %% auto 0
__all__ = ['NBKS_DIR', 'ROOT_DIR', 'EXPL_DIR', 'DATA_DIR', 'RESULTS_DIR', 'FIGURES_DIR', 'IZALITH_DATA_DIR', 'GIBBS_DATA_DIR',
           'PERIOD', 'GZ', 'H5', 'PT', 'PY', 'BED', 'CSV', 'MTX', 'TAR', 'TSV', 'NPY', 'NPZ', 'TXT', 'PIP', 'PTH',
           'ZIP', 'JSON', 'H5AD', 'IPYNB', 'ARROW', 'FASTA', 'PARQUET', 'EXT_GZ', 'EXT_H5', 'EXT_PT', 'EXT_PY',
           'EXT_BED', 'EXT_CSV', 'EXT_MTX', 'EXT_TAR', 'EXT_TSV', 'EXT_NPY', 'EXT_NPZ', 'EXT_TXT', 'EXT_PIP', 'EXT_PTH',
           'EXT_ZIP', 'EXT_JSON', 'EXT_H5AD', 'EXT_IPYNB', 'EXT_ARROW', 'EXT_FASTA', 'EXT_PARQUET', 'EXT_TAR_GZ',
           'SEED', 'ITEM', 'TIME', 'LABEL', 'SERIES', 'SAMPLE', 'SAMPLES', 'CONDITION', 'CONDITIONS', 'OBS', 'VAR',
           'OBSM', 'VARM', 'OBSP', 'VARP', 'UNS', 'LAYER', 'LAYERS', 'HVG', 'PCA', 'UMAP', 'TSNE', 'PHATE', 'MAGIC',
           'CELL', 'CELLS', 'BARCODE', 'BARCODES', 'ID', 'MITO', 'RIBO', 'GENE', 'GENE_ID', 'GENE_IDS', 'GENE_SYMBOL',
           'HIGHLY_VARIABLE', 'ENSEMBL', 'ENSEMBL_ID', 'HUMAN', 'MOUSE', 'HUMAN_TF', 'MOUSE_TF', 'HUMAN_GENE_SYMBOL',
           'HUMAN_ENSEMBLE_ID', 'MOUSE_ENSEMBLE_ID', 'BATCH', 'TIMEPOINT', 'TIMEPOINTS', 'TOTAL_COUNTS', 'DOUBLET',
           'DOUBLET_SCORES', 'PREDICTED_DOUBLETS', 'PRENORM', 'DETECTED', 'SCALED_NORMALIZED', 'COUNTS', 'PCT',
           'PERCENT', 'PCT_COUNTS', 'PCT_COUNTS_MITO', 'PCT_COUNTS_RIBO', 'X', 'X_', 'X_PRENORM', 'X_DETECTED',
           'X_SCALED_NORMALIZED', 'X_MAGIC', 'X_PCA', 'X_PCA_HVG', 'X_PHATE', 'X_PHATE_HVG', 'ADATA', 'MATRIX',
           'FEATURES', 'SENSITIVITY', 'AMAZON_BUCKET_FLUENTBIO', 'LINEAGE_ESC', 'LINEAGE_PREGERM',
           'LINEAGE_NEURAL_CREST', 'LINEAGE_NEURAL_PROG', 'LINEAGE_ENDO', 'LINEAGE_MESO', 'LINEAGE_CARDIAC',
           'LINEAGE_HEMA', 'LINEAGE_SOMITES', 'LINEAGE_TROPHOBLAST', 'LINEAGE_ALL', 'LINEAGE_NAMES', 'MARKERS_ESC',
           'MARKERS_PREGERM', 'MARKERS_NEURAL_CREST', 'MARKERS_NEURAL_PROG', 'MARKERS_ENDO', 'MARKERS_MESO',
           'MARKERS_CARDIAC', 'MARKERS_HEMA', 'MARKERS_SOMITES', 'MARKERS_TROPHOBLAST', 'MARKERS_LISTS', 'MARKERS_ALL',
           'LINEAGE_MARKERS', 'RC_PARAMS', 'SEQRUN', 'SEQRUNS', 'TREATMENT', 'TREATMENTS', 'SENS', 'SENSITIVITIES']

# %% ../nbs/01_static.ipynb 5
import os, sys, pkg_resources

# %% ../nbs/01_static.ipynb 6
'''----------------------------------------------------
NOTE: RELATIVE DEFINITIONS
----------------------------------------------------'''

# nbdev nbs directory, i.e. `nbs/``
NBKS_DIR = os.path.abspath('')

# project root directory
ROOT_DIR = os.path.join(NBKS_DIR, '..')

# where example notebooks are stored, i.e. `examples/`
EXPL_DIR = os.path.join(ROOT_DIR, 'examples')

# where small data is stored, i.e. `data/`
DATA_DIR = os.path.join(ROOT_DIR, 'data')

# where small data is stored, i.e. `results/`
RESULTS_DIR = os.path.join(ROOT_DIR, 'results')

# where small data is stored, i.e. `figures/`
FIGURES_DIR = os.path.join(ROOT_DIR, 'figures')

IZALITH_DATA_DIR = os.path.expanduser('~/Data')

GIBBS_DATA_DIR = '/gpfs/gibbs/pi/krishnaswamy_smita'

# %% ../nbs/01_static.ipynb 9
PERIOD = '.'

# %% ../nbs/01_static.ipynb 10
GZ = f'gz'
H5 = f'h5'
PT = f'pt'
PY = f'py'

BED = f'bed'
CSV = f'csv'
MTX = f'mtx'
TAR = f'tar'
TSV = f'tsv'
NPY = f'npy'
NPZ = f'npz'
TXT = f'txt'
PIP = f'pip'
PTH = f'pth'
ZIP = f'zip'

JSON = f'json'
H5AD = f'h5ad'
IPYNB = f'ipynb'

ARROW = 'arrow'
FASTA = 'fasta'
PARQUET = 'parquet'


# %% ../nbs/01_static.ipynb 11
EXT_GZ = f'{PERIOD}{GZ}'
EXT_H5 = f'{PERIOD}{H5}'
EXT_PT = f'{PERIOD}{PT}'
EXT_PY = f'{PERIOD}{PY}'

EXT_BED = f'{PERIOD}{BED}'
EXT_CSV = f'{PERIOD}{CSV}'
EXT_MTX = f'{PERIOD}{MTX}'
EXT_TAR = f'{PERIOD}{TAR}'
EXT_TSV = f'{PERIOD}{TSV}'
EXT_NPY = f'{PERIOD}{NPY}'
EXT_NPZ = f'{PERIOD}{NPZ}'
EXT_TXT = f'{PERIOD}{TXT}'
EXT_PIP = f'{PERIOD}{PIP}'
EXT_PTH = f'{PERIOD}{PTH}'
EXT_ZIP = f'{PERIOD}{ZIP}'

EXT_JSON = f'{PERIOD}{JSON}'
EXT_H5AD = f'{PERIOD}{H5AD}'
EXT_IPYNB = f'{PERIOD}{IPYNB}'

EXT_ARROW = f'{PERIOD}{ARROW}'
EXT_FASTA = f'{PERIOD}{FASTA}'

EXT_PARQUET = f'{PERIOD}{PARQUET}'

EXT_TAR_GZ = f'{EXT_TAR}{EXT_GZ}'

# %% ../nbs/01_static.ipynb 15
SEED = 'seed'
ITEM = 'item'
TIME = 'time'
LABEL = 'label'
SERIES = 'series'
SAMPLE = 'sample'
SAMPLES = 'samples'
CONDITION = 'condition'
CONDITIONS = f'{CONDITION}s'

# %% ../nbs/01_static.ipynb 19
OBS = 'obs'
VAR = 'var'

OBSM = f'{OBS}m'
VARM = f'{VAR}m'

OBSP = f'{OBS}p'
VARP = f'{VAR}p'

UNS = 'UNS'
LAYER = 'layer'
LAYERS = 'layers'

# %% ../nbs/01_static.ipynb 21
HVG = 'hvg'

PCA = 'pca'
UMAP = 'umap'
TSNE = 'tsne'
PHATE = 'phate'
MAGIC = 'magic'

# %% ../nbs/01_static.ipynb 23
CELL = 'cell'
CELLS = f'{CELL}s'
BARCODE = 'barcode'
BARCODES = f'{BARCODE}s'

# %% ../nbs/01_static.ipynb 25
ID = 'id'
MITO = 'mito'
RIBO = 'ribo'
GENE = 'gene'
GENE_ID = f'{GENE}_id'
GENE_IDS = f'{GENE_ID}s'
GENE_SYMBOL = f'{GENE}_symbol'
HIGHLY_VARIABLE = 'highly_variable'

ENSEMBL = 'ensembl'
ENSEMBL_ID = f'{ENSEMBL}_id'

HUMAN = 'human'
MOUSE = 'mouse'

HUMAN_TF = f'{HUMAN}TFs'
MOUSE_TF = f'{MOUSE}TFs'

HUMAN_GENE_SYMBOL = f'{HUMAN}GeneSymbol'
HUMAN_ENSEMBLE_ID = f'{HUMAN}EnsemblID'
MOUSE_ENSEMBLE_ID = f'{MOUSE}EnsemblID'

BATCH = 'batch'
TIMEPOINT = 'timepoint'
TIMEPOINTS = f'{TIMEPOINT}s'
TOTAL_COUNTS = 'total_counts'
DOUBLET = 'doublet'
DOUBLET_SCORES = f'{DOUBLET}_scores'
PREDICTED_DOUBLETS = f'predicted_{DOUBLET}s'

PRENORM = 'prenorm'
DETECTED = 'detected'
SCALED_NORMALIZED = 'scaled_normalized'


COUNTS = 'counts'
PCT = 'pct'
PERCENT = 'percent'
PCT_COUNTS = f'{PCT}_{COUNTS}'
PCT_COUNTS_MITO = f'{PCT}_{COUNTS}_{MITO}'
PCT_COUNTS_RIBO = f'{PCT}_{COUNTS}_{RIBO}'

# %% ../nbs/01_static.ipynb 26
_ = '_'
X = 'X'
X_ = f'{X}{_}'

# %% ../nbs/01_static.ipynb 27
# Layer storing prenormalized counts in adata.layers
X_PRENORM = f'{X_}{PRENORM}'

# Layer storing values where prenormalized counts is at least 0 in adata.layers
X_DETECTED = f'{X_}{DETECTED}'

# Layer storing counts normalized
X_SCALED_NORMALIZED = f'{X_}{SCALED_NORMALIZED}'

# Layer storing MAGIC embedding in adata.obsm
X_MAGIC = f'{X_}{MAGIC}'

# Layer storing PCA embedding in adata.obsm
X_PCA = f'{X_}{PCA}'

# Layer storing PCA embedding just on HVGs in adata.obsm
X_PCA_HVG = f'{X_}{PCA}_{HVG}'

# Layer storing PHATE embedding just in adata.obsm
X_PHATE = f'{X_}{PHATE}'

# Layer storing PHATE embedding just on HVGs in adata.obsm
X_PHATE_HVG = f'{X_}{PHATE}_{HVG}'

# %% ../nbs/01_static.ipynb 29
ADATA = 'adata'
MATRIX = 'matrix'
FEATURES = 'features'
SENSITIVITY = 'sensitivity'

# %% ../nbs/01_static.ipynb 31
AMAZON_BUCKET_FLUENTBIO = 'https://fbs-public.s3.us-east-2.amazonaws.com'

# %% ../nbs/01_static.ipynb 33
import itertools

# %% ../nbs/01_static.ipynb 35
LINEAGE_ESC = 'esc'
LINEAGE_PREGERM = 'pregerm'
LINEAGE_NEURAL_CREST = 'neural_crest'
LINEAGE_NEURAL_PROG = 'neural_prog'
LINEAGE_ENDO = 'endo'
LINEAGE_MESO = 'meso'
LINEAGE_CARDIAC = 'cardiac'
LINEAGE_HEMA = 'hema'
LINEAGE_SOMITES = 'somites'
LINEAGE_TROPHOBLAST = 'trophblast'
LINEAGE_ALL = 'all'

# %% ../nbs/01_static.ipynb 36
LINEAGE_NAMES = [
    LINEAGE_ESC, LINEAGE_PREGERM, LINEAGE_NEURAL_CREST,
    LINEAGE_NEURAL_PROG, LINEAGE_ENDO, LINEAGE_MESO,
    LINEAGE_CARDIAC, LINEAGE_HEMA, LINEAGE_SOMITES,
    LINEAGE_TROPHOBLAST, LINEAGE_ALL
]

# %% ../nbs/01_static.ipynb 38
MARKERS_ESC = ['POU5F1', 'PRDM14', 'NANOG', 'SOX2', 'DPPA4', 'NR2F6', 'OTX2']
MARKERS_PREGERM = ['TP53','NR6A1','GBX2','ZIC2','ZIC5']
MARKERS_NEURAL_CREST = ['PAX3','FOXD3','ITGA4','EDNRB','SOX9','SOX10']
MARKERS_NEURAL_PROG = ['NES','MAP2','PAX6','SOX1','ZBTB16','ONECUT1', 'ONECUT2','NR2F1','ISL1','NPAS1','EN2','SOX2','NEUROD1']
MARKERS_ENDO = ['EOMES','FOXA2','SOX17','GATA4','GATA6','HHEX']
MARKERS_MESO = ['MIXL1','CER1']
MARKERS_CARDIAC = ['NKX2-5','GATA4','MYBPC2','TTN','TNNT2','MYH6','TBX5']
MARKERS_HEMA = ['NKX2-5','TAL1','SOX17','CD34','PECAM1','CD69','CXCR4','CDH5','KDR','LMO2']
MARKERS_SOMITES = ['WT1','TBX18','TBX15','PDGFRA','SIX2','TBX5']
MARKERS_TROPHOBLAST = ['GATA3','TP63','ITGA6','CDH1']

# %% ../nbs/01_static.ipynb 39
MARKERS_LISTS =  [
    MARKERS_ESC, MARKERS_PREGERM, MARKERS_NEURAL_CREST,
    MARKERS_NEURAL_PROG, MARKERS_ENDO, MARKERS_MESO, 
    MARKERS_CARDIAC, MARKERS_HEMA, MARKERS_SOMITES, 
    MARKERS_TROPHOBLAST,
]
MARKERS_ALL = list(itertools.chain(*MARKERS_LISTS))
MARKERS_LISTS.append(MARKERS_ALL)

# %% ../nbs/01_static.ipynb 41
LINEAGE_MARKERS = dict(zip(LINEAGE_NAMES, MARKERS_LISTS))

# %% ../nbs/01_static.ipynb 44
RC_PARAMS = {
    'axes.axisbelow': False,
    'axes.edgecolor': 'lightgrey',
    'axes.facecolor': 'None',
    'axes.grid': False,
    'axes.labelcolor': 'dimgrey',
    'axes.spines.right': False,
    'axes.spines.top': False,
    'figure.facecolor': 'white',
    'lines.solid_capstyle': 'round',
    'patch.edgecolor': 'w',
    'patch.force_edgecolor': True,
    'text.color': 'dimgrey',
    'xtick.bottom': False,
    'xtick.color': 'dimgrey',
    'xtick.direction': 'out',
    'xtick.top': False,
    'ytick.color': 'dimgrey',
    'ytick.direction': 'out',
    'ytick.left': False,
    'ytick.right': False,
    'font.size': 12,
    'axes.titlesize': 10,
    'axes.labelsize': 12
}

# %% ../nbs/01_static.ipynb 48
SEQRUN = 'seqrun'
SEQRUNS = f'{SEQRUN}s'
TREATMENT = f'treatment'
TREATMENTS = f'{TREATMENT}s'

SENS = 'sens'
SENSITIVITIES = 'sensitivities'
