helper function for showPhylo that does all the work

showPhylo_backend(
  speciesNames,
  nameType,
  dateTree = TRUE,
  labelType = "b",
  labelOffset = 0.45,
  aspectRatio = 1,
  pic = "wiki",
  dotsConnectText = FALSE,
  picSize = 1,
  picSaveDir,
  optPicWidth = 200,
  picBorderWidth = 10,
  picBorderCol = "#363636",
  openDir = FALSE,
  xAxisPad = 0.2,
  xTitlePad = 20,
  numXlabs = 8,
  textScalar = 1,
  xTitleScalar = 1,
  phyloThickness = 1.2,
  phyloCol = "#363636",
  textCol = "#363636",
  plotMar = c(t = 0.02, r = 0.5, b = 0.02, l = 0.02),
  clearCache = FALSE,
  datelifePartialMatch = TRUE,
  quiet = TRUE,
  silent = FALSE,
  ...
)

Arguments

speciesNames

a name or vector of common or scientific names of organisms of interest (in quotes)

nameType

what type of name are you supplying? Either "sci" or "common"

dateTree

try to scale the tree to estimated divergence times? Uses datelife_search with summary_format="phylo_median." default= T

labelType

which names to label tree "leaves"? Options= "s" for scientific, "c" for common, and "b" for both (default="b")

labelOffset

how far from the tree tips do you want to put labels? default=0.3 (in proportion of x-axis units)

aspectRatio

doesn't actually work yet; the output phylogeny is always square for the moment

pic

what type of species image do you want to plot? options="wiki" (Wikipedia page profile image), "phylopic" (species' silhouette from the PhyloPic repository), "cust" (custom images: must be named .jpg or .png with names matching speciesNames in the picSaveDir folder), or "none"

dotsConnectText

do you want a dotted line to go from the text to the labels? default=FALSE

picSize

how big to scale images, where 1=100%; .5=50%; default=1

picSaveDir

location for saving downloaded images; default=fs::path(tempdir(),"showPhylo")

optPicWidth

picture width in pixels for optimized versions of images saved if using pic="cust"; default= 200

picBorderWidth

for pic="wiki" or "cust," what size border would you like around your image (as a %); default=10

picBorderCol

color of image border; default="# 363636" (a dark, near-black color)

openDir

for pic="wiki" or "cust," do you want to open the picSaveDir after processing files? default=FALSE

xAxisPad

spacing between the phylogeny and the x-axis (scale is 1 is the distance between two sister taxa); default=.2

xTitlePad

spacing between x-axis title and x numbers; default=20

numXlabs

the number of year markers on the x-axis; default=8

textScalar

multiplier of text size for labels and axis numbers; default=1

xTitleScalar

multiplier of x-axis title size; default=1

phyloThickness

how thick to make the phylogeny lines; default=1.2

phyloCol

color of the phylogeny lines; default= "# 363636"

textCol

color of the axis and tip labels; default= "# 363636"

plotMar

margins around the plot area in proportional screen width units; note the right margin is much wider to make room for tip labels; default=c(t=.02,r=.4,b=.02,l=.02) for top, right, bottom, left

clearCache

delete cached images and taxonomic names? Passed to getPhyloNames, getWikiPics, and also applies to optimized custom images; default=FALSE

datelifePartialMatch

use use source trees even if they only match some of the desired taxa; affects the partial paramter in datelife_search; default= TRUE

quiet

suppress verbose feedback from the taxize package? Passed to getPhyloNames and get WikiPic helper functions. Default=TRUE

silent

suppress all console output? (Mainly for R documentation); Default=FALSE

...

pass other parameters to ggtree (not very compatible right now)