plot_heatmaps: Plots for the hit distribution of all genes

View source: R/plot.R

plot_heatmapsR Documentation

Plots for the hit distribution of all genes

Description

Plots for the hit distribution of all genes

Usage

plot_heatmaps(
  hits,
  filename,
  tree = NULL,
  n = 50,
  focal_id = NULL,
  to_name = TRUE,
  scheme = scheme2
)

Arguments

hits

A table of best hits

filename

Name of the output PDF file

tree

An optional phylo object, if it is not given, a tree will be infrerred from the taxon IDs in the 'staxid' column. This will work only if all these IDs are valid NCBI taxonomy IDs.

n

The number of genes to display per page

focal_id

The focal taxonomy ID (if given, this will be used to order the tree relative with the focal species on top)

to_name

If TRUE, then the tip labels will be converted from taxonomy IDs to scientific names

scheme

Color scheme

Examples

## Not run: 
plot_heatmaps(hits, "heatmaps.pdf", tree=strata@tree) 

# You can change the colorscheme and cutoffs:
funky_scheme <- list(
  cutoff = c(1e-20, 1e-5, 1e-3, 1), 
  color  = c('blue', 'green', 'yellow', 'darkorange1', 'darkred')
)
plot_heatmaps(hits, "heatmaps.pdf", tree=strata@tree, scheme=funky_scheme)

## End(Not run)

arendsee/phylostratr documentation built on Dec. 31, 2022, 10:22 a.m.