Re: [R-sig-phylo] concatenating loci with different taxa

2016-11-18 Thread Emmanuel Paradis
Dear Karla, First, I suggest you manage your alignment files in FASTA rather than in NEXUS: this is much more efficient in practice. You may read an alignment in a NEXUS file using read.nexus.data() in ape, then convert it in "DNAbin" class with as.DNAbin(). The cbind() funtion in ape

Re: [R-sig-phylo] Adding a custom legend underneath a phylo plot with coloured tips

2016-11-18 Thread Liam J. Revell
Hi Gabriel. For future reference, phytools has a couple of functions that could be useful. add.simmap.legend (e.g., http://www.phytools.org/blog/18Nov16-post.png), used on my blog here: http://blog.phytools.org/2016/11/updates-to-permit-user-control-of-line.html and add.color.bar (e.g.,

Re: [R-sig-phylo] Adding a custom legend underneath a phylo plot with coloured tips

2016-11-18 Thread Gabriel Yedid
This is what finally worked for me for setting up the plot with the legend how I wanted: (result is in attached PDF) Perhaps some of you will find it useful for your own work... #Zeileis et al.'s function for drawing palettes pal <- function(col, border = "light gray", ...) { n <- length(col)

Re: [R-sig-phylo] concatenating loci with different taxa

2016-11-18 Thread Klaus Schliep
Dear Karla, what is exactly the problem and what did you try? There is a (generic) function cbind for "phyDat" objects in phangorn, which should exactly do this task. library(phangorn) data(Laurasiatherian) (x1 <- subset(Laurasiatherian, 1:20)) (x2 <- subset(Laurasiatherian, 11:30)) cbind(x1,

[R-sig-phylo] concatenating loci with different taxa

2016-11-18 Thread Karla Shikev
Dear all, I got alignments for many loci as nexus files and I've been trying to concatenate them into a single alignment. However, some taxa are missing from some of the loci, so that simple alternatives such as cbinding individual files in phangorn doesn't work. Any help with this will be