Browse code

Commit made by the Bioconductor Git-SVN bridge.

Commit id: ddcfdab6474db1d4cc3ecc5976d255c0cab6dff3

o minor bug fixed in extracting node ID of rst file <2015-04-27, Mon>



git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@103132 bc3139a8-67e5-0310-9ffc-ced21a209358

g.yu authored on 27/04/2015 10:23:33
Showing 2 changed files

  • NEWS index 39f824b..52df726 100644
  • R/paml.R index abff553..fd23580 100644
... ...
@@ -1,5 +1,6 @@
1 1
 CHANGES IN VERSION 1.1.1
2 2
 ------------------------
3
+ o minor bug fixed in extracting node ID of rst file <2015-04-27, Mon>
3 4
  o update parsing beast time scale tree to support _year (originally supports _year.\\d+) <2015-04-27, Mon>
4 5
  o add Tommy in author <2015-04-27, Mon>
5 6
  
... ...
@@ -156,7 +156,8 @@ read.phylo_paml_rst <- function(rstfile) {
156 156
     node.length <- data.frame(label=label,
157 157
                               length=tr1$edge.length)
158 158
 
159
-    node.length$node <- sub("_\\w+", "", node.length$label)
159
+    ## node.length$node <- sub("_\\w+", "", node.length$label
160
+    node.length$node <- gsub("^(\\d+)_.*", "\\1", node.length$label)
160 161
     node.length$label %<>% sub("\\d+_", "", .)
161 162
     
162 163
     edge <- as.data.frame(edge)