insitupy.InSituExperiment.from_config#
- classmethod InSituExperiment.from_config(config_path, mode='insitupy', **kwargs)#
Create an InSituExperiment object from a configuration file.
- Parameters:
config_path (Union[str, os.PathLike, Path]) – The path to the configuration CSV or Excel file.
mode (Literal["insitupy", "xenium"], optional) – The mode to use for loading the datasets. Defaults to “insitupy”.
The configuration file should be either a CSV or Excel file (.csv, .xlsx, .xls) and must contain the following columns:
directory: This column is mandatory and should contain the paths to the directories where the datasets are stored. Each path should be a valid directory path.
Other columns: These columns can contain any additional metadata you want to associate with each dataset. The metadata will be extracted from these columns and stored in the InSituExperiment object.
- Example of a valid configuration file:
directory
experiment_name
patient
treatment
/path/to/dataset1
Experiment 1
Patient A
Drug A
/path/to/dataset2
Experiment 2
Patient B
Drug B