Skip to contents

Projects the curated GIFT composition graph onto a genome-resolved community: a directed edge means one genome supports a GIFT whose declared output anchor another genome's supported GIFT declares as an input.

Usage

community_network(
  community,
  interaction = "metabolic_handoff",
  frame = NULL,
  quality = NULL,
  limit = 100L,
  db = NULL
)

Arguments

community

A community from [gifter_community()].

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"`.

limit

Passed to [gift_cycles()] for distributed cycle closure.

db

Optional open gifter database connection.

Value

A `gifter_network` list with `nodes` (one row per genome, with provider and recipient degrees), `edges`, `chain_coverage` (each curated composition link classified as `within_genome`, `community_distributed`, `not_transferable` or `not_represented`), `cycle_coverage`, and `metrics`.

Details

No compatibility rule is invented here. [gift_graph()] already decides when one GIFT's output can reach another's input, and this reads that decision. `metabolic_handoff` is therefore the only interaction type: the other GIFT types declare no anchors, and an edge between them would have to be inferred from co-occurrence, which is not evidence of anything.

What an edge is and is not

An edge is a **potential** compatibility relationship between what one genome encodes and what another encodes. It is not evidence that exchange occurs, that either GIFT is expressed, that the molecule is ever released at a useful concentration, or that the two organisms co-occur. Cross-feeding is a hypothesis an edge can support, never a conclusion it establishes.

Every edge carries the `edge_quality` of the GIFT edge beneath it. An `exact` edge means both GIFTs declared the same anchor; a `compartment_inexact` edge means one side left the compartment unresolved, so the handoff assumes a location that curation did not license. A network filtered to exact edges is the stronger claim.

A genome supporting both ends composes the chain internally and produces no edge, because that is a property of one genome rather than a relationship between two.

A cross-genome edge additionally requires the producing GIFT's output anchor to be declared `extracellular`. A cytoplasmic anchor is inside one cell, and an `unspecified` one was never evidenced as leaving it, so neither can carry a molecule between organisms. `chain_coverage` records such a link as `not_transferable` when its two halves fall in different genomes: nothing completes it, and calling it distributed would hand a cytoplasmic intermediate from one organism to another.