draw_circos_plot: Draw circos plot

Description Usage Arguments Examples

View source: R/draw_circos_plot.R

Description

Draw a circos plot from the PSASS data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
draw_circos_plot(
  data,
  output.file = NULL,
  width = 2400,
  height = 2400,
  res = 120,
  tracks = c("window_fst", "window_snp_males", "window_snp_females", "depth_ratio"),
  highlight = NULL,
  zoom.highlights = FALSE,
  zoom.ratio = 2,
  zoom.suffix = " (zoom)",
  base.color = "white",
  highlight.color = "grey80",
  point.size = 0.1,
  color.unplaced = FALSE,
  color.palette = c(`0` = "dodgerblue3", `1` = "goldenrod1", `2` = "grey20", males =
    "dodgerblue3", females = "firebrick2"),
  sector.titles.expand = NULL,
  depth.type = "absolute",
  min.depth = 10
)

Arguments

data

A PSASS data structure obtained with the load_data_files function.

output.file

Path to an output file in PNG format. If NULL, the plot will be drawn in the default graphic device (default: NULL).

width

Width of the output file if specified, in pixels (default: 2400).

height

Height of the output file if specified, in pixels (default: 2400).

res

Resolution of the output file if specified, in % (default: 120).

tracks

Tracks to be plotted. Possible values are "position_fst", "window_fst", "position_snp", "window_snp_males", "window_snp_females", "combined_snp", "depth_males", "depth_females", "depth_ratio" (default: c("window_fst", "window_snp_males", "window_snp_females", "depth_ratio")).

highlight

A vector of sectors to highlight, for instance c("LG5") or c("NC_02536.1", "NC_02543.1") (default: NULL).

zoom.highlights

If TRUE, highlighted sectors will be enlarged and placed at the top of the plot (default: FALSE).

zoom.ratio

Zoom factor for highlighted sectors if zoom.highlights is TRUE (default: 2).

zoom.suffix

Suffix to append to the name of zoomed highlighted sectors (default: " (zoom)").

base.color

Background color of a non-highlighted sector (default: "white").

highlight.color

Background color of a highlighted sector (default: "grey80").

point.size

Size of the points in the plot (default: 0.1).

color.unplaced

If TRUE, unplaced scaffolds will be colored with alternating colors, like in a manhattan plot (default: FALSE)

color.palette

Colors of the points in the plot. "0" and "1" specify the alternating colors for unplaced scaffolds if color.unplaced is TRUE, "2" specifies the color for chromosomes for unsexed tracks (position_fst, window_fst, depth_ratio), and "males" and "females" specify the color of each sex for sexed tracks (position_snp, window_snp_males, window_snp_females, combined_snp, depth_males, depth_females) (default: c("0"="dodgerblue3", "1"="goldenrod1", "2"="grey20", "males"="dodgerblue3", "females"="firebrick2")).

sector.titles.expand

Parameter to manually override the space between sector titles and x-axis (default: NULL).

depth.type

Type of depth to be plotted, either "absolute" or "relative" (default: "absolute").

min.depth

Minimum depth to compute depth ratio. The ratio for positions with depth lower than this value in either sex will be 1 (default: 10).

Examples

1
2
draw_circos_plot(data, tracks = c("position_fst", "position_snp", "depth_males"),
                 highlight = c("Chr10", "Chr17"), color.unplaced = TRUE)

INRA-LPGP/PoolSex-vis documentation built on March 7, 2020, 6:03 p.m.