Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PriorityMeth

Supervised Prioritization of CpG Sites for Methylation-based Biomarker Discovery

PriorityMeth is an R package designed for robust and scalable prioritization of CpG (Cytosine-phosphate-Guanine) sites in large-scale DNA methylation datasets. It integrates a multi-phase Boruta-based feature selection pipeline with machine learning, UMAP visualization, and heatmap generation to help researchers identify stable, high-importance CpG signatures for disease classification and biomarker discovery.

Features

  • Three-phase wrapper-based feature selection using Boruta
  • Repeated seed-based stability selection for reproducible CpG prioritization
  • Automatic UMAP (unsupervised) visualization for subgroup clustering
  • Supervised machine learning models via caret (default: Random Forest)
  • Heatmap visualization of methylation beta values
  • Annotation support via internal CpG annotation dataset
  • User-friendly output containing models, performance metrics, plots, and selected CpGs

Installation

PriorityMeth can be installed directly from GitHub:

# Install devtools if not available
install.packages("devtools")

# Install PriorityMeth
devtools::install_github("arsalanqazi/PriorityMeth")

Required Packages

PriorityMeth automatically loads the following dependencies:

  • Boruta
  • dplyr
  • umap
  • ggplot2
  • caret
  • pheatmap
  • tibble
  • plyr

To install the packages you can use the following command.

# Define the package list
required_packages <- c("Boruta", "dplyr", "umap", "ggplot2", 
                       "caret", "pheatmap", "tibble", "plyr")

# Install all packages
install.packages(required_packages)

Ensure these are installed to avoid runtime errors.

Input Data Format

PriorityMeth expects:

  • A data frame
  • Features in columns (CpG beta values)
  • Samples in rows
  • A label column containing the class/category

Example Structure;

Sample CpG1 CpG2 CpG3 label
S1 0.45 0.83 0.12 Group1
S2 0.29 0.77 0.18 Group2

Usage

Basic Usage

library(PriorityMeth)

result <- priority_meth(data = your_data, label_col = "subgroup")

# View UMAP plot
print(result$umap_plot)

# View confusion matrix
result$models$rf$confusion_matrix

# View selected CpGs with annotations
result$final_features

Workflow overview

Raw methylation data ─► Train/Test Split
                          │
                          ▼
          Repeated Boruta Feature Selection (3 Phases)
                          │
                          ▼
               Final CpG Signature (Stable Features)
                          │
       ┌──────────────────┴──────────────────┐
       ▼                                      ▼
    UMAP Clustering (unsupervised)        ML Classification (caret)
       │                                      │
       └──────────────► Heatmap ◄─────────────┘

Output

The function returns a list containing:

  • models — trained classifiers + confusion matrices
  • umap_df — UMAP coordinates for plotting
  • final_features — prioritized CpG sites with annotations
  • heatmap — heatmap object of methylation values
  • umap_plot — ggplot UMAP visualization

Example Output Interpretation

  • UMAP plot: reveals natural subgroup clustering
  • Final CpG list: stable features confirmed across all seed runs
  • Heatmap: visual separation of classes using selected CpGs
  • Model accuracy: derived from caret’s repeated CV

Contact

For issues, suggestions, or feature requests:

📧 arsalanriaz38@gmail.com GitHub Issues: https://github.com/arsalanqazi/PriorityMeth/issues

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages