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, x2)

As Emmanuel mentioned the package apex simplifies the whole process.

library(apex)
files <- dir(system.file(package="apex"),patter="patr", full=TRUE)
files
dat <- read.multiphyDat(files, format="FASTA")
concatenate(dat)

Regards,
Klaus




On Fri, Nov 18, 2016 at 6:21 AM, Karla Shikev  wrote:

> 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 greatly appreciated.
>
> Karla
>
> [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-
> sig-ph...@r-project.org/
>



-- 
Klaus Schliep
Postdoctoral Fellow
Revell Lab, University of Massachusetts Boston
http://www.phangorn.org/

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


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 allows you some flexibility in managing several 
alignments. See the help page ?cbind.DNAbin. If your data are in FASTA 
files, then you'll read directly "DNAbin" objects.


An alternative is to use the package alex on CRAN.

Cheers,

Emmanuel

Le 18/11/2016 à 12:21, Karla Shikev a écrit :

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 greatly appreciated.

Karla

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Pour nous remonter une erreur de filtrage, veuillez vous rendre ici : 
http://f.security-mail.net/301tW7aHECZ




___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


[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 greatly appreciated.

Karla

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/