getNeighborhood | R Documentation |
Given Adaptive Immune Receptor Repertoire Sequencing (AIRR-Seq) data and a target receptor sequence that is present within the data, identifies a "neighborhood" comprised of cells/clones with receptor sequences sufficiently similar to the target sequence.
getNeighborhood(
data,
seq_col,
target_seq,
dist_type = "hamming",
max_dist = 1
)
data |
A data frame containing the AIRR-Seq data. |
seq_col |
Specifies the column of |
target_seq |
A character string containing the target receptor sequence. Must be a receptor sequence possessed by one of the clones/cells in the AIRR-Seq data. |
dist_type |
Specifies the function used to quantify the similarity between receptor
sequences. The similarity between two sequences determines their pairwise
distance, with greater similarity corresponding to shorter distance. Valid
options are |
max_dist |
Determines whether each cell/clone belongs to the neighborhood based on its
receptor sequence's distance from the target sequence. The distance is based
on the |
A data frame containing the rows of data
corresponding to the
cells/clones in the neighborhood.
If no cell/clone in the AIRR-Seq data possesses the target sequence as its
receptor sequence, then a value of NULL
is returned.
Brian Neal (Brian.Neal@ucsf.edu)
Hai Yang, Jason Cham, Brian Neal, Zenghua Fan, Tao He and Li Zhang. (2023). NAIR: Network Analysis of Immune Repertoire. Frontiers in Immunology, vol. 14. doi: 10.3389/fimmu.2023.1181825
set.seed(42)
toy_data <- simulateToyData(sample_size = 500)
# Get neighborhood around first clone sequence
nbd <-
getNeighborhood(
toy_data,
seq_col = "CloneSeq",
target_seq = "GGGGGGGAATTGG"
)
head(nbd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.