Find significant TCRdist matches between query and database TCRs
Source:R/tcr_db_matching.R
find_significant_tcrdist_matches.RdComputes paired TCRdist distances between query and database TCRs and
converts them to p-values adjusted for both the number of query and
database TCRs. Background distributions are estimated via the V(D)J
rearrangement model in
.estimate_background_tcrdist_distributions().
Usage
find_significant_tcrdist_matches(
query_tcrs_df,
db_tcrs_df,
organism,
adjusted_pvalue_threshold = 1,
background_tcrs_df = NULL,
num_random_samples = 50000L,
fixup_alleles = TRUE
)Arguments
- query_tcrs_df
A data.frame with at least columns
va(orva_gene),cdr3a,vb(orvb_gene),cdr3b. Ifbackground_tcrs_dfis NULL, also needsja,jb,cdr3a_nucseq,cdr3b_nucseq.- db_tcrs_df
A data.frame with at least columns
va(orva_gene),cdr3a,vb(orvb_gene),cdr3b.- organism
Character string (e.g.
"human","mouse").- adjusted_pvalue_threshold
Numeric. Maximum adjusted p-value to report. Default
1.0.- background_tcrs_df
Optional data.frame for background generation. If NULL, uses
query_tcrs_df(which must then includeja,jb, and nucseq columns).- num_random_samples
Integer. Number of random background samples. Default
50000L.- fixup_alleles
Logical. If TRUE, optimize allele assignments in background TCRs. Default
TRUE.