% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trees.R
\name{get_gtree}
\alias{get_gtree}
\title{Get a tidygraph tree with simplified mutational history.}
\usage{
get_gtree(tree, P, n_cut = 0, max_cost = 0)
}
\arguments{
\item{tree}{phylo Single-cell phylogenetic tree}

\item{P}{matrix Genotype probability matrix}

\item{n_cut}{integer Number of cuts on the phylogeny to define subclones}

\item{max_cost}{numeric Likelihood threshold to collapse internal branches}
}
\value{
tbl_graph Phylogeny annotated with branch lengths and mutation events
}
\description{
Specify either max_cost or n_cut. 
max_cost works similarly as h and n_cut works similarly as k in stats::cutree.
The top-level normal diploid clone is always included.
}
