Functions to merge data resources.

link_monarch(
  maps = list(c("variant", "disease"), c("variant", "phenotype"), c("variant", "gene")),
  queries = NULL,
  node_filters = list(phenotype = NULL, subject_db = NULL, gene = NULL),
  as_graph = TRUE,
  domain = "https://data.monarchinitiative.org",
  subdir = "latest/tsv/all_associations/",
  ...
)

Arguments

maps

A list of paired to/from types to filter Monarch association files by. For example, list(c("gene","disease")) will return any files that contains gene-disease associations. Passes to get_monarch_files.

queries

A list of free-form substring queries to filter files by (using any column in the metadata). For example, list("gene_disease","variant_disease") will return any files that contain either of the substrings "gene_disease" or "variant_disease". Passes to get_monarch_files.

node_filters

A named list of filters to apply to the node data. Names should be name of the metadata column, and values should be a vector of valid options. For example, list("type" = c("gene","variant")) will return any rows where the "type" column contains either "gene" or "variant".

as_graph

Return the object as a tbl_graph.

domain

Web domain to search for Monarch files.

subdir

Subdirectory path to search for Monarch files within domain.

...

Not used at this time.

Value

Merged data.

Functions

  • link_monarch(): link_ Link Monarch

    Construct a knowledge graph by iteratively linking together pairs of concepts across multiple Monarch datasets.

Examples

dat <- link_monarch(maps = list(c("gene","disease")))
#> Filtering with `maps`.
#> Files found: 1
#> Constructing data: gene <--> disease
#> Creating nodes.
#> Creating tbl_graph.
#> Removing isolated nodes.