Tutorial

Follow the steps here to run the dimelo package with a test dataset.

Files needed

Files can be found in directory: dimelo/test/data

  1. ctcf_demo.sorted.bam

  2. ctcf_demo.sorted.bam.bai

  3. ctcf_demo_peak.bed

  4. ctcf_demo_not_peak.bed

Steps

  1. Installation

  2. Run below commands and ensure your output matches the expected plots below. This tutorial walks through running functions from python, but the dimelo package can also be used from the command line (see Example Gallery).

>>> import dimelo as dm
>>> bam = "dimelo/test/data/ctcf_demo.sorted.bam"
>>> sampleName = "CTCF_demo"
>>> outDir = "out"
>>> bedPeak = "dimelo/test/data/ctcf_demo_peak.bed"
>>> bedNotPeak = "dimelo/test/data/ctcf_demo_not_peak.bed"
>>> dm.qc_report(bam, sampleName, outDir)
../_images/CTCF_demo_qc_report.png
>>> dm.plot_enrichment(bam, ['CTCF_peak', 'CTCF_not_peak'], [bedPeak, bedNotPeak], "A", outDir, threshA=190)
../_images/sample_ctcf_demo.sorted_A_enrichment_barplot.png
>>> dm.plot_enrichment_profile(bam, sampleName, bedPeak,"A+CG",outDir,threshA=190,threshC=190)

Aggregate rolling average fraction of methylated bases

../_images/CTCF_demo_A+CG_sm_rolling_avg.png

Single molecules with binary mA and mCpG colored

../_images/CTCF_demo_A+CG_sm_scatter.png

A base count

../_images/CTCF_demo_A_base_count.png

CG base count

../_images/CTCF_demo_CG_base_count.png
>>> dm.plot_browser(bam, sampleName, "chr11:2086423-2091187", "A+CG", outDir, threshA=153, threshC=153, static=True, smooth=100, min_periods=10)
../_images/methylation_browser_chr11_2086423_20911871.png ../_images/CTCF_demo_A_sm_rolling_avg_fraction.png ../_images/CTCF_demo_A_sm_rolling_avg_total.png ../_images/CTCF_demo_CG_sm_rolling_avg_fraction.png ../_images/CTCF_demo_CG_sm_rolling_avg_total.png