load_ndex_network: Load a cached or local NDEx network

View source: R/ndex.R

load_ndex_networkR Documentation

Load a cached or local NDEx network

Description

Parse a previously downloaded CX2/CX artifact and project it into NEArender's simple undirected network model. Loading is strictly offline. Node identifiers come from the explicitly selected CX node attribute; direction, visual styles, and unselected attributes remain in the raw artifact rather than being guessed into the analytical network. Reciprocal and duplicate edges are collapsed by import_network().

Usage

load_ndex_network(
  resource,
  species,
  input_id_format = master_id_format(species),
  cache_dir = NULL,
  snapshot = NULL,
  format = c("auto", "cx2", "cx"),
  node_key = "name",
  score_column = NULL,
  max_bytes = 1e+09,
  output_network_format = c("igraph", "sparse", "legacy"),
  min_score = NULL,
  n_top = NULL,
  greedy = TRUE,
  case_sensitive = FALSE,
  verbose = TRUE,
  id_mappings = NULL,
  ambiguous = c("error", "drop", "first", "expand"),
  unmapped = c("keep", "drop", "error"),
  server = NULL
)

Arguments

resource

One cached NDEx UUID, one catalog row, or a local CX/CX2 artifact path. A path need not reside in the NEArender cache.

species

Required species declaration passed to import_network(). Use explicit NULL for unsupported species or non-biological nodes.

input_id_format

Submitted node identifier format. It defaults to the species master format and must be explicit when species = NULL.

cache_dir

Cache root used when resource is a UUID or catalog row.

snapshot

Optional cached snapshot identifier. By default the most recently downloaded snapshot pointer is used.

format

Exchange format. "auto" detects a local file and prefers a cached CX2 snapshot over CX.

node_key

CX node identifier field. Use "name", "represents", "id", or any scalar node attribute present in the network.

score_column

Optional scalar numeric CX edge attribute to retain as the canonical NEArender edge weight.

max_bytes

Maximum raw artifact size accepted for in-memory JSON parsing.

output_network_format

Return an igraph, sparse, or legacy NEArender network.

min_score, n_top, greedy

Edge filtering passed to import_network().

case_sensitive

Preserve identifier case.

verbose

Report import dimensions.

id_mappings

Optional object from load_id_mappings().

ambiguous, unmapped

Identifier mapping policies passed to import_network().

server

NDEx server root or REST root. Defaults to the public NDEx server. Redirects are not followed. Internet-facing callers must allow-list trusted HTTPS origins rather than passing an arbitrary user-supplied URL.

Value

A normalized NEArender network with NDEx acquisition and projection provenance available through manifest().

See Also

download_ndex_network(), search_ndex_networks(), import_network()

Examples

## Not run: 
download_ndex_network("f71ab602-97f0-11eb-9e72-0ac135e8bacf")
network <- load_ndex_network(
  "f71ab602-97f0-11eb-9e72-0ac135e8bacf",
  species = "human", node_key = "name"
)
manifest(network)

## End(Not run)

NEArender documentation built on Nov. 28, 2026, 5:10 p.m.