Dear all,

Sorry if this subject scapes the list scopes, but it is my first time with
phylogenetic analysis and I never saw this error in others analysis.

Please, I am using phytools and picante packages. I have a large
phylogenetic tree constructed using Phytophylo (Qiang & Jin 2016) as
megaphyogeny from my species list. Also I have a species x sample
data.frame (community). Species names are the same in both species list and
community.

This is my script:

list<-read.csv("list.csv", header = T, sep = ";") #load species list

nodes<-read.csv("nodes.csv", header = T) #load nodes file (from Qiang & Jin
2016 appendix_S5)

phylo<-read.tree("Phytophylo.tre")#load megaphylogeny

result<-S.PhyloMaker(list, phylo, nodes, output.splist = T, scenarios =
 "S3")#builds my phylogenetic tree (PHYTOOLS)

comm<-read.table("community_t.txt", header = T, sep = "\t", row.names = 1)#load
my community data.frame

phydist<-cophenetic(S3)#builds distance matrix

ses.mpd.result<-ses.mpd(comm, phydist, null.model = "taxa,labels", runs =
999, iterations = 1000)# calculate SES.MPD (PICANTE)


In this line appears "Error in dis[sppInSample, sppInSample] : subscript
out of bounds". I checked in forums and 1 explanation was "different name":
species names in community and phylogenetic are slightly different. I
checked again in my species list and community data-frame and species names
are the same! But I don't know how to check if species names in my
phylogenetic tree are the same as mine community data.frame neither export
my phylogenetic tree to check out of R.

I appreciate any suggestion or comment.

Best regards,

Jhonny Capichoni Massante

        [[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/

Reply via email to