Potential resource-handoff topology of every sample in a dataset
Source:R/dataset-network.R
dataset_network.RdAsks of each sample the question [community_network()] asks of one community: which genomes detected there support a GIFT whose declared output anchor another detected genome's supported GIFT declares as an input.
Usage
dataset_network(
dataset,
interaction = "metabolic_handoff",
frame = NULL,
quality = NULL,
detection = 0,
limit = 100L,
db = NULL
)Arguments
- dataset
A dataset from [gifter_dataset()].
- interaction
Interaction type. Only `"metabolic_handoff"` is defined.
- frame
Optional [reference_frame()] restricting which GIFTs may form edges.
- quality
Optional [gift_graph()] edge quality filter, `"exact"` or `"compartment_inexact"`. This is the quality of a curated GIFT edge, not a genome completeness estimate.
- detection
Abundance a genome must exceed to be a member of a sample's community. `0` by default.
- limit
Passed to [gift_cycles()] for distributed cycle closure, which is enumerated once and read per sample.
- db
Optional open gifter database connection.
Value
A `gifter_dataset_network` list whose `nodes`, `edges`, `chain_coverage`, `cycle_coverage` and `metrics` each carry a `sample_id` column.
Details
No compatibility rule is invented, and none is relaxed. [gift_graph()] decides when one GIFT's output can reach another's input, every edge inherits the `edge_quality` of the GIFT edge beneath it, and a cross-genome edge still requires the producing GIFT's output anchor to be declared `extracellular`. Detection decides only which genomes are in a sample's community.
The catalogue's edge set is built once and restricted to each sample's detected genomes, because which genome could hand which molecule to which other is a property of the two genomes. Degrees, density, chain coverage and cycle closure are recounted per sample, since each depends on which genomes are actually there — a link is completed within a genome only when a detected genome holds both ends.
What an edge is and is not
An edge is a **potential** compatibility relationship between what one genome encodes and what another encodes, in a sample where both were detected. It is not evidence that exchange occurs, that either GIFT is expressed, that the molecule is released at a useful concentration, or that the two organisms ever meet. Cross-feeding is a hypothesis an edge can support, never a conclusion it establishes, and a difference in edge count between two groups of samples is not a difference in interaction.