Skills

Bioconductor Ggmanh

Manhattan plot and QQ Plot are commonly used to visualize the end result of Genome Wide...

Install

npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-ggmanh -g -a claude-code -y
Category
Engineering
Updated
5mo ago
License
See repository
Context cost
Lightabout 1,162 tokens
Runs scripts
No, instructions only

What it does

Manhattan plot and QQ Plot are commonly used to visualize the end result of Genome Wide Association Study. The "ggmanh" package aims to keep the generation of these plots simple while maintaining customizability. Main functions include manhattan_plot, qqunif, and thinPoints.

ggmanh

Workflows

Standard Workflow

library(ggmanh)
# Format chromosome column as a factor
simdata$chromosome <- factor(simdata$chromosome, c(1:22,"X"))
# Generate standard Manhattan plot
g1 <- manhattan_plot(x = simdata, pval.colname = "P.value", chr.colname = "chromosome", pos.colname = "position")
# Generate rescaled Manhattan plot
g2 <- manhattan_plot(x = simdata, pval.colname = "P.value", chr.colname = "chromosome", pos.colname = "position", rescale = TRUE)
# Preprocess data
mpdata <- manhattan_data_preprocess(x = simdata, pval.colname = "P.value", chr.colname = "chromosome", pos.colname = "position")
# Generate plots using preprocessed data with labels
g3 <- manhattan_plot(x = mpdata, label.colname = "label")
# Zoom into Chromosome 5
manhattan_plot(simdata, chromosome = 5, pval.colname = "P.value", chr.colname = "chromosome", pos.colname = "position")

Note: Input is a data frame of GWAS summary statistics; output is a customized Manhattan plot object.

Binned Manhattan Plot

library(ggmanh)
# Basic Binned Manhattan Plot
binned_manhattan_plot(simdata, pval.colname = "P.value", chr.colname = "chromosome", pos.colname = "position")
# Preprocess binned data
mpdat <- binned_manhattan_preprocess(simdata, pval.colname = "P.value", chr.colname = "chromosome", pos.colname = "position", bins.x = 7, bins.y = 100)
# Plot preprocessed binned data
binned_manhattan_plot(mpdat, bin.outline = TRUE)

Note: Input is a data frame of GWAS summary statistics; output is a binned grid-based Manhattan plot.

Gds Variant Annotation Plotting

Read the whole SKILL.md on GitHub

More in Engineering