Description Usage Arguments Examples
View source: R/plot_circos_genome.R
Generate a circos plot of the entire genome from the results of PSASS.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | plot_genome_circos(
contig_lengths_file_path,
plot.unplaced = TRUE,
prefix = NULL,
window_fst_file_path = NULL,
position_fst_file_path = NULL,
window_snps_file_path = NULL,
position_snps_file_path = NULL,
depth_file_path = NULL,
chromosomes_names_file_path = NULL,
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
)
|
contig_lengths_file_path |
Path to a contig lengths file. |
plot.unplaced |
If TRUE, unplaced contigs will be plotted as a supercontig (default TRUE). |
prefix |
Prefix (including full path) to a complete dataset. If prefix is specified, it will be override individual file specifications such as "window_fst_file_path" (default NULL). |
window_fst_file_path |
Path to a FST window output file (default NULL). |
position_fst_file_path |
Path to a FST positions output file (default NULL). |
window_snps_file_path |
Path to a SNPs window output file (default NULL). |
position_snps_file_path |
Path to a SNPs positions output file (default NULL). |
depth_file_path |
Path to a depth output file (default NULL). |
chromosomes_names_file_path |
Path to a contig names file (default NULL). |
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", "combined_snp", "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). |
1 2 3 4 5 6 7 8 9 | # Standard plot with default options
plot_genome_circos(contig_lengths_file_path = 'data/contig_lengths.tsv',
chromosomes_names_file_path = 'data/chromosomes_names.tsv',
prefix = 'data/psass',
output.file = 'figures/psass_genome.png')
# Plot FST positions and male SNP window with highlight on NC_02456.3
plot_genome_circos(contig_lengths_file_path = 'data/contig_lengths.tsv', prefix = 'data/psass',
tracks = c("position_fst", "window_snp_males"), highlight = c("NC_02456.3"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.