Skip to content

Wrapper function to conduct the full regulatory topic-modeling workflow for one selected topic-document construction method.

Usage

run_topic_modeling(
  filtered_dir,
  multiomic_data = NULL,
  comparisons,
  output_dir,
  project_config = NULL,
  method = NULL,
  k_grid = NULL,
  warplda_iterations = NULL,
  topic_link_output = NULL,
  vae_device = NULL,
  vae_batch_size = NULL,
  pathway_backend = NULL,
  ...
)

Arguments

filtered_dir

Directory containing Module 3 filtered differential-link files.

multiomic_data

Optional CraftGRN multiomic object. Required when `replicate_documents = TRUE`.

comparisons

Comparison or condition grouping table, or a CSV path.

output_dir

Topic output directory.

project_config

Optional project YAML path or config list. When supplied, `topic_method`, `topic_k` or `topic_k_grid`, `warplda_iterations`, and `topic_link_output` are used for arguments that are left as `NULL`.

method

Single Module 3 method ID. If `NULL`, read from `project_config` or use the package default.

k_grid

Integer topic numbers. If `NULL`, read from `project_config` or use `10`.

warplda_iterations

Number of native WarpLDA iterations. If `NULL`, read from `project_config` or use `2000`.

Topic-link output mode. If `NULL`, read from `project_config` or use `"pass"`.

vae_device

VAE device, for example `"auto"`, `"cpu"`, or `"cuda"`. If `NULL`, read from `project_config` or use `"auto"`.

vae_batch_size

VAE mini-batch size. If `NULL`, read from `project_config` or use `64`.

pathway_backend

Pathway enrichment backend. Use `"enrichly"` for local cached enrichment or `"enrichr"` for the Enrichr web API. If `NULL`, read from `project_config` or use `"enrichly"`.

...

Additional arguments passed to the internal topic-modeling wrapper.

Value

An invisible list with topic input/model/extraction paths, review outputs, and `qc_report` when requested.