mapsce2r: mapsce2r

View source: R/mapsce2r.R

mapsce2rR Documentation

mapsce2r

Description

mapsce2r returns a matrix with a branch test for every single branch of a tree

Usage

mapsce2r(
  copy_number,
  cluster_ccf,
  tree,
  print_raw_matrix = F,
  print_duration = T,
  clone_ccf = F,
  consensus = F,
  before = 0,
  after = 0,
  print_warning = T
)

Arguments

copy_number

a numeric vector with copy number values ordered by sample

cluster_ccf

a matrix with mean CCF values for clones in rows and samples (same order as in copy_number) in columns

tree

a matrix listing all the branches in the tree, where the first column is the ancestral node and the second column is the descendant clone. By definition, the root node will only be present in the first column. The clone IDs must correspond to the cluster IDs in cluster_ccf and mutation_ccf.

print_raw_matrix

logical, printing of raw results

print_duration

logical, printing of the time taken to run

clone_ccf

logical, forcing mapsce to use clone CCF instead of just cluster CCF

consensus

logical, forcing mapsce to run the get_consensus function

before

a numeric vector, forcing a CN before

after

a numeric vector, forcing a CN after

print_warning

a logical vector, option to print the warning messages

Value

a tibble with column names:

  • branch. branch ID

  • before. copy number state before

  • after. copy number state after

  • rss. residual square of sums

  • btn. how many bootstrapped BICs are better than the null's BI

  • nregions. number of regions

  • nclones. number of clones or branches.

  • null. whether the branch is a trunk or not.

  • bic. bic calculated from mean RSS

  • bf. the strength of evidence of bayes factor comparison

  • good_result. 1 for good results based on the Bayes Factor comparison

  • index. ordering of results.

Examples

data(example_data)
mapsce2r(example_cn_2r, example_ccf_2r, example_tree_2r)
#returns a tibble with branch 2 as the best result


MarkTranHS/MAPSCE documentation built on Jan. 28, 2024, 6:29 p.m.