This function generates a joyplot of the blast_nucleotide_to_genomes output.

gg_blast_hits_summary(
  blast_tbl,
  scope_cutoff = 0,
  alpha = 0.7,
  scale = 4,
  query_name = "query",
  xlab = "Query",
  ylab = "Density over Number of BLAST Hits",
  title = "Total number of BLAST hits: ",
  xticks = 5,
  levels = NULL,
  trim = FALSE
)

Arguments

blast_tbl

a BLAST table generated with blast_nucleotide_to_genomes.

scope_cutoff

The scope is defined as 1 - (abs(q_len - alig_length) / q_len)). The scope_cutoff defines the minimum scope that is required to retain a BLAST hit. Default is scope_cutoff = 0.1 (meaning that each BLAST hit must have at least 0.1 scope).

alpha

a value passed to aes specifying the transparency of distributions.

scale

the ridges scale passed to geom_density_ridges.

query_name

name of the query in the blast_tbl.

xlab

x-axis label.

ylab

y-axis label.

title

figure title which will be concatenated with the number of BLAST hits available in the inpit blast_tbl.

xticks

number of ticks on the x-axis. Default is xticks = 5.

levels

a character vector specifying the exact order of species names (levels) that is used to factor and sort species in the geom_density_ridges plot.

trim

a logical value indicating whether ridges densities shall be trimmed. Default is trim = FALSE.

Note

In some cases it may happen that for certain species no line is drawn although there are a few hits present in the dataset. This happens when the hits are too few and their values too close to eachother to be able to estimate density functions. It is important to remember that density functions are estimated which usually requires a sufficient amount data to be useful and accurate. However, when density estimation is not possible this plot will omit drawing a line since this visualization approach is intended to be an analytics tool.

Author

Hajk-Georg Drost