View source: R/cluster_exploration.R
Given a table of scores and its partition into k clusters,
the function explore_clusters
proposes to explore the types
of associations lying within each cluster.
To do so, the function measures the dispersion of the associations of each cluster in the space of the scores and depicts this heterogeneity as a tree structure (using ElPiGraph.R package). For instance, nodes along a same branch will be expected to exhibit similar types of associations.
Then, the function will visit the tree of each cluster to create an arborescence of directories starting from the root (the root is defined as the branch which is the closest to the centroid of the table of scores) and expanding from adjacent branches to adjacent branches.
Inside each directory corresponding to a branch (or a branching point), the function will produce the scatterplots of a few sampled assocations in order for the user to get a glimpse of what type of associations each branch is related to.
By visiting this arborescence of directories and visualizing some of the scatterplots of the associations each branch is related to, it enables one to somehow "wander" along a cluster's tree and appreciate the "evolution" of the "shape/type" of the associations from branches to branches
1 2 3 | explore_clusters(scores_tab, partition, gene_exp_mat,
sampling_method = "downsampling", target_ratio = 0.3, target_nb = NULL,
output_directory = ".")
|
scores_tab |
data.table; the table of scores |
partition |
categorial vector; the partition of the |
gene_exp_mat |
matrix: the gene expression matrix used for computing the scores (rownames corresponding to genes and colnames to cells) |
sampling_method |
method to be used for selecting a few associations in each branch. Methods available:
Method recommanded: |
target_ratio |
number; fraction of associations to be sampled in each tree's node
. Argument |
target_nb |
number of associations to be sampled in each tree's node |
output_directory |
where to create the arborescence of directories for each cluster |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.