Keep desired groups together but reorder members within each group. E.g. If cells from multiple samples are being reordered, samples can be kept together and cells reordered within. Option to also reorder the order of groups or samples, such that groups with similar average profiles are placed next to one another.
grouped_reorder(
m,
groups,
interorder = FALSE,
intraorder = TRUE,
cor.method = "pearson",
dist.method = "euclidean",
cluster.method = "average",
Names = FALSE
)
matrix to be reordered
groups within which reordering should take place.
if TRUE, group order itself is reordered such that groups with similar profiles are placed near one another. E.g. Samples with similar average CNA profiles. Default: FALSE
desired correlation metric. Default: 'pearson'
desired distance metric to be used on top of correlation matrix. Default: 'euclidean'
desired agglomeration method. Default: 'average'
return the vector of ordered IDs instead of the reordered matrix. Default: FALSE
reordered matrix (same dimensions as input) or a character vector of ordered column names if Names = T.