Skip to contents

Getting Started with methyldeconv

Welcome to methyldeconv! This vignette will help you get up and running with cell-type deconvolution for DNA methylation data using the package’s unified interface and included methods.

Installation

You can install methyldeconv from GitHub using the pak package manager:

# install the `pak` package manager
install.packages("pak")

pak::pkg_install("omnideconv/methyldeconv")

Example Usage

methyldeconv can be applied directly to a methylSet from the minfi package, or you can apply each method separately on a beta matrix with Illumina CpG IDs.

Below, we demonstrate how to use the EpiDISH method with example data from minfi:

library(methyldeconv)
library(minfi)
library(minfiData)

# use example data from Minfi
methyl_set <- minfiData::MsetEx
ratio_set <- minfi::ratioConvert(methyl_set)
beta_matrix <- minfi::getBeta(ratio_set)

# run EpiDISH for deconvolution of example data
result <- methyldeconv::deconvolute(methyl_set = methyl_set, method = 'epidish')

Viewing the Results

The result of the deconvolution is a table with the estimated cell-type fractions for each sample. You can view it directly as a nicely formatted table:

knitr::kable(head(result), caption = "Estimated cell-type fractions for the first few samples")
Estimated cell-type fractions for the first few samples
B CD4T CD8T Eosino Mono Neutro NK
5723646052_R02C02 0.1868416 0.1993816 0 0.1853980 0.3058855 0 0.1224934
5723646052_R04C01 0.1841371 0.1411284 0 0.2169230 0.3220845 0 0.1357269
5723646052_R05C02 0.0000000 0.2990338 0 0.1252629 0.3593454 0 0.2163580
5723646053_R04C02 0.0610074 0.1500589 0 0.2699428 0.4363476 0 0.0826434
5723646053_R05C02 0.1221793 0.1659357 0 0.2266461 0.3354384 0 0.1498004
5723646053_R06C02 0.0000000 0.1364639 0 0.2388252 0.4611588 0 0.1635522

For more details, see the package documentation and other vignettes!