本文へ移動
cccskills
無料GitHub で公開

bioconductor-ggmanh

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.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

library(ggmanh)
# Annotate variants using gds_annotate
simdata_label$label <- gds_annotate(x = simdata_label, annot.method = "position", chr = "chromosome", pos = "position", ref = "Reference", alt = "Alternate")
# Plot annotated data
manhattan_plot(simdata_label, pval.colname = "P.value", chr.colname = "chromosome", pos.colname = "position", label.colname = "label")

Note: Inputs are a data frame of GWAS summary statistics and a GDS file; output is an annotated Manhattan plot.

When to Use

  • To visualize Genome Wide Association Study (GWAS) results using standard Manhattan plots (manhattan_plot).
  • To rescale the y-axis of a Manhattan plot when highly significant p-values mask lower-significance patterns (rescale = TRUE).
  • To create binned grid-based Manhattan plots for extremely large datasets to avoid plotting individual points (binned_manhattan_plot).
  • To annotate variants with gene/consequence information from a GDS file using gds_annotate.

When NOT to Use

  • When using discrete palettes for continuous variables (or vice versa) in binned_manhattan_plot, as the plot will fail.

Data Requirements

  • Input data frame: Must contain at least three columns representing chromosome, position, and p-value.
  • Chromosome column: Recommended to be formatted as a factor to avoid ambiguity in plotting order.
  • GDS file: For variant annotation, a SeqArray-formatted GDS file containing annotations (e.g., annotation/symbol, annotation/consequence).

Key Parameters

  • x: A data.frame, MPdata, or GRanges object containing the GWAS results.
  • pval.colname: Name of the column containing p-values.
  • chr.colname: Name of the column containing chromosomes.
  • pos.colname: Name of the column containing genomic positions.
  • rescale (FALSE): Logical indicating whether to rescale the y-axis near the significance cutoff.
  • label.colname: Name of the column containing labels for annotation.
  • chromosome: Specific chromosome number/name to zoom into.
  • bins.x: Number of horizontal bins for the widest chromosome in binned plots.

Best Practices

  • Convert the chromosome column to a factor before plotting to ensure correct ordering on the x-axis.
  • Preprocess data using manhattan_data_preprocess or binned_manhattan_preprocess first if you plan to customize the plot multiple times, avoiding redundant computation.
  • Set non-significant labels to "" or NA to avoid overlapping labels and extremely slow plotting times.

Common Pitfalls

  • Attempting to label all points: This can cause the plotting process to take hours. Set labels for non-significant points to "" or NA.
  • Using incompatible palettes: Ensure continuous palettes are used for continuous variables and discrete palettes for discrete variables in binned_manhattan_plot.

Alternatives

  • qqman for basic Manhattan and QQ plots.

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

The package contains functions for exploratory oligonucleotide array analysis. The dependence on tkWidgets only concerns few convenience functions. 'affy' is fully functional without it.

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

This tool uses the label-tree function from HyPhy to annotate a phylogenetic tree. It allows users to select a subset of leaves using either a regular expression or a list of sequence names, and then apply a specified label to these selecte

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

This package provides a client for the Bioconductor AnnotationHub web resource. The AnnotationHub web resource provides a central location where genomic files (e.g., VCF, bed, wig) and other resources from standard locations (e.g., UCSC, En

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

apeglm provides Bayesian shrinkage estimators for effect sizes for a variety of GLM models, using approximation of the posterior for individual coefficients.

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

ASURAT is a software for single-cell data analysis. Using ASURAT, one can simultaneously perform unsupervised clustering and biological interpretation in terms of cell type, disease, biological process, and signaling pathway activity. Inputting a single-cell RNA-seq data and knowledge-based databases, such as Cell Ontology, Gene Ontology, KEGG, etc., ASURAT transforms gene expression tables into original multivariate tables, termed sign-by-sample matrices (SSMs).

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

AUCell allows to identify cells with active gene sets (e.g. signatures, gene modules...) in single-cell RNA-seq data. AUCell uses the "Area Under the Curve" (AUC) to calculate whether a critical subset of the input gene set is enriched with

日本語の概要は準備中です。原文の説明を表示しています。

bioMate-AI/biomate-bioconductor-kb8042026年6月21日 更新

bioMate-AI のスキルをすべて見る

このスキルの問題を報告する