| annotate_clonality | R Documentation |
A small family of helpers that add clonality labels to each receptor in an immundata::ImmunData object.
annotate_clonality_rank() - label by rank bins within each repertoire.
annotate_clonality_prop() - label by proportion bins (named thresholds).
annotate_clonality_rank() - for each repertoire, receptors are ordered by
within-repertoire abundance (proportion) and assigned a rank bin label.
annotate_clonality_prop() - label each receptor by proportion bin
using named thresholds (matched in descending order; else "Ultra-rare").
annotate_clonality_rank(
idata,
bins = c(10, 30, 100, 300, 1000, 10000, 1e+05),
autojoin = getOption("immundata.autojoin", TRUE),
format = c("long", "wide")
)
annotate_clonality_prop(
idata,
bins = c(Hyperexpanded = 0.01, Large = 0.001, Medium = 1e-04, Small = 1e-05, Rare =
1e-06),
autojoin = getOption("immundata.autojoin", TRUE),
format = c("long", "wide")
)
idata |
An immundata::ImmunData object. |
bins |
A named numeric vector of thresholds (e.g.,
|
autojoin |
Logical. If TRUE, join repertoire metadata by the schema repertoire id.
Change the default behaviour by calling |
format |
String. One of |
An immundata::ImmunData whose $annotations gains:
clonal_rank_bin - integer-like label with the applied rank threshold
(outside all thresholds -> NA).
An immundata::ImmunData whose $annotations gains:
clonal_prop_bin - label from names(bins) or "Ultra-rare".
Per-repertoire summaries: airr_clonality
Data container: immundata::ImmunData
## Not run:
idata <- get_test_idata() |> agg_repertoires("Therapy")
idata_rank <- annotate_clonality_rank(idata)
idata_prop <- annotate_clonality_prop(idata)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.