plot_oxford_grid {macrosyntR}R Documentation

plot the Macro-synteny as an oxford grid.

Description

This is a function to plot the oxford grided plot to compare the macro synteny of two species. It requires as input an orthologs_df loaded by load_orthologs()

Usage

plot_oxford_grid(
  orthologs_df,
  sp1_label = "",
  sp2_label = "",
  dot_size = 0.5,
  dot_alpha = 0.4,
  reorder = FALSE,
  keep_only_significant = FALSE,
  color_by = NULL,
  pvalue_threshold = 0.001,
  color_palette = NULL,
  shade_non_significant = TRUE,
  reverse_species = FALSE,
  keep_sp1_raw_order = FALSE
)

Arguments

orthologs_df

dataframe. orthologs with genomic coordinates loaded by the load_orthologs()

sp1_label

character. name of 1st species to display on the plot

sp2_label

character. name of 2nd species to display on the plot

dot_size

numeric. (default = 0.5)

dot_alpha

numeric. (default = 0.4)

reorder

logical. (default = FALSE) tells whether to reorder the chromosomes in clusters as implemented in reorder_macrosynteny()

keep_only_significant

logical. (default = FALSE)

color_by

string/variable name. (default = NULL) column of the orthologs_df to use to color the dots.

pvalue_threshold

numeric. (default = 0.001)

color_palette

vector. (default = NULL) list of colors (as string under double quote) for the clusters. The amount of colors must match the amount of clusters.

shade_non_significant

logical. (default = TRUE) When TRUE the orthologs located on non-significant linkage groups are displayed in "grey"

reverse_species

logical. (default = FALSE) When TRUE the x and y axis of the plot are reversed. sp1 is displayed on the y axis and sp2 is displayed on the x axis.

keep_sp1_raw_order

logical.(default equals FALSE) tells if the reordering should be constrained on the species1 and change just the order of the species2

Value

A ggplot2 object

See Also

load_orthologs()

reorder_macrosynteny()

Examples

# basic usage of plot_oxford_grid : 

orthologs_table <- system.file("extdata","my_orthologs.tab",package="macrosyntR")

my_orthologs <- read.table(orthologs_table,header=TRUE)

plot_oxford_grid(my_orthologs,
                 sp1_label = "B. floridae",
                 sp2_label = "P. echinospica")

# plot a reordered Oxford Grid and color by cluster :

plot_oxford_grid(my_orthologs,
                 sp1_label = "B. floridae",
                 sp2_label = "P. echinospica",
                 reorder = TRUE,
                 color_by = "clust")
 

[Package macrosyntR version 0.3.3 Index]