Convenience wrapper that computes the pairwise TCRdist matrix and
performs hierarchical clustering via stats::hclust().
Usage
tcrdist_hclust(
tcr_df = NULL,
organism = NULL,
method = "average",
max_tcrs = 2000L,
dist_matrix = NULL
)Arguments
- tcr_df
Data.frame with TCR columns (optional if
dist_matrixis provided).- organism
Character string (
"human"or"mouse") (optional ifdist_matrixis provided).- method
Clustering method for
stats::hclust(). Default"average"(UPGMA).- max_tcrs
Integer. Subsample if N exceeds this. Default
2000L.- dist_matrix
Optional precomputed distance matrix. If provided,
tcr_dfandorganismare not used for distance computation.
Value
A named list:
hclustAn
hclustobject.dist_matrixThe pairwise distance matrix used.
indicesInteger vector of row indices used (after potential subsampling).