phsc.plot.phycollapsed.selected.individuals: Plot short read phylogenies and highlight individuals

phsc.plot.phycollapsed.selected.individualsR Documentation

Plot short read phylogenies and highlight individuals

Description

This function plots short read phylogenies and highlights the clades of two individuals in red and blue.

Usage

phsc.plot.phycollapsed.selected.individuals(
  phs,
  dfs,
  ids,
  plot.cols = rainbow(length(ids)),
  plot.cols.background = function(n) {     rainbow_hcl(n, start = 60, end = 240, c = 30,
    l = 80) },
  drop.blacklisted = TRUE,
  tip.regex = "(.*)_read_([0-9]+)_count_([0-9]+)",
  plot.file = NA,
  drop.less.than.n.ids = 2,
  pdf.h = 50,
  pdf.rw = 10,
  pdf.ntrees = 20,
  pdf.title.size = 40
)

Arguments

phs

List of trees in ape format

dfs

data.table with mandatory column 'IDX' and optional column 'TITLE'. IDX is the index of all phylogenies in 'phs' that are to be plotted. TITLE is a title for each sub-plot, for example specifying a window.

ids

Vector of regular expressions that identify individuals to be highlighted in colour.

plot.cols

Vector of colours for each individual

drop.blacklisted

Logical, indicating if all blacklisted taxa should be dropped prior to plotting.

plot.file

If not missing, the phylogenies will be printed to file.

pdf.h

Height of the pdf file in inches.

pdf.rw

Relative width of the pdf file, internally multiplied by the number of phylogenies to give the total width in inches.

pdf.ntrees

Number of trees per pdf.

pdf.title.size

Size of pdf title in inches.

group.redo

Logical, indicating if the colour groups should be recalculated from ids.

Value

List of ggtree objects, ready for printing.


olli0601/Phyloscanner.R.utilities documentation built on May 1, 2024, 3:25 p.m.