Skip to contents

Given herb names or IDs, fetches herb-compound-target data from the API and constructs a typed igraph network.

Usage

build_hct_network(
  herbs,
  target_method = "drugclip",
  max_compounds = 50L,
  progress = TRUE
)

Arguments

herbs

Character vector of herb names or UniTCM herb IDs.

target_method

Target prediction method passed to get_compound_targets(): "drugclip" (default), "chembl", or "both".

max_compounds

Maximum compounds per herb to include (default 50).

progress

Show progress messages (default TRUE).

Value

An igraph graph object with vertex attributes name, type ("herb", "compound", "target"), and label.

Examples

if (FALSE) { # \dontrun{
g <- build_hct_network(c("UNITCM_H001", "UNITCM_H002"))
igraph::vcount(g)
} # }