Package 'gassocplot'

Title: Regional association plots
Description: This package is used plot regional association plots.
Authors: James Staley [aut, cre] (ORCID: <https://orcid.org/0009-0001-9520-5011>)
Maintainer: James Staley <[email protected]>
License: GPL-3
Version: 0.0.2
Built: 2026-06-02 07:45:46 UTC
Source: https://github.com/remlapmot/gassocplot

Help Index


assoc_plot

Description

assoc_plot plots a scatter graph of associations (e.g. log10 p-values)

Usage

assoc_plot(
  data,
  corr = NULL,
  corr.top = NULL,
  ylab = NULL,
  title = NULL,
  subtitle = NULL,
  type = "log10p",
  x.min = NULL,
  x.max = NULL,
  top.marker = NULL,
  legend = TRUE
)

Arguments

data

data.frame with markername (marker), chromosome (chr), position (pos) and either z-statistics (z) or probabilities (prob) columns

corr

correlation matrix between markers

corr.top

correlation statistics between the top marker and the rest of the markers

ylab

the y-axis label

title

title of the plot

subtitle

subtitle of the plot

type

the type of the plot either log10p or probabilities

x.min

start of region

x.max

end of region

top.marker

the top associated marker, i.e. the marker with the largest -log10p or probability

legend

add r2 legend

Author(s)

James R Staley <[email protected]>


assoc_plot_save

Description

assoc_plot_save saves a png of the assoc_plot with the correct dimensions

Usage

assoc_plot_save(x, file, width = 9, height = 7, dpi = 500)

Arguments

x

the plot

file

the filepath

width

the width of the plot

height

the height of the plot

dpi

the resolution of the plot

Author(s)

James R Staley <[email protected]>


stack_assoc_plot

Description

stack_assoc_plot plots stacked regional association plots

Usage

stack_assoc_plot(
  markers,
  z,
  corr = NULL,
  corr.top = NULL,
  traits,
  ylab = NULL,
  type = "log10p",
  x.min = NULL,
  x.max = NULL,
  top.marker = NULL,
  legend = TRUE
)

Arguments

markers

data.frame of markers with markername (marker), chromosome (chr) and position (pos)

z

matrix of Z-scores or probabilities with one column for each trait

corr

matrix of correlation statistics between markers

corr.top

correlation statistics between the top marker and the rest of the markers

traits

trait names

ylab

the y-axis label

type

the type of the plot either log10p or probabilities

x.min

start of region

x.max

end of region

top.marker

the top associated marker, i.e. the marker with the largest -log10p or probability

legend

add r2 legend

Author(s)

James R Staley <[email protected]>


stack_assoc_plot_save

Description

stack_assoc_plot_save saves a png of the assoc_plot with the correct dimensions

Usage

stack_assoc_plot_save(
  x,
  file,
  n_traits,
  width = NULL,
  height = NULL,
  dpi = 500
)

Arguments

x

the plot

file

the filepath

n_traits

the filepath

width

the width of the plot

height

the height of the plot

dpi

the resolution of the plot

Author(s)

James R Staley <[email protected]>