Predicts phylogenetic relations between subpopulations from subpopulation specific copy number profiles.
buildPhylo(sp_cbs, outF, treeAlgorithm="bionjs", dm=NA, add="Germline", verbose = T)
Subpopulation specific copy number matrix in which each row corresponds to a copy number segment. Has to contain at least one column for each predicted subpopulation. Subpopulation column names must be labeled SP_xx, where xx is the size of the corresponding subpopulation. Input parameter \(sp_cbs\) can be obtained by calling assignQuantityToSP
.
Prefix of file to which phylogeny will be saved.
Neighbor joining algorithm used for phylogeny reconstruction (from library ape). Options: bionjs (default), njs.
Optional matrix in which each row corresponds to a mutation. Only mutations located on autosomes should be included. Columns in dm must be labeled and must include: SP - subpopulation to which the point mutation has been assigned. SP_cnv - subpopulation to which the CNV (overlapping with the point mutation) has been assigned (if an CNV is present). chr - chromosome on which each point mutation is located; startpos - genomic position of each point mutation; PM - total count of all alleles at the mutated genomic locus, in the assigned subpopulation. PM_B - count of the B-allele at the mutated genomic locus, in the assigned subpopulation. If dm is available, an attempt will be made to assign every mutation to >1 subpopulation according to the inferred phylogenetic relations between subpopulations.
Artificial subpopulation to be included in phylogeny (options: 'Germline','Consensus', NULL).
Give a more verbose output.
List with two fields:
An object of class "phylo" (library ape).
The input matrix with each row representing a point mutation and additional columns: SP_xx - where xx is the size of the corresponding subpopulation. Column entries contain a binary indicator of whether or not the point mutation in this row is present in SP_xx.
Reconstructs phylogenetic relationships between subpopulations using neighbor-joining algorithms provided by R-package 'ape'. Pairwise distances between subpopulations are calculated as the number of copy number segments for which both subpopulations have the same copy number, divided by the total number of copy number segments for which both subpopulations have available copy number information. Subpopulations with insufficient copy number information are excluded from phylogeny.