MyNixOS website logo
Description

Visualization of Genetic Association Studies.

Visualizes the relationship between allele frequency and effect size in genetic association studies. The input is a data frame containing association results. The output is a plot with the effect size of risk variants in the Y axis, and the allele frequency spectrum in the X axis. Corte et al (2023) <doi:10.1101/2023.04.21.23288923>.

TrumpetPlots Rpackage

About and preprint

TrumpetPlots is an R package to visualize the effect size of risk variants across the allele frequency spectrum.

For more information about Trumpet plots and to cite our work, visit our preprint Trumpet plots: Visualizing The Relationship Between Allele Frequency And Effect Size In Genetic Association Studies

Installation

To install, please install the "devtools" R package, then run

devtools::install_git("https://gitlab.com/JuditGG/trumpetplots.git")

Usage

The function trumpets only requires a text file as input, containing association results. Please indicate the column names of the input dataset using the following arguments:

  • dataset: Input text file with genetic association results. Columns required are rsID, freq, A1_beta, Analysis and Gene.
  • rsID: (required) Single Nucleotide Polymorphism (SNP) name.
  • freq: (required) allele frequency of effect SNP.
  • A1_beta: (required) risk allele effect size.
  • Analysis: (optional) adds colour to the type of analysis (e.g. GWAS, Sequencing).
  • Gene: (optional) Candidate gene name (can be empty).
  • calculate_power: (TRUE/FALSE) Calculate power curves. Choose TRUE to add power curves for a given threshold, alpha, sample size N and number of allele frequencies. Choose FALSE if you already ran powerCurves() outside or do not want to show power curves.
  • show_power_curves: (TRUE/FALSE) Show power curves in plot. Needs argument calculate_power = TRUE.
  • threshold: (Required if calculate_power == TRUE). Can be a single number or a vector of statistical power thresholds.
  • N: (Required if calculate_power == TRUE). Sample size used to test the association.
  • alpha: (Required if calculate_power == TRUE).
  • Nfreq: (Required if calculate_power == TRUE). Number of allele frequency data points generated to calculate the power curves. We recommend Nfreq>1000 for power curves with high resolution. Note that this will slow down the rendering of the plot.
  • power_color_palette: A vector of colours for the power curves. Number of colors should match number of thresholds supplied.
  • analysis_color_palette: A vector of colours for the argument Analysis.
  • trait: (optional) Name of the trait.

Use 'toy_data' to run an example

A 'toy_data' dataset is provided to test the function. This toy_data contains 8000 genetic associations and seven columns to showcase function 'trumpets'. Data was obtained from GWAS and exome sequencing association analyses performend in the UK Biobank.

  1. Load the toy dataset: data(toy_data)
  2. Run the trumpets function: plot_trumpets(dataset = toy_data)

R Shiny application

For users with no knowledge of R, and to visualize Trumpet plots for >100 traits in the UK Biobank, visit the R Shiny application "Shiny Trumpets", available at: https://juditgg.shinyapps.io/shinytrumpets/

Report issues, ask questions, contribute and improve our code!

Metadata

Version

0.0.1.1

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows