DNA methylation from VCF and gVCF, by genomic region.
methylVCF reads 5mC measurements reported by Illumina DRAGEN 5-Base and Rastair. Work with individual measurements as GRanges, or assemble reference methylation across samples in a RangedSummarizedExperiment.
Installation
Requires R 4.6 or later.
Bioconductor
This installation will be available once methylVCF is published on Bioconductor.
BiocManager::install("methylVCF")Quick start
The examples use plyranges for genomic ranges and tidySummarizedExperiment for site-by-sample tables. Install the companions to run the tutorials.
Use inspectMethylVcf() to check sample names, methylation fields and index readability before a regional query.
Build a one-base interval with plyranges and read the reported measurements from a bundled DRAGEN gVCF.
library(methylVCF)
vcf <- system.file("extdata", "dragen-multisample.g.vcf", package = "methylVCF")
site <-
tibble::tibble(seqnames = "chr21", start = 13204474L, width = 1L) |>
plyranges::as_granges()
readMethylVcf(vcf, site) |>
tibble::as_tibble() |>
dplyr::select(seqnames, start, sample, fraction, informative_depth)
#> # A tibble: 2 × 5
#> seqnames start sample fraction informative_depth
#> <fct> <int> <chr> <dbl> <int>
#> 1 chr21 13204474 sample_a 0.238 21
#> 2 chr21 13204474 sample_b 0 0Use plyranges::join_overlap_inner() to annotate calls with genomic features. For aligned reference measurements, pass the original ranges to asMethylExperiment(). The experiment keeps reported values and coverage-backed fractions in separate assays.
Articles
-
Explore methylation in a region with
vignette("methylVCF"). -
Inspect and read your own DRAGEN or Rastair files with
inspectMethylVcf()andvignette("input-vcf"). -
Reproduce the HG002 case study with
vignette("dragen-hg002").
Community
- Report a bug. Include the caller version and a small reproducible genomic query.
- Suggest a feature. Describe the input and what you want to obtain from it.
- Contribute to methylVCF. See how to work on the package and run the checks locally.
