sex_distribution_heatmap: Sex distribution heatmap

Description Usage Arguments Value Examples

Description

Generates a heatmap of the distribution of sequences between two populations. In the resulting heatmap, the color of a tile at coordinates (x, y) indicates the number of sequences present in x males, on the horizontal axis, and y females, on the vertical axis.

Usage

1
2
3
4
sex_distribution_heatmap(data, title = NULL, show.significance = TRUE,
  significance.color = "red3", significance.threshold = 0.05,
  color.scale.bins = c(0, 1, 5, 25, 100, 1000),
  color.scale.colors = c("white", "navyblue"))

Arguments

data

A table of distribution of sequences between sexes obtained with the load_sex_distribution_table function.

title

Plot title (default NULL).

show.significance

If TRUE, tiles with significant association with sex are highlighted with the color defined in the significance.color parameter (default TRUE).

significance.color

Color of the border for tiles significantly associated with sex (default "red3").

significance.threshold

P-value threshold to consider a tile significantly associated with sex (default 0.05).

color.scale.bins

A vector of values to use as bins in the color palette (default c(0, 1, 5, 25, 100, 1000)).

color.scale.colors

A vector of two colors used to create the color palette gradient default (c("white", "navyblue")).

Value

A heatmap stored in a ggplot object.

Examples

1
2
3
4
heatmap <- sex_distribution_heatmap(data, title = "Distribution of sequences between sexes",
                                    significance.color = "blue", significance.threshold = 0.01,
                                    color.scale.bins = c(0, 10, 100, 1000),
                                    color.scale.colors = c("white", "red3"))

RomainFeron/radsex-vis documentation built on May 23, 2019, 2:48 p.m.