Description Usage Arguments Value
View source: R/other_useful_functions.R
Function to plot phylogenetic tree from the estimated results
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  | plotPhyloTree(
  estPhyloRes,
  traitName = NULL,
  blockName = NULL,
  plotTree = TRUE,
  subpopInfo = estPhyloRes$subpopInfo,
  saveName = NULL,
  saveStyle = "png",
  pchBase = c(1, 16),
  colNodeBase = c(2, 4),
  colTipBase = c(3, 5, 6),
  cexMax = 2,
  cexMin = 0.7,
  edgeColoring = TRUE,
  tipLabel = TRUE,
  ggPlotTree = FALSE,
  cexMaxForGG = 0.12,
  cexMinForGG = 0.06,
  alphaBase = c(0.9, 0.3)
)
 | 
estPhyloRes | 
 The estimated results of phylogenetic analysis by 'estPhylo' function for one  | 
traitName | 
 Name of trait of interest. This will be used in the title of the plots.  | 
blockName | 
 You can specify the haplotype block (or gene set, SNP-set) of interest by the name of haplotype block in 'geno'. This will be used in the title of the plots.  | 
plotTree | 
 If TRUE, the function will return the plot of phylogenetic tree.  | 
subpopInfo | 
 The information of subpopulations.  | 
saveName | 
 When drawing any plot, you can save plots in png format. In saveName, you should substitute the name you want to save. When saveName = NULL, the plot is not saved.  | 
saveStyle | 
 This argument specifies how to save the plot of phylogenetic tree. The function offers 'png', 'pdf', 'jpg', and 'tiff'.  | 
pchBase | 
 A vector of two integers specifying the plot types for the positive and negative genotypic values respectively.  | 
colNodeBase | 
 A vector of two integers or chracters specifying color of nodes for the positive and negative genotypic values respectively.  | 
colTipBase | 
 A vector of integers or chracters specifying color of tips for the positive and negative genotypic values respectively. The length of the vector should equal to the number of subpopulations.  | 
cexMax | 
 A numeric specifying the maximum point size of the plot.  | 
cexMin | 
 A numeric specifying the minimum point size of the plot.  | 
edgeColoring | 
 If TRUE, the edge branch of phylogenetic tree wiil be colored.  | 
tipLabel | 
 If TRUE, lavels for tips will be shown.  | 
ggPlotTree | 
 If TRUE, the function will return the ggplot version of phylogenetic tree. It offers the precise information on subgroups for each haplotype.  | 
cexMaxForGG | 
 A numeric specifying the maximum point size of the plot for ggtree, relative to the range of x and y-axes (0 < cexMaxForGG <= 1).  | 
cexMinForGG | 
 A numeric specifying the minimum point size of the plot for ggtree, relative to the range of x and y-axes (0 < cexMaxForGG <= 1).  | 
alphaBase | 
 alpha (parameter that indicates the opacity of a geom) for tip with positive / negative effects. alpha for node will be same as the alpha for tip with negative effects.  | 
Draw plots of phylogenetic tree.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.