R/branch.length.scaling.R

Defines functions get.tree.depth.modifier get.smart.branch.length.scale get.branch.length.scale

get.branch.length.scale <- function(branch.lengths, tree.depth, user.scale) {
    smart.scale <- get.smart.branch.length.scale(branch.lengths, tree.depth);

    return(smart.scale * user.scale);
    }

get.smart.branch.length.scale <- function(branch.lengths, tree.depth) {
    tree.depth.modifier <- get.tree.depth.modifier(tree.depth);

    return(1 / (mean(branch.lengths) * tree.depth.modifier));
    }

get.tree.depth.modifier <- function(tree.depth) {
    log2(tree.depth);
    }

Try the CancerEvolutionVisualization package in your browser

Any scripts or data that you put into this service are public.

CancerEvolutionVisualization documentation built on Nov. 22, 2023, 1:08 a.m.