-
Notifications
You must be signed in to change notification settings - Fork 0
Concepts configuration files
Santiago Castro Dau edited this page Nov 8, 2023
·
1 revision
Each concept is fully defined by a config file. These configs should be placed in <root>/prediction_tasks/<prediction_task>/normalized_with_<normalize_with>/configs/concept_configs. The reason for this name is that each config will define a concept dataset, a collection of graphs constructed with a specific construction algorithm and a subset of the cells.
Each config should be named <name_of_concept>.yaml and should have the following structure.
# Name of the concept
concept_name: <name_of_concept>
# Type of algorithm to use for graph construction. Supported options: "contact", "radius" and "knn"
builder_type: contact
# Depending on the builder_type chosen there will be a need to specify different building parameters. These here are the ones for the "contact" option.
builder_params:
dilation_kernel: disk
radius: 4
include_self: true
# Name of the columns in the so.obs[<spl>] which hold the spatial location of the cell centroid.
coordinate_keys:
- location_center_x
- location_center_y
# Key in so.masks[<spl>] indicating the type of cell masks to use for the graph construction.
mask_key: cellmasks
# Boolean flag indicating whether the graphs will be constructed on all of the cells (false) or on a subset (true).
# Set to true and specify all cell types to avoid including cells without marker information.
build_concept_graph: true
# Parameters for subset graph construction. Only relevant if build_concept_graph is true.
concept_params:
# Column name in so.obs[<spl>] to use to select the subset of the cell to be included in the graph
filter_col: cell_class
# Labels in the entries of so.obs[<spl>][<filter_col>] to include in the graph
labels:
- Vessel
- Immune
- Stroma
- TumorFor radius the builder_params are:
builder_params:
radius: 30
mode: connectivity
metric: minkowski
p: 2
metric_params:
include_self: false
n_jobs: -1For knn:
builder_params:
n_neighbors: 4
mode: connectivity
metric: minkowski
p: 2
metric_params:
include_self: false
n_jobs: -1