Copy-number Aware Methylation Deconvolution Analysis of Cancer (CAMDAC) is an R library for deconvolving pure tumor methylation from bulk tumor sequencing data (Larose Cadieux et al., 2022, bioXriv).

This branch performs CAMDAC analysis for whole genome bisulfite sequencing (WGBS) data. For Reduced Representation Bisulfite Sequencing (RRBS) data analysis, visit the VanLoo-lab/CAMDAC main branch.

Documentation

View the full documentation at https://vanloo-lab.github.io/CAMDAC/.

Quickstart

CAMDAC can be installed from an R console:

remotes::install_github("VanLoo-lab/CAMDAC")

To run the tumor-normal deconvolution pipeline:

library(CAMDAC)

# Download pipeline files for WGBS or RRBS analysis
# File URLs are listed in inst/extdata/pipeline_files_urls.txt
CAMDAC::download_pipeline_files(bsseq = "rrbs", directory = "./refs")
CAMDAC::download_pipeline_files(bsseq = "wgbs", directory = "./refs")

# Load test data paths
tumor_bam <- system.file("testdata", "tumor.bam", package = "CAMDAC")
normal_bam <- system.file("testdata", "normal.bam", package = "CAMDAC")

# Setup pipeline for basic tumor-normal analysis
tumor <- CamSample(id = "T", sex = "XY", bam = tumor_bam)
normal <- CamSample(id = "N", sex = "XY", bam = normal_bam)
config <- CamConfig(
  outdir = "./results", bsseq = "rrbs", lib = "pe",
  build = "hg38", refs = "./refs", n_cores = 1, cna_caller='ascat'
)

# Run CAMDAC ppeline
CAMDAC::pipeline(
  tumor, germline = normal, infiltrates = normal, origin = normal, config
)

For a more detailed walkthrough with test data, see vignette("pipeline").

Development

library(devtools)
devtools::install_dev_deps("VanLoo-lab/CAMDAC@wgbs")

# After updating code:
# Update docs
devtools::document()
# Run tests
devtools::test()
# Build readme
devtools::build_readme()
# Check package builds
devtools::check()
# Build documentation
pkgdown::build_site(preview=FALSE)