plot_contig: Mapping contig

Description Usage Arguments Examples

Description

Generates a linear plot of RADSex mapping results for a specified contig. The resulting figure contains two plot: the top plot shows sex-bias against position on the contig, and the bottom plot shows probability of association with sex against position on the contig. A specific region of the contig can also be plotted.

Usage

1
2
3
4
5
6
7
8
plot_contig(mapping_file_path, contig_lengths_file_path, contig,
  region = NULL, chromosomes_names_file_path = NULL, title = NULL,
  output_file_path = NULL, width = 12, height = 8, dpi = 300,
  color.sex.bias = TRUE, sex.bias.palette = c("firebrick1", "grey10",
  "dodgerblue2"), association.color = "grey20",
  signif.threshold = 0.05, point.size = 1.5,
  significance.line.color = "black", significance.line.type = 2,
  significance.text.position = c(0.05, 0.05))

Arguments

mapping_file_path

Path to a mapping results file generated by RADSex map.

contig_lengths_file_path

Path to a contig lengths file generated by RADSex map.

contig

Name of the contig to plot.

region

A vector of two integers specifying the region of the contig to plot (default NULL).

chromosomes_names_file_path

Path to a chromosomes names file, i.e. a tabulated file with name in the reference genome file as the first column and corresponding chromosome name as the second column. If the chromosomes names in the reference genome file start with "LG", "NC", or "CHR" (case unsensitive), chromosomes can be detected automatically (default NULL).

title

Title of the plot (default NULL).

output_file_path

Path to the plot output file. If the output file is not specified, the circular plot will be plotted in the default device (default NULL).

width

Width of the output file in pixels (default 1400).

height

Height of the output file in pixels (default 1400).

color.sex.bias

If TRUE, points on the sex-bias track will be colored according to sex.bias.palette (default TRUE).

sex.bias.palette

A vector of three colors defining the sex-bias track palette: female-biased, neutral, male-biased. (default c("firebrick1", "black", "dodgerblue2"))

signif.threshold

Significance threshold for association with sex (default 0.05).

point.size

Size of a point in the plot (default 1.5).

significance.line.color

Color for significance line, set to NULL for no line (default "black").

significance.line.type

Linetype for the significance line, as usually defined in R (default 2).

significance.text.position

X and Y axis offset for the significance text, as fractions of total axis length (default c(0.05, 0.05)).

res

Resolution of the output file in % (default 100).

Examples

1
2
plot_contig("mapping_results.tsv", "contig_lengths.tsv", "LG01", region = c(10000000, 15000000),
            output_file_path = "mapping_results.png", width = 10, height = 7)

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