polar_grid: Grid required for 3D volcano plot and 2D radial plots

Description Usage Arguments Value References Examples

View source: R/polar_grid.R

Description

Generates a cylindrical grid of the appropriate dimensions for a 3D volcano plot

Usage

1
2
3
4
5
6
7
8
9
polar_grid(
  r_vector = NULL,
  z_vector = NULL,
  r_axis_ticks = NULL,
  z_axis_ticks = NULL,
  axis_angle = 5/6,
  n_spokes = 12,
  ...
)

Arguments

r_vector

An optional numerical vector for the radial coordinates. This is used to calculate breaks on the r axis using pretty. If this is NULL the r_axis_ticks are used as breaks.

z_vector

An optional numerical vector for the z coordinates. This is used to calculate breaks on the z axis using pretty. If this is NULL the z_axis_ticks are used as breaks.

r_axis_ticks

A numerical vector of breaks for the radial axis (used if r_vector is NULL).

z_axis_ticks

A numerical vector of breaks for the z axis (used if z_vector is NULL).

axis_angle

angle in radians to position the radial axis (default = 5/6)

n_spokes

the number of outward spokes to be plotted (default = 12)

...

optional parameters for pretty on the r axis

Value

Returns an S4 grid object containing:

References

Lewis, Myles J., et al. (2019). Molecular portraits of early rheumatoid arthritis identify clinical and treatment response phenotypes. Cell reports, 28:9

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(example_data)
syn_polar <- polar_coords(sampledata = syn_example_meta,
                          contrast = "Pathotype",
                          groups = NULL,
                          pvalues = syn_example_p,
                          expression = syn_example_rld,
                          p_col_suffix = "pvalue",
                          padj_col_suffix = "padj",
                          non_sig_name = "Not Significant",
                          multi_group_prefix = "LRT",
                          significance_cutoff = 0.01,
                          fc_col_suffix='log2FoldChange',
                          fc_cutoff = 0.3)

grid <- polar_grid(r_vector=syn_polar@polar$r_zscore,
           z_vector=NULL,
           r_axis_ticks = NULL,
           z_axis_ticks = c(0, 8, 16, 32),
           n_spokes = 4)

Example output

-----------------------
                      
Welcome to volcano3D!
                      
-----------------------

volcano3D documentation built on July 1, 2020, 9:56 p.m.