Description Usage Arguments Details Value Examples
View source: R/functions-plotting.R
Visualizes diffusion map for network of samples based on square distance matrix (sample-sample pairwise dissimilarity)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
my_distmat |
phemdObj object containing sample names in @snames slot |
cluster_assignments |
Vector containing group assignments for each sample |
pt_sz |
Size of points representing samples in plot (scaling factor) |
n_dim |
Number of dimensions for embedding (either 2 or 3) |
pt_label |
Vector of sample names corresponding to each point (same order as samples in |
cmap |
Vector containing colors by which points should be colored (corresponding to cluster_assignments) |
w |
Width of plot in inches |
h |
Height of plot in inches |
scale.y |
Scaling factor for diffusion map y-axis |
angle |
Rotation factor for diffusion map plot |
autosave |
Boolean denoting whether or not to save output diffusion map |
... |
Additional parameters to be passed to |
Requires 'destiny' package
DiffusionMap object containing biological sample embedding and associated metadata
1 2 3 4 5 6 7 8 9 10 11 | my_phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
my_phemdObj_lg <- removeTinySamples(my_phemdObj, 10)
my_phemdObj_lg <- aggregateSamples(my_phemdObj_lg, max_cells=1000)
my_phemdObj_monocle <- embedCells(my_phemdObj_lg, data_model = 'gaussianff', sigma=0.02, maxIter=2)
my_phemdObj_monocle <- orderCellsMonocle(my_phemdObj_monocle)
my_phemdObj_final <- clusterIndividualSamples(my_phemdObj_monocle)
my_phemdObj_final <- generateGDM(my_phemdObj_final)
my_EMD_mat <- compareSamples(my_phemdObj_final)
cluster_assignments <- groupSamples(my_EMD_mat, distfun = 'hclust', ncluster=4)
printClusterAssignments(cluster_assignments, my_phemdObj_final, '.', overwrite=TRUE)
dm <- plotGroupedSamplesDmap(my_EMD_mat, cluster_assignments, pt_sz=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.