Learn R Programming

PubChemR (version 3.0.0)

pc_cross_domain_join: Join Compound, Substance, Assay, and Target Tables

Description

Joins cross-domain PubChem tables into a single analysis-ready tibble using configurable key mappings and join type.

Usage

pc_cross_domain_join(
  compounds,
  substances = NULL,
  assays = NULL,
  targets = NULL,
  by = list(compound_substance = "CID", compound_assay = "CID", assay_target = "AID"),
  join = c("left", "inner", "full")
)

Value

A joined tibble suitable for downstream analysis workflows.

Arguments

compounds

Base compound table.

substances

Optional substance table.

assays

Optional assay table.

targets

Optional target table.

by

Named list of join keys for each join edge.

join

Join type (`"left"`, `"inner"`, `"full"`).

Details

Join steps are applied in order: compounds-substances, compounds-assays, then assays-targets when corresponding tables are supplied.

Examples

Run this code
compounds <- tibble::tibble(CID = c("1", "2"), MW = c(100, 200))
assays <- tibble::tibble(CID = c("1", "2"), AID = c("10", "11"))
pc_cross_domain_join(compounds, assays = assays)

Run the code above in your browser using DataLab