Learn R Programming

expands (version 1.2)

assignMutations: Mutation Assignment

Description

Assigns mutations to previously predicted subpopulations.

Usage

assignMutations(dm, finalSPs, densities, max_PM=6)

Arguments

dm
Matrix in which each row corrsponds to a mutation. Has to contain at least the following columnnames: chr - the chrmosome on which each mutation is located; startpos - the genomic position of each mutation; AF_Tumor - the allele-freq
finalSPs
Matrix in which each row corresponds to a subpopulation, as computed by clusterCellFrequencies.
densities
The probability density distribution of cellular frequencies computed for each mutation via computeCellFrequencyDistributions. Has to contain the same number of rows as dm.
max_PM
Upper threshold for the number of amplicons per mutated cell (default: 6). See also cellfrequency_pdf.

Value

  • A list with two fields:
  • dmThe input matrix with two additional columns: SP - the subpopulation to which the mutation has been asssigned; %maxP - confidence of the assignment.
  • finalSPsThe input matrix of subpopulations with the column nMutations updated according to the total number of mutations assigned to each subpopulation.

Details

Each mutated locus $l$ is assigned to the subpopulation $C$, whose size is closest to the maximum likelyhood cellular frequency of $l$: $C:=argmin_C |argmax_f P_l(f)-f^C|$, where $P_l(f)$ is the probability distribution of cellular frequencies as computed by cellfrequency_pdf and $f^C$ is the size of subpopulation $C$. The mutated loci assigned to each subpopulation cluster represent the genetic profile of each predicted subpopulation.

See Also

clusterCellFrequencies