Description Usage Arguments Value Examples
Reads a nexus file and adds colors to the leaves
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | custom_nexus(
nexus.file,
tips,
colors,
outfile,
fromBIGSdb = FALSE,
fg,
vlabels,
w = 20,
h = 20,
s = "r",
f,
lc,
lk,
edgecolor = "gray",
plot,
SplitsTree.exe = "/Applications/SplitsTree/SplitsTree"
)
|
tips |
(leaves of the dendrogram) |
colors |
vector of the same length of the tips indicating the color of each tip |
vlabels |
vector of labels to be plot; leave empty character "" to hide the label. |
w |
width of the tip. If you indicate a single number it will be recycled. Either provide a vector of widths |
h |
height of the tip. Same for w. |
s |
shape of the tip "o" is oval. The other option is "r" rectangle. |
f |
fonts of the labels. Like "Dialog-BOLD-16" or 'Courier-PLAIN-24'. Other option are: Calibri, Arial, Times. For bold -BOLD and not -PLAIN |
lc |
vector of label colors |
lk |
vector of background of the label |
edgecolor |
the color of the edges |
plot |
if TRUE SplitsTree is launched and the nexus displayed |
Splitstree.exe |
path to the executable of SplitsTree |
a new nexus file with colors
1 2 3 4 5 6 7 8 9 10 11 12 13 | inputfile <- file.path(path.package('microbio'),'input.nexus')
outfile <- file.path(path.package('microbio'),'output.nexus')
tips <- c("A","R","G","B")
col <- c("red","blue","green","yellow")
s <- c("r","o","r","o")
ws <- c(10,20,30,40)
hs <- c(10,20,30,40)
fg <- c("blue","orange", "violet", "gray8")
lc <- c("gray", "cyan", "pink", "blue")
lk <- c("black", "blue", "black", "yellow")
edgecolor <- "blue"
f <- c("Arial-BOLD-20", "Calibri-BOLD-16", "Times-20", "Dialog-BOLDITALIC-25")
custom_nexus(nexus.file=inputfile, tips=tips, colors=col, vlabels=tips, w=ws, f=f, h=hs, lc=lc, lk=lk, fg= fg, s=s, edgecolor=edgecolor, outfile=outfile, plot=TRUE, SplitsTree.exe = "/Applications/SplitsTree/SplitsTree")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.