Returns the genomes detected in one sample as a `gifter_community`, so that [community_traits()], [community_network()] and everything else keep working on a single sample unchanged. Nothing is re-evaluated: the calls are the catalogue's, restricted to the detected genomes.
The reference frame does not shrink
The returned community keeps the catalogue's evaluated GIFTs rather than recomputing the union over the detected genomes. For a catalogue whose genomes were evaluated together — the ordinary case — the two are identical. They differ only when genomes were evaluated over different GIFT subsets, and there the recomputed union would give every sample a different `assessable` denominator, which is the sample-level form of the failure the mixed-release refusal in [gifter_community()] exists to prevent. A dataset's reference frame is the catalogue's, and it does not shrink because a sample is small.
Examples
donor <- evaluate_gifts(data.frame(
gene_id = "g1", namespace = "KO", accession = "K01198"
))
recipient <- evaluate_gifts(data.frame(
gene_id = "g1", namespace = "KO", accession = "K01805"
))
catalogue <- gifter_community(donor = donor, recipient = recipient)
abundance <- matrix(
c(0.7, 0.3, 0, 1), nrow = 2,
dimnames = list(c("donor", "recipient"), c("gut", "soil"))
)
dataset <- gifter_dataset(catalogue, abundance)
sample_community(dataset, "soil")$genome_id
#> [1] "recipient"