R/VDJ_rarefaction.R
VDJ_rarefaction.Rd
Plots rarefaction curves for species denoted in the feature.columns parameter across groups determined by grouping.columns
VDJ_rarefaction(
VDJ,
feature.columns,
grouping.column,
VDJ.VJ.1chain,
rarefaction.type,
hill.numbers,
number.resamples,
sample.sizes,
endpoint
)
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 rarefaction (to rarefy across). If more than one column is provided (e.g. c("VDJ_cdr3s_aa","VJ_cdr3s_aa")) these columns will be pasted together.
Character. Column name of a column to group the rarefaction by. This could be "sample_id" for rarefaction curves for each sample.
Boolean defaults to TRUE. Whether to filter out aberrant cells (more than 1 VDJ or VJ chain).
Character. Options for the iNEXT rarefaction - 'sample.size','coverage.based', or 'sample.completeness'.
Integer/ vector of integers. The Hill numbers to be plotted out (0 - species richness, 1 - Shannon diversity, 2 - Simpson diversity)
Integer. Number of bootstrap replications.
Vector if integers. The sample size points at which rarefaction should be performed. Defaults to NULL
Integer. The maximum sample size for rarefaction extrapolation. Defaults to NULL = 2 times the sample size for each sample.
Returns a ggplot with the ordination analysis performer across features, groups, or both
if (FALSE) {
#Rarefaction analysis of CDRH3 across samples
plot <- VDJ_diversity(VDJ = Platypus::small_vgm[[1]],
,feature.columns = c("VDJ_cdr3s_aa"), grouping.column = "sample_id")
}