Skip to contents

Launches a Shiny application for interactive exploration of DMR analysis results from buildDMRs.

Usage

launchCMEntViewer(
  output_prefix,
  launch_browser = TRUE,
  port = NULL,
  host = "127.0.0.1",
  diagnostic = FALSE
)

Arguments

output_prefix

Character. Prefix used when saving DMR analysis results. The function will look for files: {output_prefix}.dmrs.tsv.gz, {output_prefix}.seeds_beta.tsv.gz, and {output_prefix}.meta.rds.

launch_browser

Logical. Whether to launch in browser (default: TRUE).

port

Integer. Port number for Shiny server (default: auto-assigned).

host

Character. Host interface for the Shiny server (default: "127.0.0.1"). Use "0.0.0.0" when exposing the app from a Docker container.

diagnostic

Logical. Whether to enable diagnostic features for block formation visualization (default: FALSE).

Value

Invisibly returns the Shiny app object.

Details

The viewer provides interactive access to all visualization functions in the package:

  • Overview: Summary statistics and filterable DMR table

  • Single DMR: Detailed view of individual DMRs with heatmap and motif logo

  • Manhattan: Genome-wide scatter plot of DMR scores

  • Circos: Circular genome plot with motif interactions

  • Block Formation: Diagnostic view of DMR block detection, if diagnostic = TRUE

The function expects the following output files from buildDMRs:

  • {output_prefix}.dmrs.tsv.gz - Main DMR results (required)

  • {output_prefix}.seeds_beta.tsv.gz - Beta values for seeds (required)

  • {output_prefix}.meta.rds - Viewer metadata with phenotype, array, and genome information (required)

  • {output_prefix}dmr_interactions.tsv - DMR interactions (optional)

  • {output_prefix}dmr_components.tsv - Motif components (optional)

Examples

if (interactive()) {
    # After running buildDMRs with output_prefix = "my_analysis"
    launchCMEntViewer(
      output_prefix = "results/my_analysis"
    )
}