mutationCallsFromMatrix {mitoClone2} | R Documentation |
To be used when allele-specific count matrices are available.
mutationCallsFromMatrix( M, N, cluster = NULL, metadata = data.frame(row.names = rownames(M)), binarize = 0.05 )
M |
A matrix of read counts mapping to the mutant allele. Columns are genomic sites and rows and single cells. |
N |
A matrix of read counts mapping to the referece allele. Columns are genomic sites and rows and single cells. |
cluster |
If |
metadata |
A data.frame of metadata that will be transfered to
the final output where the |
binarize |
Allele frequency threshold to define a site as mutant (required for some clustering methods) |
An object of class mutationCalls
.
load(system.file("extdata/example_counts.Rda",package = "mitoClone2")) ## we have loaded the example.counts object known.variants <- c("8 T>C","4 G>A","11 G>A","7 A>G","5 G>A","15 G>A","14 G>A") known.subset <- pullcountsVars(example.counts, known.variants) known.subset <- mutationCallsFromMatrix(t(known.subset$M), t(known.subset$N), cluster = rep(TRUE, length(known.variants)))