plot_coverage: Plot coverage

Description Usage Arguments Examples

Description

Plots a heatmap of coverage from a table generated with RADSex subset, RADSex signif, or RADSex loci.

Usage

1
2
3
4
5
6
7
8
plot_coverage(input_file_path, output_file_path = NULL,
  popmap_file_path = NULL, width = 10, height = 8, dpi = 300,
  title = NULL, min.coverage = 0, max.coverage = 150,
  distance.method = "euclidean", clustering.method = "ward.D",
  males.color = "dodgerblue3", females.color = "red3",
  coverage.palette = c("white", "royalblue2", "black", "gold2", "red3"),
  individual.names = TRUE, sequence.names = FALSE,
  individual.dendrogram = TRUE, sequence.dendrogram = TRUE)

Arguments

input_file_path

Path to a coverage table generated by RADSex.

popmap_file_path

Path to a population map file to colorize males and females names (default NULL).

width

Width of the output file in inches (default 10).

height

Height of the output file in inches (default 8).

dpi

Resolution of the output file (default 300).

title

Plot title (default NULL).

min.coverage

Minimum coverage value to consider a sequence present in an individual: coverage lower than min.coverage will be set to 0 (default 0).

max.coverage

Maximum sequence coverage allowed in an individual: coverage higher than max.coverage will be set to max.coverage (default 150).

distance.method

Method to use to compute the distance matrix. Possible values: "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". See dist for details (default "euclidean").

clustering.method

Method to use in the clustering step. Possible values: "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). See hclust for details (default "ward.D").

males.color

If a popmap is specified, sets the color of male individual names on the horizontal axis (default "dodgerblue3").

females.color

If a popmap is specified, sets the color of female individual names on the horizontal axis (default "red3").

coverage.palette

Color palette for coverage. The value should be a vector of length 5 corresponding to the following intervals/values: [0, 1 : mean, mean : 3rd quartile, 3rd quartile : (max - 1), max] (default c("white", "royalblue2", "black", "gold2", "red3"))

individual.names

If TRUE, shows individual names on the x-axis (default TRUE).

sequence.names

If TRUE, shows sequence names on the y-axis (default FALSE).

individual.dendrogram

If TRUE, shows individual clustering dendrogram on the x-axis (default TRUE).

sequence.dendrogram

If TRUE, shows sequence clustering dendrogram on the y-axis (default TRUE).

Examples

1
2
3
4
5
6
7
8
9
plot_coverage("coverage_table.tsv", popmap_file_path = "popmap.tsv",
              width = 12, height = 10,
              title = "Individuals and sequences clustering based on coverage",
              min.coverage = 5,
              clustering.method = "ward.D2", distance.method = "binary",
              males.color = "blue", females.color = "red",
              coverage.palette = c("white", "green", "black", "red", "red3"),
              individual.names = TRUE, sequence.names = TRUE,
              individual.dendrogram = TRUE, sequence.dendrogram = TRUE)

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