mds_plot {barcodetrackR} | R Documentation |
Calculates a simmilarity/dissimlarity index or metrix for each sample-sample pair and reduces the resulting dist matrix into two dimensions
mds_plot( your_SE, group_by = "SAMPLENAME", method_dist = "bray", assay = "proportions", your_title = NULL, point_size = 3, text_size = 12, return_table = FALSE, kmeans_cluster = FALSE, k.param = 3, draw_ellipses = FALSE )
your_SE |
Summarized Experiment object containing clonal tracking data as created by the barcodetrackR 'create_SE' function. |
group_by |
Column of metadata to color samples by. Can also specify "kmeans_cluster" if kmeans_cluster argument is set to TRUE, and then the grouping variables will be the clusterinng result. |
method_dist |
Dissimilarity index from vegan. One of "manhattan", "euclidean", "canberra", "clark", "bray", "kulczynski", "jaccard", "gower", "altGower", "morisita", "horn", "mountford", "raup", "binomial", "chao", or "cao". |
assay |
The assay to calculate the index on |
your_title |
Character. The title for the plot. |
point_size |
Numeric. The size of the points. |
text_size |
Numeric. Size of text in plot. |
return_table |
Logical. If set to true, the function will return a dataframe containing each samples reduced measure of dissimilarity coordinates. |
kmeans_cluster |
Logical. If set to true, each sample will be assigned a cluster computed by kmeans on the chosen assay. |
k.param |
Numeric. If kmeans_cluster is TRUE, provide the number of kmeans clusters to identify. |
draw_ellipses |
Logical. If kmeans_cluster is TRUE, draw ellipses around the different kmeans clusters. |
Plots dissimilarity indices between samples in your_SE. Or if return table is set to TRUE, returns a dataframe of each sample's reduced measures of dissimilarity coordinates.
data(wu_subset) mds_plot(your_SE = wu_subset, method_dist = "bray", group_by = "celltype") # "