simulate_tree
Simulate ground-truth tree topologies using complete binary or birth-death processes, then register them as new datasets for benchmarking reconstruction.
Instructions
Simulate a ground-truth tree topology and register it as a new dataset.
Methods:
"complete_binary": a complete binary tree (pass e.g. {"depth": 6} or {"num_cells": 64} in extra_options).
"birth_death": a birth-death process (pass e.g. {"birth_rate": 1.0, "death_rate": 0.0, "num_extant": 100} in extra_options).
The tree is stored in obst[key_added]. Follow with simulate_characters to add a character matrix for benchmarking reconstruction.
Args: method: "complete_binary" or "birth_death". key_added: obst key for the simulated tree. extra_options: Keyword args forwarded to the cassiopeia.sim function.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | complete_binary | |
| key_added | No | simulated | |
| extra_options | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n_obs | Yes | Number of observations (cells/leaves). | |
| trees | No | Keys in tdata.obst. | |
| layers | No | ||
| n_vars | Yes | Number of variables (e.g. genes). | |
| source | No | Origin path or generator. | |
| uns_keys | No | ||
| obsm_keys | No | ||
| dataset_id | Yes | ||
| obs_columns | No |