
Build a Bonsai tree from single cell counts
rs_sc_bonsai.Rd
Reads the raw counts of the given genes and cells from the binary stores,
runs Sanity on them for posterior log fold changes with error bars, builds
a Bonsai tree over the cells and lays it out in 2D. Sanity runs on the CPU.
Arguments
- f_path_gene
String. Path to the
counts_genes.binfile.- f_path_cell
String. Path to the
counts_cells.binfile. Supplies the library sizes.- cell_indices
Integer. The cell indices to use. (0-indexed!) Sets the leaf order.
- gene_indices
Integer. The gene indices to use. (0-indexed!)
- bonsai_params
List. Parameter list, see
params_sc_bonsai().- verbose
Integer.
0L- quiet;1L- normal verbosity;2L- detailed verbosity.
Value
A list with
parent - Integer. Parent of each node (0-indexed!),
-1for the root. Nodes0ton_leaves - 1are the cells incell_indicesorder.branch - Numeric. Branch length above each node.
x - Numeric. Horizontal coordinate of each node.
y - Numeric. Vertical coordinate of each node.
n_leaves - Integer. Number of leaves.
loglik - Numeric. Final tree loglikelihood.
steps - List with
stepandloglikafter each search step.genes_used - Integer. Genes the tree was built on. (0-indexed!)