Morris Lab, University of Toronto. R package for TrackSig, TrackSigFreq.
To cite, please see https://www.biorxiv.org/content/10.1101/260471v3
Coming soon
R >= 3.3.3
This package imports the following other R packages:
devtools::install_github("harrig12/TrackSigFreq-dev")
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)
addPhiHist()
plotTrajectory(traj, linearX = T) + labs(title = "Example trajectory with linear x-axis")
nonLinPlot <- plotTrajectory(traj, linearX = F) + labs(title = "Example trajectory with non-linear x-axis")
addPhiHist(traj, nonLinPlot)
Some users may have plotting issues with TrackSig
if ggplot2
is not explicitly loaded with library(ggplot2)
. We are experiencing a bug that has been previously described for ggplot2
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.