View source: R/VDJ_ordination.R
VDJ_ordination | R Documentation |
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 |
VDJ dataframe output from the VDJ_build function. |
feature.columns |
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_cdr3_aa","VJ_cdr3_aa")) these columns will be pasted together before metric calculation. |
grouping.column |
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). |
method |
Character. The ordination method; choose from either: PCA - 'pca', t-SNE - 'tsne', UMAP - 'umap', PCOA/MDS - 'mds', DCA - 'dca'. |
reduction.level |
Character. Whether to reduce across groups ('groups'), features/sequences ('features'), or both ('both'). |
VDJ.VJ.1chain |
Boolean defaults to TRUE. Whether to filter out aberrant cells (more than 1 VDJ or VJ chain). |
umap.n.neighbours |
Integer. Control the t-SNE perplexity when method = 'tsne'. |
tsne.perplexity |
Integrer. Defaults to 1 |
Returns a ggplot with the ordination analysis performer across features, groups, or both
plot <- VDJ_ordination(VDJ = Platypus::small_vdj
,feature.columns = c("VDJ_cdr3_aa"), grouping.column = "sample_id"
,method = "pca", reduction.level = 'groups')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.