ecotyper.builtin

The prebuilt EcoTyper models (Carcinoma, Lymphoma) by name.

The models live in the R repository (digitalcytometry/ecotyper, folder EcoTyper/<name>/<name>_Fractions). Recovery only needs a few small files per cell type (about 5 MB per model instead of ~440 MB for the whole folder), so these are downloaded on first use from a pinned commit and cached.

Lookup order for builtin_model_path():

  1. $ECOTYPER_MODELS: a local EcoTyper folder of the R repository (or any folder containing <name>/<name>_Fractions);

  2. the cache $ECOTYPER_CACHE (default ~/.cache/ecotyper);

  3. download into the cache.

Module Attributes

COMMIT

EcoTyper R repository commit the models are taken from (the one validated against).

MODEL_FILES

files of <fractions folder> that recovery reads (heatmap_data.txt is not needed: its row names equal the genes of gene_info.txt in every shipped model)

Functions

builtin_model_path(name, *[, download, verbose])

Folder .../<name>/<name>_Fractions of a prebuilt model, downloading it if needed.

cache_dir()

ecotyper.builtin.COMMIT = '11408e71900e15829cf4f33e1331ce47c053472d'

EcoTyper R repository commit the models are taken from (the one validated against).

ecotyper.builtin.MODEL_FILES = ('Analysis/rank_selection/rank_data.txt', 'Ecotypes/discovery/ecotypes.txt', 'Ecotypes/discovery/mapping_all_states.txt')

files of <fractions folder> that recovery reads (heatmap_data.txt is not needed: its row names equal the genes of gene_info.txt in every shipped model)

ecotyper.builtin.cache_dir()[source]
Return type:

Path

ecotyper.builtin.builtin_model_path(name, *, download=True, verbose=True)[source]

Folder .../<name>/<name>_Fractions of a prebuilt model, downloading it if needed.

Parameters:
Return type:

Path