Returns which genomes support which GIFTs, in the three states the assessability layer distinguishes: `TRUE` supported, `FALSE` confidently unsupported, and `NA` indeterminate — the markers do not support a complete implementation, and the policy declines to read that as absence.
Usage
gift_matrix(
x,
frame = NULL,
quality = NULL,
policy = "none",
threshold = NULL,
min_confidence = NULL
)Arguments
- x
A `gifter_community` or a `gifter_dataset`. A dataset delegates to its catalogue: calls are a property of a genome, so a dataset has exactly one call matrix and no sample can change it.
- frame
Optional [reference_frame()] restricting the columns. Omitted, every GIFT the evaluation produced is a column.
- quality, policy, threshold, min_confidence
Assessability, on the terms of [community_traits()]. With the default policy nothing is indeterminate and the matrix is Boolean, which is stated in the `assessability_policy` attribute rather than implied.
Value
A logical genomes by GIFTs matrix with `reference_frame`, `database_version` and `assessability_policy` attributes.
Details
This is the object to hand to an external statistics package. The `NA` is the point of it: a genome that was never fully observed has not been shown to lack anything, and a `0` in its place is a fabricated absence that every model fitted on the matrix will inherit.
Orientation
Rows are genomes and columns are GIFTs, because rows are observations in the packages that receive it. This is the transpose of the matrix a `gifter_community` holds internally.
What the matrix is not
A supported call means the observed markers support at least one complete curated implementation. It does not mean expression, activity, flux, physiological state or phenotype, and no arrangement of the matrix makes it mean any of those. The reference frame and database version are carried as attributes so that a matrix exported from one release is not silently compared with one from another.
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"
))
community <- gifter_community(donor = donor, recipient = recipient)
matrix <- gift_matrix(community)
dim(matrix)
#> [1] 2 163