R/VDJ_ordination.R
VDJ_ordination.Rd
Performs ordination/dimensionality reduction for a species incidence matrix, depending on the species selected in the feature.columns parameter.
VDJ_ordination(
VDJ,
feature.columns,
grouping.column,
method,
reduction.level,
VDJ.VJ.1chain,
umap.n.neighbours,
tsne.perplexity
)
VDJ dataframe output from the VDJ_GEX_matrix function.
Character vector. One or more column names from the VDJ to indicate the unique species for the incidence/count matrix. if more than one column is provided (e.g. c("VDJ_cdr3s_aa","VJ_cdr3s_aa")) these columns will be pasted together before metric calculation.
Character. Column name of a column to group the ordination by. This could be "sample_id" to reduce across each sample. Indicative of 'sites' in a typical community data matrix/incidence matrix used in community ecology analyses (species by sites).
Character. The ordination method; choose from either: PCA - 'pca', t-SNE - 'tsne', UMAP - 'umap', PCOA/MDS - 'mds', DCA - 'dca'.
Character. Whether to reduce across groups ('groups'), features/sequences ('features'), or both ('both').
Boolean defaults to TRUE. Whether to filter out aberrant cells (more than 1 VDJ or VJ chain).
Integer. Control the t-SNE perplexity when method = 'tsne'.
Integrer. Defaults to 1
Returns a ggplot with the ordination analysis performer across features, groups, or both