Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Compare methylation levels at transcriptome sites, summarized by gene, with dmr compare-tx-sites

The dmr compare-tx-sites allows you to compare modifications between two conditions. This command uses a transcriptome-aligned bedMethyl table and maps the coordinates from each transcript to common gene coordinates. After which, the modification counts from each isoform are combined making a gene-level pileup. The gene-level modifications are then compared using the same method as dmr isoform.

Example command:

This command uses two bedMethyl tables corresponding to two conditions to be compared. These bedMethyl tables are expected to be bgzipped and have tabix indices.

modkit dmr compare-tx-sites \
  -a ${bedmethyl_a} \
  -b ${bedmethyl_b} \
  --out ${output.bed} \
  --gtf ${gtf}

A volcano plot can be also made, using the following extra options. An example is below.

modkit dmr compare-tx-sites \
  -a ${bedmethyl_a} \
  -b ${bedmethyl_b} \
  --out ${output.bed} \
  --single-mod-code a \
  --plot volcano.svg \
  --gtf ${gtf} \
  --log debug.log

The volcano plot requires that --single-mod-code is used, since log2 fold-change is essentially a 2-class metric.

Volcano plot comparing the most significant sites from two cell lines

These data were downloaded from the reference You et al., Benchmarking long-read RNA-sequencing technologies with LongBench: a cross-platform reference dataset profiling cancer cell lines with bulk and single-cell approaches

Schema of output

columnnamedescriptiontype
1chromname of contig from GTFstr
2chromStart0-based start positionint
3chromEnd0-based exclusive end positionint
4namemodification codes present at this positionstr
5scorelikelihood ration scorefloat
6strandstrand, ‘+’ or ‘-’str
7p_valuep-value of alternative hypothesisfloat
8gene_idgene-id from the GTFstr
9gene_namegene-name from the GTF or ‘-’ if not foundstr
10log2_fold_changelog base 2 fold changefloat
11cond_a_proportionsJSON formatted string of condition ‘A’ per-modification proprotionsstr
12cond_b_proportionsJSON formatted string of condition ‘B’ per-modification proprotionsstr
13cond_a_countsJSON formatted string of condition ‘A’ per-modification countsstr
14cond_b_countsJSON formatted string of condition ‘B’ per-modification countsstr

Columns 11 through 14 are only present when the --full flag is passed.