Description Usage Arguments Details Value Examples
Calculates cell-type x cell-type distance matrix then builds the tree of cell using a neighbour joining algorithm.
1 | tree_of_cells( merged_profiles, gene_features=rownames(merged_profiles$mus), dist_func=pearson_dist, plot_type="radial")
|
merged_profiles |
Output from: merge_profiles function. |
gene_features |
genes to use |
dist_func |
distance function for cell-type distances. |
plot_type |
how to plot the final tree. |
Takes a set of merged profiles for a large number of cell types and calculated cell-type x cell-type distances using the specified distance function and the specified feature genes. This distance matrix is then used as input to the neighbour joining algorithm (from phangorn
package) to build a tree of cell-types.
list containing the pair-wise distance matrix and the tree object.
1 2 3 4 5 6 7 8 9 10 11 | obj <- list(
mus = matrix(rnorm(200), ncol=10),
rs = matrix(rgamma(200, shape=0.75, scale=1), ncol=10),
ds = matrix(runif(200), ncol=10),
Ns = matrix(rpois(200, lambda=30), ncol=10))
colnames(obj$mus) <- paste("celltype", 1:ncol(obj$mus), sep="")
rownames(obj$mus) <- paste("gene", 1:nrow(obj$mus), sep="")
colnames(obj$rs) <- paste("celltype", 1:ncol(obj$mus), sep="")
colnames(obj$ds) <- paste("celltype", 1:ncol(obj$mus), sep="")
colnames(obj$Ns) <- paste("celltype", 1:ncol(obj$mus), sep="")
out <- tree_of_cells(obj);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.