| airr_public | R Documentation |
A family of functions to quantify public or shared receptors between repertoire.
Supported methods are the following.
airr_public_intersection - number of shared receptors between
each pair of repertoires (intersection size). Handy for quick overlap heatmaps,
QC of replicate similarity, or spotting donor-shared "public" clonotypes.
airr_public_jaccard - Jaccard similarity of receptor
sets between repertoires (A \cap B / A \cup B). Best when comparing cohorts with
different sizes to get a scale-invariant overlap score.
airr_public_intersection(
idata,
autojoin = getOption("immundata.autojoin", TRUE),
format = c("long", "wide")
)
airr_public_jaccard(
idata,
autojoin = getOption("immundata.autojoin", TRUE),
format = c("long", "wide")
)
idata |
An |
autojoin |
Logical. If TRUE, join repertoire metadata by the schema repertoire id.
Change the default behaviour by calling |
format |
String. One of |
airr_public_intersectionA symmetric numeric matrix where rows/columns are repertoire_id and each
cell is the count of shared unique receptors. The diagonal contains per-repertoire
richness (total unique receptors). Row/column names are repertoire IDs.
airr_public_jaccardA symmetric numeric matrix where rows/columns are repertoire_id and each
cell is the Jaccard similarity in [0, 1]. The diagonal is 1. Row/column
names are repertoire IDs.
immundata::ImmunData
# Limit the number of threads used by the underlying DB for this session.
# Change this only if you know what you're doing (e.g., multi-user machines, shared CI/servers).
db_exec("SET threads TO 1")
# Load data
immdata <- get_test_idata() |> agg_repertoires("Therapy")
#
# airr_public_intersection
#
## Not run:
m_pub <- airr_public_intersection(immdata)
## End(Not run)
#
# airr_public_jaccard
#
## Not run:
m_jac <- airr_public_jaccard(immdata)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.