Using the example data provided in
extdata/, the following code will plot the signature trajectory, and return the fitted mixture of signatures for each bin, the bins where changepoints were detected, and the ggplot object.
library(TrackSig) library(ggplot2) vcfFile = system.file(package = "TrackSig", "extdata/Example.vcf") cnaFile = system.file(package = "TrackSig", "extdata/Example_cna.txt") purity = 1 detectedSigs <- detectActiveSignatures(vcfFile = vcfFile, cnaFile = cnaFile, purity = purity, threshold = 0.05)
set.seed(1224) # a warning will appear about not matching the refrence genome, this is because the # example vcf file is generated by sampling random nucleotides, not real mutations. traj <- TrackSig(sampleID = "example", activeInSample = detectedSigs, vcfFile = vcfFile, cnaFile = cnaFile, purity = purity)
TrackSig has three available methods for segmentation, controlled by the parameter
scoreMethod. These are:
Signature (described in the TrackSig paper)
SigFreq (described in the TrackSigFreq paper)
Frequency (not explicitly described, but corresponds to the frequency likelihood in the TrackSigFreq paper).
plotTrajectory(traj, linearX = T) + labs(title = "Example trajectory with linear x-axis") nonLinPlot <- plotTrajectory(traj, linearX = F, anmac = T) + labs(title = "Example trajectory with non-linear x-axis") addPhiHist(traj, nonLinPlot)
Rubanova, Y., Shi, R., Harrigan, C.F. et al. Reconstructing evolutionary trajectories of mutation signature activities in cancer using TrackSig. Nat Commun 11, 731 (2020). https://doi.org/10.1038/s41467-020-14352-7
Harrigan, C.F., Rubanova, Y., Morris, Q. & Selega, A. TrackSigFreq: subclonal reconstructions based on mutation signatures and allele frequencies. Pac Symp Biocomput 25, 238–249 (2020).https://doi.org/10.1142/9789811215636_0022
Some users may have plotting issues with
ggplot2 is not explicitly loaded with
library(ggplot2). We are experiencing a bug that has been previously described for
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.