Hi Agus,

The problem is that spaces are ignored in Newick and NEXUS files. Maybe you do not need to replace "_" for " " ?

Best,

Emmanuel

Le 29/06/2013 15:15, Agus Camacho a écrit :
Dear all,


After correcting the names of a otherwise perfectly functional tree using
gsub,

tree$tip.label=gsub("_", " ", tree$tip.label


the new tree looks nice, but when i save it using write.nexus and reopen
it, i get:


wtree=read.nexus("tree_corrected_names.nexus")Warning message:In matrix(x, ncol 
= 2, byrow = TRUE) :
   data length [105] is not a sub-multiple or multiple of the number of rows 
[53]


wtree$tip.label [1] "Tupinambis"       "2"                "ocellifer"        
"Kentropyx"
  [5] "4"                "atriventris"      "Anotosaura"       "6"
  [9] "percarinatum"     "Arthrosaura"      "8"                "reticulata"
[13] "Bachia"           "10"               "panoplia"         "Bachia"
[17] "12"               "bicarinatus"      "Placosoma"        "14"
[21] "glabellum"        "Neusticurus"      "16"               "quadrilineata"
[25] "Cercosaura"       "18"               "ocelatta"         "Cercosaura"
[29] "20"               "brachylepis"      "Heterodactylus"   "22"
[33] "modesta"          "Iphisa"           "24"               "paeminosus"
[37] "Gymnophthalmus"   "26"               "ablephara"        "Calyptommatus"
[41] "28"               "leiolepis"        "Calyptommatus"    "30"
[45] "atticolus"        "Micrablepharus"   "32"               "agilis"
[49] "Vanzosaura"       "34"               "erythrocercus"    "Procellosaurinus"
[53] "1"



thanks in advance
Agus



_______________________________________________
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 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