questions.Rmd
Unfortunately, CAMDAC cannot be run without a CNA solution or a normal sample from which to derive one.
When calling pipeline
if you do not give a normal infiltrate or cell of origin, the pipeline skips deconvolution and differential methylation respectively. This may be useful to run a quick first-pass to find and refit copy number solutions. When CAMDAC has found a solution and is rerun with the same tumor, config, and normal, the infiltrates
and cell_of_origin
arguments will continue the pipeline where it left off. The entire pipeline can be re-run be deleting the output directory or setting overwrite=TRUE
in the CamConfig
.
The simplest way is to call pipeline
with overwrite=FALSE
in your config, giving the right normal sample for your step. Additionally, you CamConfig
must run with the same output directory.
If for any reason, you have changed the output directory structure from previous run, you can initiate CAMDAC by manually passing outputs to CamSample
objects. See the vignette vignette("output")
for more information.
Finally, you can run the cmain_*
functions used by pipeline()
directly. For example, to run the deconvolution step, you can call cmain_deconvolve_methylation()
.
If you want to use an external purity and ploidy solution, simply pass a CNA file that has only the purity and ploidy fields. Additionally, set refit==TRUE
in the CamConfig and CAMDAC will use this to refit the sample.
To analyse specific genomic regions, you may pass a BED file to CAMDAC config:
CamConfig(outdir=".", ref="./pipeline_files", regions="regions.bed")
CAMDAC will merge any overlapping regions prior to analysis.
If you have outputs from a previous run, you can manually assign them to a CAMDAC object. This overwrites the expected path for that output type, allowing the pipeline to run with this data instead of computing it. Use the attach_output
function, passing one of three arguments:
counts
: CAMDAC allele counts *.SNP.CpGs.all.sorted.csv.gz
filesnps
: CAMDAC sample SNP counts *.SNPs.csv.gz
filemeth
: CAMDAC bulk methylation *.m.csv.gz
filecna
: CAMDAC CNA *.cna.txt
filepure
: CAMDAC deconvolved methylation *.m.pure.csv.gz
fileFor example, to attach a previous counts file to a CAMDAC object:
library(CAMDAC)
tumor <- CamSample(id = "T", sex = "XY", bam = NULL)
config <- CamConfig(outdir = tempdir(), build="hg38", bsseq="wgbs", lib="pe")
counts_file <- system.file("testdata", "test.SNPs.CpGs.all.sorted.csv.gz", package = "CAMDAC")
tumor <- attach_output(tumor, config, "counts", counts_file)
The CAMDAC pipeline can now access the file in the expected location at config$outdir
.