Learn R Programming

expands (version 1.7.2)

buildPhylo: Relations between subpopulations

Description

Predicts phylogenetic relations between subpopulations from subpopulation specific copy number profiles.

Usage

buildPhylo(ploidy, outF, treeAlgorithm="bionjs", dm=NA, add="Germline")

Arguments

ploidy
Ploidy-matrix in which each row corrsponds to a copy number segment. Has to contain at least one column for each predicted subpopulation. Subpopulation columnnames must be labeled SP_xx, where xx is the size of the corresponding subpopulation. Ploidy-matrix can be obtained by calling assignQuantityToSP.
outF
Prefix of file to which phylogeny will be saved.
treeAlgorithm
Neighbor joining algorithm used for phylogeny reconstruction (from library ape). Options: bionjs (default), njs.
dm
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 - the subpopulation to which the point mutation has been asssigned. SP_cnv - the subpopulation to which the CNV (overlapping with the point mutation) has been asssigned (if an CNV is present). chr - the chromosome on which each point mutation is located; startpos - the genomic position of each point mutation; PM - the total ploidy of all alleles at the mutated genomic locus, in the assigned subpopulation. PM_B - the ploidy of the B-allele at the mutated genomic locus, in the assigned subpopulation. If dm is available, an attempt will be made to: i) assign total ploidy (PM) to subpopulations with point mutations and ii) assign every mutation to >1 subpopulation according to the inferred phylogenetic relations between subpopulations. Default: NA.
add
Artificial subpopulation to be included in phylogeny (options: 'Germline','Consensus', NULL).

Value

tree
An object of class "phylo" (library ape).
dm
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.

Details

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 ploidy information are excluded from phylogeny.

See Also

assignQuantityToSP