... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Package: ggtree |
2 | 2 |
Type: Package |
3 | 3 |
Title: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data |
4 |
-Version: 1.7.4 |
|
4 |
+Version: 1.7.5 |
|
5 | 5 |
Authors@R: c( |
6 | 6 |
person("Guangchuang", "Yu", email = "guangchuangyu@gmail.com", role = c("aut", "cre", "cph")), |
7 | 7 |
person("Tommy Tsan-Yuk", "Lam", email = "tylam.tommy@gmail.com", rol = c("aut", "ths")), |
... | ... |
@@ -11,8 +11,9 @@ Maintainer: Guangchuang Yu <guangchuangyu@gmail.com> |
11 | 11 |
Description: 'ggtree' extends the 'ggplot2' plotting system which implemented the grammar of graphics. |
12 | 12 |
'ggtree' is designed for visualization and annotation of phylogenetic trees with their covariates and other associated data. |
13 | 13 |
Depends: |
14 |
- R (>= 3.3.1), |
|
15 |
- ggplot2 (>= 2.2.0) |
|
14 |
+ R (>= 3.3.2), |
|
15 |
+ ggplot2 (>= 2.2.0), |
|
16 |
+ treeio |
|
16 | 17 |
Imports: |
17 | 18 |
ape, |
18 | 19 |
grDevices, |
... | ... |
@@ -33,7 +33,6 @@ export(Date2decimal) |
33 | 33 |
export(MRCA) |
34 | 34 |
export(StatBalance) |
35 | 35 |
export(StatHilight) |
36 |
-export(add_colorbar) |
|
37 | 36 |
export(annotation_image) |
38 | 37 |
export(apeBoot) |
39 | 38 |
export(as.binary) |
... | ... |
@@ -41,7 +40,6 @@ export(as.polytomy) |
41 | 40 |
export(collapse) |
42 | 41 |
export(decimal2Date) |
43 | 42 |
export(download.phylopic) |
44 |
-export(drop.tip) |
|
45 | 43 |
export(expand) |
46 | 44 |
export(facet_plot) |
47 | 45 |
export(flip) |
... | ... |
@@ -64,29 +62,17 @@ export(geom_tippoint) |
64 | 62 |
export(geom_tree) |
65 | 63 |
export(geom_tree2) |
66 | 64 |
export(geom_treescale) |
67 |
-export(get.fields) |
|
68 | 65 |
export(get.offspring.tip) |
69 | 66 |
export(get.path) |
70 | 67 |
export(get.phylopic) |
71 |
-export(get.placements) |
|
72 |
-export(get.subs) |
|
73 |
-export(get.tipseq) |
|
74 |
-export(get.tree) |
|
75 |
-export(get.treeinfo) |
|
76 |
-export(get.treetext) |
|
77 |
-export(getNodeNum) |
|
78 |
-export(getRoot) |
|
79 | 68 |
export(get_balance_position) |
80 | 69 |
export(get_clade_position) |
81 | 70 |
export(get_heatmap_column_position) |
82 | 71 |
export(get_taxa_name) |
83 | 72 |
export(ggtree) |
84 | 73 |
export(gheatmap) |
85 |
-export(groupClade) |
|
86 |
-export(groupOTU) |
|
87 | 74 |
export(gzoom) |
88 | 75 |
export(inset) |
89 |
-export(is.ggtree) |
|
90 | 76 |
export(mask) |
91 | 77 |
export(merge_tree) |
92 | 78 |
export(msaplot) |
... | ... |
@@ -95,32 +81,16 @@ export(nodebar) |
95 | 81 |
export(nodeid) |
96 | 82 |
export(nodepie) |
97 | 83 |
export(open_tree) |
98 |
-export(phyPML) |
|
99 | 84 |
export(phylopic) |
100 | 85 |
export(plot) |
101 |
-export(pmlToSeq) |
|
102 | 86 |
export(raxml2nwk) |
103 |
-export(read.baseml) |
|
104 |
-export(read.beast) |
|
105 |
-export(read.codeml) |
|
106 |
-export(read.codeml_mlc) |
|
107 |
-export(read.hyphy) |
|
108 |
-export(read.jplace) |
|
109 |
-export(read.nhx) |
|
110 |
-export(read.paml_rst) |
|
111 |
-export(read.phylip) |
|
112 | 87 |
export(read.phyloT) |
113 |
-export(read.r8s) |
|
114 |
-export(read.raxml) |
|
115 |
-export(read.tree) |
|
116 | 88 |
export(reroot) |
117 | 89 |
export(rescale_tree) |
118 | 90 |
export(revts) |
119 | 91 |
export(rotate) |
120 | 92 |
export(rotate_tree) |
121 |
-export(rtree) |
|
122 | 93 |
export(scaleClade) |
123 |
-export(scale_color) |
|
124 | 94 |
export(scale_x_ggtree) |
125 | 95 |
export(stat_balance) |
126 | 96 |
export(stat_hilight) |
... | ... |
@@ -130,46 +100,20 @@ export(theme_transparent) |
130 | 100 |
export(theme_tree) |
131 | 101 |
export(theme_tree2) |
132 | 102 |
export(viewClade) |
133 |
-export(write.jplace) |
|
134 | 103 |
export(xlim_expand) |
135 | 104 |
export(xlim_tree) |
136 |
-exportClasses(apeBootstrap) |
|
137 |
-exportClasses(beast) |
|
138 |
-exportClasses(codeml) |
|
139 |
-exportClasses(codeml_mlc) |
|
140 |
-exportClasses(hyphy) |
|
141 |
-exportClasses(jplace) |
|
142 |
-exportClasses(nhx) |
|
143 |
-exportClasses(paml_rst) |
|
144 |
-exportClasses(phangorn) |
|
145 |
-exportClasses(phylip) |
|
146 |
-exportClasses(r8s) |
|
147 |
-exportClasses(raxml) |
|
148 |
-exportMethods(drop.tip) |
|
149 |
-exportMethods(get.fields) |
|
150 |
-exportMethods(get.placements) |
|
151 |
-exportMethods(get.subs) |
|
152 |
-exportMethods(get.tipseq) |
|
153 |
-exportMethods(get.tree) |
|
154 |
-exportMethods(get.treeinfo) |
|
155 |
-exportMethods(get.treetext) |
|
156 | 105 |
exportMethods(groupClade) |
157 | 106 |
exportMethods(groupOTU) |
158 | 107 |
exportMethods(gzoom) |
159 | 108 |
exportMethods(plot) |
160 | 109 |
exportMethods(reroot) |
161 |
-exportMethods(scale_color) |
|
162 |
-exportMethods(show) |
|
163 | 110 |
importFrom(ape,di2multi) |
164 | 111 |
importFrom(ape,extract.clade) |
165 | 112 |
importFrom(ape,getMRCA) |
166 | 113 |
importFrom(ape,is.binary.tree) |
167 | 114 |
importFrom(ape,ladderize) |
168 |
-importFrom(ape,print.phylo) |
|
169 |
-importFrom(ape,read.nexus) |
|
170 | 115 |
importFrom(ape,read.tree) |
171 | 116 |
importFrom(ape,reorder.phylo) |
172 |
-importFrom(ape,which.edge) |
|
173 | 117 |
importFrom(ape,write.tree) |
174 | 118 |
importFrom(ggplot2,GeomCurve) |
175 | 119 |
importFrom(ggplot2,GeomLabel) |
... | ... |
@@ -235,20 +179,15 @@ importFrom(grid,pushViewport) |
235 | 179 |
importFrom(grid,rasterGrob) |
236 | 180 |
importFrom(grid,unit) |
237 | 181 |
importFrom(grid,viewport) |
238 |
-importFrom(jsonlite,fromJSON) |
|
239 | 182 |
importFrom(magrittr,"%<>%") |
240 | 183 |
importFrom(magrittr,"%>%") |
241 | 184 |
importFrom(magrittr,add) |
242 | 185 |
importFrom(magrittr,equals) |
243 |
-importFrom(methods,"slot<-") |
|
244 |
-importFrom(methods,.hasSlot) |
|
245 |
-importFrom(methods,is) |
|
246 |
-importFrom(methods,missingArg) |
|
247 |
-importFrom(methods,new) |
|
248 |
-importFrom(methods,show) |
|
249 |
-importFrom(methods,slot) |
|
250 | 186 |
importFrom(stats4,plot) |
251 | 187 |
importFrom(tidyr,gather) |
188 |
+importFrom(treeio,as.treedata) |
|
189 |
+importFrom(treeio,groupClade) |
|
190 |
+importFrom(treeio,groupOTU) |
|
252 | 191 |
importFrom(utils,download.file) |
253 | 192 |
importFrom(utils,modifyList) |
254 | 193 |
importFrom(utils,packageDescription) |
... | ... |
@@ -1,3 +1,7 @@ |
1 |
+CHANGES IN VERSION 1.7.5 |
|
2 |
+------------------------ |
|
3 |
+ o remove codes that move to treeio and now ggtree depends treeio <2016-12-20, Tue> |
|
4 |
+ |
|
1 | 5 |
CHANGES IN VERSION 1.7.4 |
2 | 6 |
------------------------ |
3 | 7 |
o is.ggtree function to test whether object is produced by ggtree <2016-12-06, Tue> |
... | ... |
@@ -1,9 +1,9 @@ |
1 |
-setOldClass("phylo") |
|
2 |
-setOldClass("multiPhylo") |
|
3 |
-setOldClass("ggtree") |
|
1 |
+## setOldClass("phylo") |
|
2 |
+## setOldClass("multiPhylo") |
|
3 |
+## setOldClass("ggtree") |
|
4 | 4 |
|
5 | 5 |
|
6 |
-setClassUnion("phyloOrmultiPhylo", c("phylo", "multiPhylo")) |
|
6 |
+## setClassUnion("phyloOrmultiPhylo", c("phylo", "multiPhylo")) |
|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
supported_tree_object <- function() { |
... | ... |
@@ -21,367 +21,367 @@ supported_tree_object <- function() { |
21 | 21 |
"raxml") |
22 | 22 |
} |
23 | 23 |
|
24 |
-##' Class "apeBootstrap" |
|
25 |
-##' This class stores ape bootstrapping analysis result |
|
26 |
-##' |
|
27 |
-##' |
|
28 |
-##' @name apeBootstrap-class |
|
29 |
-##' @docType class |
|
30 |
-##' @slot phylo phylo object of treetext |
|
31 |
-##' @slot fields available features |
|
32 |
-##' @slot bootstrap bootstrap value |
|
33 |
-##' @slot extraInfo extra information |
|
34 |
-##' @exportClass apeBootstrap |
|
35 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
36 |
-##' @keywords classes |
|
37 |
-setClass("apeBootstrap", |
|
38 |
- representation = representation( |
|
39 |
- phylo = "phylo", |
|
40 |
- fields = "character", |
|
41 |
- bootstrap = "data.frame", |
|
42 |
- extraInfo = "data.frame" |
|
43 |
- ) |
|
44 |
- ) |
|
24 |
+## ##' Class "apeBootstrap" |
|
25 |
+## ##' This class stores ape bootstrapping analysis result |
|
26 |
+## ##' |
|
27 |
+## ##' |
|
28 |
+## ##' @name apeBootstrap-class |
|
29 |
+## ##' @docType class |
|
30 |
+## ##' @slot phylo phylo object of treetext |
|
31 |
+## ##' @slot fields available features |
|
32 |
+## ##' @slot bootstrap bootstrap value |
|
33 |
+## ##' @slot extraInfo extra information |
|
34 |
+## ##' @exportClass apeBootstrap |
|
35 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
36 |
+## ##' @keywords classes |
|
37 |
+## setClass("apeBootstrap", |
|
38 |
+## representation = representation( |
|
39 |
+## phylo = "phylo", |
|
40 |
+## fields = "character", |
|
41 |
+## bootstrap = "data.frame", |
|
42 |
+## extraInfo = "data.frame" |
|
43 |
+## ) |
|
44 |
+## ) |
|
45 | 45 |
|
46 |
-##' Class "beast" |
|
47 |
-##' This class stores information of beast output |
|
48 |
-##' |
|
49 |
-##' |
|
50 |
-##' @name beast-class |
|
51 |
-##' @aliases beast-class |
|
52 |
-##' get.tree,beast-method |
|
53 |
-##' |
|
54 |
-##' @docType class |
|
55 |
-##' @slot fields beast statistic variables |
|
56 |
-##' @slot treetext tree text in beast file |
|
57 |
-##' @slot phylo tree phylo object |
|
58 |
-##' @slot translation tip number to name translation in beast file |
|
59 |
-##' @slot stats beast statistics |
|
60 |
-##' @slot file beast file, nexus format |
|
61 |
-##' @slot extraInfo extra information |
|
62 |
-##' @exportClass beast |
|
63 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
64 |
-##' @seealso \code{\link{show}} \code{\link{get.fields}} |
|
65 |
-##' \code{\link{ggtree}} |
|
66 |
-##' @keywords classes |
|
67 |
-setClass("beast", |
|
68 |
- representation = representation( |
|
69 |
- fields = "character", |
|
70 |
- treetext = "character", |
|
71 |
- phylo = "phylo", |
|
72 |
- translation = "matrix", |
|
73 |
- stats = "data.frame", |
|
74 |
- file = "character", |
|
75 |
- extraInfo = "data.frame" |
|
76 |
- ) |
|
77 |
- ) |
|
46 |
+## ##' Class "beast" |
|
47 |
+## ##' This class stores information of beast output |
|
48 |
+## ##' |
|
49 |
+## ##' |
|
50 |
+## ##' @name beast-class |
|
51 |
+## ##' @aliases beast-class |
|
52 |
+## ##' get.tree,beast-method |
|
53 |
+## ##' |
|
54 |
+## ##' @docType class |
|
55 |
+## ##' @slot fields beast statistic variables |
|
56 |
+## ##' @slot treetext tree text in beast file |
|
57 |
+## ##' @slot phylo tree phylo object |
|
58 |
+## ##' @slot translation tip number to name translation in beast file |
|
59 |
+## ##' @slot stats beast statistics |
|
60 |
+## ##' @slot file beast file, nexus format |
|
61 |
+## ##' @slot extraInfo extra information |
|
62 |
+## ##' @exportClass beast |
|
63 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
64 |
+## ##' @seealso \code{\link{show}} \code{\link{get.fields}} |
|
65 |
+## ##' \code{\link{ggtree}} |
|
66 |
+## ##' @keywords classes |
|
67 |
+## setClass("beast", |
|
68 |
+## representation = representation( |
|
69 |
+## fields = "character", |
|
70 |
+## treetext = "character", |
|
71 |
+## phylo = "phylo", |
|
72 |
+## translation = "matrix", |
|
73 |
+## stats = "data.frame", |
|
74 |
+## file = "character", |
|
75 |
+## extraInfo = "data.frame" |
|
76 |
+## ) |
|
77 |
+## ) |
|
78 | 78 |
|
79 | 79 |
|
80 |
-##' Class "codeml_mlc" |
|
81 |
-##' This class stores information of mlc file frm codeml output |
|
82 |
-##' |
|
83 |
-##' |
|
84 |
-##' @name codeml_mlc-class |
|
85 |
-##' @docType class |
|
86 |
-##' @slot fields available features |
|
87 |
-##' @slot treetext tree text |
|
88 |
-##' @slot phylo phylo object |
|
89 |
-##' @slot dNdS dN dS information |
|
90 |
-##' @slot mlcfile mlc file |
|
91 |
-##' @slot extraInfo extra information |
|
92 |
-##' @exportClass codeml_mlc |
|
93 |
-##' @author Guangchuang Yu |
|
94 |
-##' @seealso \linkS4class{paml_rst} \linkS4class{codeml} |
|
95 |
-##' @keywords classes |
|
96 |
-setClass("codeml_mlc", |
|
97 |
- representation = representation( |
|
98 |
- fields = "character", |
|
99 |
- treetext = "character", |
|
100 |
- phylo = "phylo", |
|
101 |
- dNdS = "matrix", |
|
102 |
- ## seq_type = "character", |
|
103 |
- ## tip_seq = "character", |
|
104 |
- mlcfile = "character", |
|
105 |
- extraInfo = "data.frame" |
|
106 |
- ) |
|
107 |
- ) |
|
80 |
+## ##' Class "codeml_mlc" |
|
81 |
+## ##' This class stores information of mlc file frm codeml output |
|
82 |
+## ##' |
|
83 |
+## ##' |
|
84 |
+## ##' @name codeml_mlc-class |
|
85 |
+## ##' @docType class |
|
86 |
+## ##' @slot fields available features |
|
87 |
+## ##' @slot treetext tree text |
|
88 |
+## ##' @slot phylo phylo object |
|
89 |
+## ##' @slot dNdS dN dS information |
|
90 |
+## ##' @slot mlcfile mlc file |
|
91 |
+## ##' @slot extraInfo extra information |
|
92 |
+## ##' @exportClass codeml_mlc |
|
93 |
+## ##' @author Guangchuang Yu |
|
94 |
+## ##' @seealso \linkS4class{paml_rst} \linkS4class{codeml} |
|
95 |
+## ##' @keywords classes |
|
96 |
+## setClass("codeml_mlc", |
|
97 |
+## representation = representation( |
|
98 |
+## fields = "character", |
|
99 |
+## treetext = "character", |
|
100 |
+## phylo = "phylo", |
|
101 |
+## dNdS = "matrix", |
|
102 |
+## ## seq_type = "character", |
|
103 |
+## ## tip_seq = "character", |
|
104 |
+## mlcfile = "character", |
|
105 |
+## extraInfo = "data.frame" |
|
106 |
+## ) |
|
107 |
+## ) |
|
108 | 108 |
|
109 |
-##' Class "paml_rst" |
|
110 |
-##' This class stores information of rst file from PAML output |
|
111 |
-##' |
|
112 |
-##' |
|
113 |
-##' @name paml_rst-class |
|
114 |
-##' @aliases paml_rst-class |
|
115 |
-##' set.subs,paml_rst-method |
|
116 |
-##' set.subs<-,paml_rst-method |
|
117 |
-##' |
|
118 |
-##' @docType class |
|
119 |
-##' @slot fields availabel attributes |
|
120 |
-##' @slot treetext tree text |
|
121 |
-##' @slot phylo phylo object |
|
122 |
-##' @slot seq_type one of "NT" and "AA" |
|
123 |
-##' @slot tip_seq sequences of tips |
|
124 |
-##' @slot marginal_ancseq Marginal reconstruction of ancestral sequences |
|
125 |
-##' @slot joint_ancseq Joint reconstruction of ancestral sequences |
|
126 |
-##' @slot marginal_subs sequence substitutions based on marginal_ancseq |
|
127 |
-##' @slot joint_subs sequence substitutions based on joint_ancseq |
|
128 |
-##' @slot marginal_AA_subs Amino acid sequence substitutions based on marginal_ancseq |
|
129 |
-##' @slot joint_AA_subs Amino acid sequence substitutions based on joint_ancseq |
|
130 |
-##' @slot rstfile rst file |
|
131 |
-##' @slot extraInfo extra information |
|
132 |
-##' @exportClass paml_rst |
|
133 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
134 |
-##' @seealso \linkS4class{codeml} \linkS4class{codeml_mlc} |
|
135 |
-##' @keywords classes |
|
136 |
-setClass("paml_rst", |
|
137 |
- representation = representation( |
|
138 |
- fields = "character", |
|
139 |
- treetext = "character", |
|
140 |
- phylo = "phylo", |
|
141 |
- seq_type = "character", |
|
142 |
- tip_seq = "character", |
|
143 |
- marginal_ancseq = "character", |
|
144 |
- joint_ancseq = "character", |
|
145 |
- marginal_subs = "data.frame", |
|
146 |
- joint_subs = "data.frame", |
|
147 |
- marginal_AA_subs = "data.frame", |
|
148 |
- joint_AA_subs = "data.frame", |
|
149 |
- rstfile = "character", |
|
150 |
- extraInfo = "data.frame" |
|
151 |
- ) |
|
152 |
- ) |
|
109 |
+## ##' Class "paml_rst" |
|
110 |
+## ##' This class stores information of rst file from PAML output |
|
111 |
+## ##' |
|
112 |
+## ##' |
|
113 |
+## ##' @name paml_rst-class |
|
114 |
+## ##' @aliases paml_rst-class |
|
115 |
+## ##' set.subs,paml_rst-method |
|
116 |
+## ##' set.subs<-,paml_rst-method |
|
117 |
+## ##' |
|
118 |
+## ##' @docType class |
|
119 |
+## ##' @slot fields availabel attributes |
|
120 |
+## ##' @slot treetext tree text |
|
121 |
+## ##' @slot phylo phylo object |
|
122 |
+## ##' @slot seq_type one of "NT" and "AA" |
|
123 |
+## ##' @slot tip_seq sequences of tips |
|
124 |
+## ##' @slot marginal_ancseq Marginal reconstruction of ancestral sequences |
|
125 |
+## ##' @slot joint_ancseq Joint reconstruction of ancestral sequences |
|
126 |
+## ##' @slot marginal_subs sequence substitutions based on marginal_ancseq |
|
127 |
+## ##' @slot joint_subs sequence substitutions based on joint_ancseq |
|
128 |
+## ##' @slot marginal_AA_subs Amino acid sequence substitutions based on marginal_ancseq |
|
129 |
+## ##' @slot joint_AA_subs Amino acid sequence substitutions based on joint_ancseq |
|
130 |
+## ##' @slot rstfile rst file |
|
131 |
+## ##' @slot extraInfo extra information |
|
132 |
+## ##' @exportClass paml_rst |
|
133 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
134 |
+## ##' @seealso \linkS4class{codeml} \linkS4class{codeml_mlc} |
|
135 |
+## ##' @keywords classes |
|
136 |
+## setClass("paml_rst", |
|
137 |
+## representation = representation( |
|
138 |
+## fields = "character", |
|
139 |
+## treetext = "character", |
|
140 |
+## phylo = "phylo", |
|
141 |
+## seq_type = "character", |
|
142 |
+## tip_seq = "character", |
|
143 |
+## marginal_ancseq = "character", |
|
144 |
+## joint_ancseq = "character", |
|
145 |
+## marginal_subs = "data.frame", |
|
146 |
+## joint_subs = "data.frame", |
|
147 |
+## marginal_AA_subs = "data.frame", |
|
148 |
+## joint_AA_subs = "data.frame", |
|
149 |
+## rstfile = "character", |
|
150 |
+## extraInfo = "data.frame" |
|
151 |
+## ) |
|
152 |
+## ) |
|
153 | 153 |
|
154 |
-##' Class "codeml" |
|
155 |
-##' This class stores information of output from codeml |
|
156 |
-##' |
|
157 |
-##' |
|
158 |
-##' @name codeml-class |
|
159 |
-##' @docType class |
|
160 |
-##' @slot mlc A \code{code_mlc} object |
|
161 |
-##' @slot rst A \code{paml_rst} object |
|
162 |
-##' @slot extraInfo extra information |
|
163 |
-##' @exportClass codeml |
|
164 |
-##' @seealso \linkS4class{codeml_mlc} \linkS4class{paml_rst} |
|
165 |
-##' @keywords codeml |
|
166 |
-setClass("codeml", |
|
167 |
- representation = representation( |
|
168 |
- mlc = "codeml_mlc", |
|
169 |
- rst = "paml_rst", |
|
170 |
- extraInfo = "data.frame" |
|
171 |
- ) |
|
172 |
- ) |
|
154 |
+## ##' Class "codeml" |
|
155 |
+## ##' This class stores information of output from codeml |
|
156 |
+## ##' |
|
157 |
+## ##' |
|
158 |
+## ##' @name codeml-class |
|
159 |
+## ##' @docType class |
|
160 |
+## ##' @slot mlc A \code{code_mlc} object |
|
161 |
+## ##' @slot rst A \code{paml_rst} object |
|
162 |
+## ##' @slot extraInfo extra information |
|
163 |
+## ##' @exportClass codeml |
|
164 |
+## ##' @seealso \linkS4class{codeml_mlc} \linkS4class{paml_rst} |
|
165 |
+## ##' @keywords codeml |
|
166 |
+## setClass("codeml", |
|
167 |
+## representation = representation( |
|
168 |
+## mlc = "codeml_mlc", |
|
169 |
+## rst = "paml_rst", |
|
170 |
+## extraInfo = "data.frame" |
|
171 |
+## ) |
|
172 |
+## ) |
|
173 | 173 |
|
174 | 174 |
|
175 | 175 |
|
176 |
-##' Class "hyphy" |
|
177 |
-##' This class stores information of HYPHY output |
|
178 |
-##' |
|
179 |
-##' |
|
180 |
-##' @name hyphy-class |
|
181 |
-##' @docType class |
|
182 |
-##' @slot fields available features |
|
183 |
-##' @slot treetext tree text |
|
184 |
-##' @slot phylo phylo object |
|
185 |
-##' @slot seq_type one of "NT" and "AA" |
|
186 |
-##' @slot subs sequence substitutions |
|
187 |
-##' @slot AA_subs Amino acid sequence substitution |
|
188 |
-##' @slot ancseq ancestral sequences |
|
189 |
-##' @slot tip_seq tip sequences |
|
190 |
-##' @slot tip.fasfile fasta file of tip sequences |
|
191 |
-##' @slot tree.file tree file |
|
192 |
-##' @slot ancseq.file ancestral sequence file, nexus format |
|
193 |
-##' @slot extraInfo extra information |
|
194 |
-##' @exportClass hyphy |
|
195 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
196 |
-##' @seealso \linkS4class{paml_rst} |
|
197 |
-##' @keywords classes |
|
198 |
-setClass("hyphy", |
|
199 |
- representation = representation( |
|
200 |
- fields = "character", |
|
201 |
- treetext = "character", |
|
202 |
- phylo = "phylo", |
|
203 |
- seq_type = "character", |
|
204 |
- subs = "data.frame", |
|
205 |
- AA_subs = "data.frame", |
|
206 |
- ancseq = "character", |
|
207 |
- tip_seq = "character", |
|
208 |
- tip.fasfile = "character", |
|
209 |
- tree.file = "character", |
|
210 |
- ancseq.file = "character", |
|
211 |
- extraInfo = "data.frame" |
|
212 |
- ) |
|
213 |
- ) |
|
176 |
+## ##' Class "hyphy" |
|
177 |
+## ##' This class stores information of HYPHY output |
|
178 |
+## ##' |
|
179 |
+## ##' |
|
180 |
+## ##' @name hyphy-class |
|
181 |
+## ##' @docType class |
|
182 |
+## ##' @slot fields available features |
|
183 |
+## ##' @slot treetext tree text |
|
184 |
+## ##' @slot phylo phylo object |
|
185 |
+## ##' @slot seq_type one of "NT" and "AA" |
|
186 |
+## ##' @slot subs sequence substitutions |
|
187 |
+## ##' @slot AA_subs Amino acid sequence substitution |
|
188 |
+## ##' @slot ancseq ancestral sequences |
|
189 |
+## ##' @slot tip_seq tip sequences |
|
190 |
+## ##' @slot tip.fasfile fasta file of tip sequences |
|
191 |
+## ##' @slot tree.file tree file |
|
192 |
+## ##' @slot ancseq.file ancestral sequence file, nexus format |
|
193 |
+## ##' @slot extraInfo extra information |
|
194 |
+## ##' @exportClass hyphy |
|
195 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
196 |
+## ##' @seealso \linkS4class{paml_rst} |
|
197 |
+## ##' @keywords classes |
|
198 |
+## setClass("hyphy", |
|
199 |
+## representation = representation( |
|
200 |
+## fields = "character", |
|
201 |
+## treetext = "character", |
|
202 |
+## phylo = "phylo", |
|
203 |
+## seq_type = "character", |
|
204 |
+## subs = "data.frame", |
|
205 |
+## AA_subs = "data.frame", |
|
206 |
+## ancseq = "character", |
|
207 |
+## tip_seq = "character", |
|
208 |
+## tip.fasfile = "character", |
|
209 |
+## tree.file = "character", |
|
210 |
+## ancseq.file = "character", |
|
211 |
+## extraInfo = "data.frame" |
|
212 |
+## ) |
|
213 |
+## ) |
|
214 | 214 |
|
215 |
-##' Class "jplace" |
|
216 |
-##' This class stores information of jplace file. |
|
217 |
-##' |
|
218 |
-##' |
|
219 |
-##' @name jplace-class |
|
220 |
-##' @aliases jplace-class |
|
221 |
-##' show,jplace-method |
|
222 |
-##' get.placements,jplace-method |
|
223 |
-##' get.treeinfo,jplace-method |
|
224 |
-##' get.fields,jplace-method |
|
225 |
-##' get.treetext,jplace-method |
|
226 |
-##' |
|
227 |
-##' @docType class |
|
228 |
-##' @slot fields colnames of first variable of placements |
|
229 |
-##' @slot treetext tree text |
|
230 |
-##' @slot phylo tree phylo object |
|
231 |
-##' @slot placements placement information |
|
232 |
-##' @slot version version |
|
233 |
-##' @slot metadata metadata |
|
234 |
-##' @slot file jplace file |
|
235 |
-##' @slot extraInfo extra information |
|
236 |
-##' @exportClass jplace |
|
237 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
238 |
-##' @seealso \code{\link{show}} \code{\link{get.tree}} |
|
239 |
-##' \code{\link{ggtree}} |
|
240 |
-##' @keywords classes |
|
241 |
-setClass("jplace", |
|
242 |
- representation = representation( |
|
243 |
- fields = "character", |
|
244 |
- treetext = "character", |
|
245 |
- phylo = "phylo", |
|
246 |
- placements = "data.frame", |
|
247 |
- version = "numeric", |
|
248 |
- metadata = "list", |
|
249 |
- file = "character", |
|
250 |
- extraInfo = "data.frame" |
|
251 |
- ) |
|
252 |
- ) |
|
215 |
+## ##' Class "jplace" |
|
216 |
+## ##' This class stores information of jplace file. |
|
217 |
+## ##' |
|
218 |
+## ##' |
|
219 |
+## ##' @name jplace-class |
|
220 |
+## ##' @aliases jplace-class |
|
221 |
+## ##' show,jplace-method |
|
222 |
+## ##' get.placements,jplace-method |
|
223 |
+## ##' get.treeinfo,jplace-method |
|
224 |
+## ##' get.fields,jplace-method |
|
225 |
+## ##' get.treetext,jplace-method |
|
226 |
+## ##' |
|
227 |
+## ##' @docType class |
|
228 |
+## ##' @slot fields colnames of first variable of placements |
|
229 |
+## ##' @slot treetext tree text |
|
230 |
+## ##' @slot phylo tree phylo object |
|
231 |
+## ##' @slot placements placement information |
|
232 |
+## ##' @slot version version |
|
233 |
+## ##' @slot metadata metadata |
|
234 |
+## ##' @slot file jplace file |
|
235 |
+## ##' @slot extraInfo extra information |
|
236 |
+## ##' @exportClass jplace |
|
237 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
238 |
+## ##' @seealso \code{\link{show}} \code{\link{get.tree}} |
|
239 |
+## ##' \code{\link{ggtree}} |
|
240 |
+## ##' @keywords classes |
|
241 |
+## setClass("jplace", |
|
242 |
+## representation = representation( |
|
243 |
+## fields = "character", |
|
244 |
+## treetext = "character", |
|
245 |
+## phylo = "phylo", |
|
246 |
+## placements = "data.frame", |
|
247 |
+## version = "numeric", |
|
248 |
+## metadata = "list", |
|
249 |
+## file = "character", |
|
250 |
+## extraInfo = "data.frame" |
|
251 |
+## ) |
|
252 |
+## ) |
|
253 | 253 |
|
254 | 254 |
|
255 |
-##' Class "nhx" |
|
256 |
-##' This class stores nhx tree |
|
257 |
-##' |
|
258 |
-##' |
|
259 |
-##' @name nhx-class |
|
260 |
-##' @rdname nhx-class |
|
261 |
-##' @docType class |
|
262 |
-##' @slot file input file |
|
263 |
-##' @slot fields available feature |
|
264 |
-##' @slot phylo phylo object |
|
265 |
-##' @slot nhx_tags tag information in nhx file |
|
266 |
-##' @slot extraInfo extra information |
|
267 |
-##' @exportClass nhx |
|
268 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
269 |
-##' @keywords classes |
|
270 |
-setClass("nhx", |
|
271 |
- representation = representation( |
|
272 |
- file = "character", |
|
273 |
- fields = "character", |
|
274 |
- phylo = "phylo", |
|
275 |
- nhx_tags = "data.frame", |
|
276 |
- extraInfo = "data.frame" |
|
277 |
- ) |
|
278 |
- ) |
|
255 |
+## ##' Class "nhx" |
|
256 |
+## ##' This class stores nhx tree |
|
257 |
+## ##' |
|
258 |
+## ##' |
|
259 |
+## ##' @name nhx-class |
|
260 |
+## ##' @rdname nhx-class |
|
261 |
+## ##' @docType class |
|
262 |
+## ##' @slot file input file |
|
263 |
+## ##' @slot fields available feature |
|
264 |
+## ##' @slot phylo phylo object |
|
265 |
+## ##' @slot nhx_tags tag information in nhx file |
|
266 |
+## ##' @slot extraInfo extra information |
|
267 |
+## ##' @exportClass nhx |
|
268 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
269 |
+## ##' @keywords classes |
|
270 |
+## setClass("nhx", |
|
271 |
+## representation = representation( |
|
272 |
+## file = "character", |
|
273 |
+## fields = "character", |
|
274 |
+## phylo = "phylo", |
|
275 |
+## nhx_tags = "data.frame", |
|
276 |
+## extraInfo = "data.frame" |
|
277 |
+## ) |
|
278 |
+## ) |
|
279 | 279 |
|
280 | 280 |
|
281 |
-##' Class "phangorn" |
|
282 |
-##' This class stores ancestral sequences inferred from 'phangorn' |
|
283 |
-##' |
|
284 |
-##' |
|
285 |
-##' @name phangorn-class |
|
286 |
-##' @docType class |
|
287 |
-##' @slot fields available attributes |
|
288 |
-##' @slot phylo phylo object |
|
289 |
-##' @slot seq_type one of "NT" and "AA" |
|
290 |
-##' @slot tip_seq sequences of tips |
|
291 |
-##' @slot ancseq ancenstral sequences |
|
292 |
-##' @slot subs sequence substitution |
|
293 |
-##' @slot AA_subs Amino acid sequence substitution |
|
294 |
-##' @slot extraInfo extra information |
|
295 |
-##' @exportClass phangorn |
|
296 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
297 |
-##' @seealso \linkS4class{paml_rst} |
|
298 |
-##' @keywords classes |
|
299 |
-setClass("phangorn", |
|
300 |
- representation = representation( |
|
301 |
- fields = "character", |
|
302 |
- phylo = "phylo", |
|
303 |
- seq_type = "character", |
|
304 |
- tip_seq = "character", |
|
305 |
- ancseq = "character", |
|
306 |
- subs = "data.frame", |
|
307 |
- AA_subs = "data.frame", |
|
308 |
- extraInfo = "data.frame") |
|
309 |
- ) |
|
281 |
+## ##' Class "phangorn" |
|
282 |
+## ##' This class stores ancestral sequences inferred from 'phangorn' |
|
283 |
+## ##' |
|
284 |
+## ##' |
|
285 |
+## ##' @name phangorn-class |
|
286 |
+## ##' @docType class |
|
287 |
+## ##' @slot fields available attributes |
|
288 |
+## ##' @slot phylo phylo object |
|
289 |
+## ##' @slot seq_type one of "NT" and "AA" |
|
290 |
+## ##' @slot tip_seq sequences of tips |
|
291 |
+## ##' @slot ancseq ancenstral sequences |
|
292 |
+## ##' @slot subs sequence substitution |
|
293 |
+## ##' @slot AA_subs Amino acid sequence substitution |
|
294 |
+## ##' @slot extraInfo extra information |
|
295 |
+## ##' @exportClass phangorn |
|
296 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
297 |
+## ##' @seealso \linkS4class{paml_rst} |
|
298 |
+## ##' @keywords classes |
|
299 |
+## setClass("phangorn", |
|
300 |
+## representation = representation( |
|
301 |
+## fields = "character", |
|
302 |
+## phylo = "phylo", |
|
303 |
+## seq_type = "character", |
|
304 |
+## tip_seq = "character", |
|
305 |
+## ancseq = "character", |
|
306 |
+## subs = "data.frame", |
|
307 |
+## AA_subs = "data.frame", |
|
308 |
+## extraInfo = "data.frame") |
|
309 |
+## ) |
|
310 | 310 |
|
311 | 311 |
|
312 | 312 |
|
313 |
-##' Class "phylip" |
|
314 |
-##' This class stores phylip tree(s) |
|
315 |
-##' |
|
316 |
-##' |
|
317 |
-##' @name phylip-class |
|
318 |
-##' @docType class |
|
319 |
-##' @slot file input file |
|
320 |
-##' @slot fields available feature |
|
321 |
-##' @slot phylo phylo or multiPhylo |
|
322 |
-##' @slot ntree number of trees |
|
323 |
-##' @slot sequence sequences |
|
324 |
-##' @slot extraInfo extra information |
|
325 |
-##' @exportClass phylip |
|
326 |
-##' @author Guangchuang Yu |
|
327 |
-##' @keywords classes |
|
328 |
-setClass("phylip", |
|
329 |
- representation = representation( |
|
330 |
- file = "character", |
|
331 |
- fields = "character", |
|
332 |
- phylo = "phyloOrmultiPhylo", |
|
333 |
- ntree = "numeric", |
|
334 |
- sequence = "character", |
|
335 |
- extraInfo = "data.frame") |
|
336 |
- ) |
|
313 |
+## ##' Class "phylip" |
|
314 |
+## ##' This class stores phylip tree(s) |
|
315 |
+## ##' |
|
316 |
+## ##' |
|
317 |
+## ##' @name phylip-class |
|
318 |
+## ##' @docType class |
|
319 |
+## ##' @slot file input file |
|
320 |
+## ##' @slot fields available feature |
|
321 |
+## ##' @slot phylo phylo or multiPhylo |
|
322 |
+## ##' @slot ntree number of trees |
|
323 |
+## ##' @slot sequence sequences |
|
324 |
+## ##' @slot extraInfo extra information |
|
325 |
+## ##' @exportClass phylip |
|
326 |
+## ##' @author Guangchuang Yu |
|
327 |
+## ##' @keywords classes |
|
328 |
+## setClass("phylip", |
|
329 |
+## representation = representation( |
|
330 |
+## file = "character", |
|
331 |
+## fields = "character", |
|
332 |
+## phylo = "phyloOrmultiPhylo", |
|
333 |
+## ntree = "numeric", |
|
334 |
+## sequence = "character", |
|
335 |
+## extraInfo = "data.frame") |
|
336 |
+## ) |
|
337 | 337 |
|
338 | 338 |
|
339 |
-##' Class "r8s" |
|
340 |
-##' This class stores output info from r8s |
|
341 |
-##' |
|
342 |
-##' |
|
343 |
-##' @name r8s-class |
|
344 |
-##' @docType class |
|
345 |
-##' @slot file input file |
|
346 |
-##' @slot fields available feature |
|
347 |
-##' @slot treetext tree text |
|
348 |
-##' @slot phylo multiPhylo, time tree, rate tree and absolute substitution tree |
|
349 |
-##' @slot extraInfo extra information |
|
350 |
-##' @exportClass r8s |
|
351 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
352 |
-##' @keywords classes |
|
353 |
-setClass("r8s", |
|
354 |
- representation = representation( |
|
355 |
- file = "character", |
|
356 |
- fields = "character", |
|
357 |
- treetext = "character", |
|
358 |
- phylo = "multiPhylo", |
|
359 |
- extraInfo = "data.frame" |
|
360 |
- ) |
|
361 |
- ) |
|
339 |
+## ##' Class "r8s" |
|
340 |
+## ##' This class stores output info from r8s |
|
341 |
+## ##' |
|
342 |
+## ##' |
|
343 |
+## ##' @name r8s-class |
|
344 |
+## ##' @docType class |
|
345 |
+## ##' @slot file input file |
|
346 |
+## ##' @slot fields available feature |
|
347 |
+## ##' @slot treetext tree text |
|
348 |
+## ##' @slot phylo multiPhylo, time tree, rate tree and absolute substitution tree |
|
349 |
+## ##' @slot extraInfo extra information |
|
350 |
+## ##' @exportClass r8s |
|
351 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
352 |
+## ##' @keywords classes |
|
353 |
+## setClass("r8s", |
|
354 |
+## representation = representation( |
|
355 |
+## file = "character", |
|
356 |
+## fields = "character", |
|
357 |
+## treetext = "character", |
|
358 |
+## phylo = "multiPhylo", |
|
359 |
+## extraInfo = "data.frame" |
|
360 |
+## ) |
|
361 |
+## ) |
|
362 | 362 |
|
363 | 363 |
|
364 |
-##' Class "raxml" |
|
365 |
-##' This class stores RAxML bootstrapping analysis result |
|
366 |
-##' |
|
367 |
-##' |
|
368 |
-##' @name raxml-class |
|
369 |
-##' @docType class |
|
370 |
-##' @slot file input file |
|
371 |
-##' @slot fields available features |
|
372 |
-##' @slot treetext tree text |
|
373 |
-##' @slot phylo phylo object of treetext |
|
374 |
-##' @slot bootstrap bootstrap value |
|
375 |
-##' @slot extraInfo extra information |
|
376 |
-##' @exportClass raxml |
|
377 |
-##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
378 |
-##' @keywords classes |
|
379 |
-setClass("raxml", |
|
380 |
- representation = representation( |
|
381 |
- file = "character", |
|
382 |
- treetext = "character" |
|
383 |
- ), |
|
384 |
- contains = "apeBootstrap" |
|
385 |
- ) |
|
364 |
+## ##' Class "raxml" |
|
365 |
+## ##' This class stores RAxML bootstrapping analysis result |
|
366 |
+## ##' |
|
367 |
+## ##' |
|
368 |
+## ##' @name raxml-class |
|
369 |
+## ##' @docType class |
|
370 |
+## ##' @slot file input file |
|
371 |
+## ##' @slot fields available features |
|
372 |
+## ##' @slot treetext tree text |
|
373 |
+## ##' @slot phylo phylo object of treetext |
|
374 |
+## ##' @slot bootstrap bootstrap value |
|
375 |
+## ##' @slot extraInfo extra information |
|
376 |
+## ##' @exportClass raxml |
|
377 |
+## ##' @author Guangchuang Yu \url{http://guangchuangyu.github.io} |
|
378 |
+## ##' @keywords classes |
|
379 |
+## setClass("raxml", |
|
380 |
+## representation = representation( |
|
381 |
+## file = "character", |
|
382 |
+## treetext = "character" |
|
383 |
+## ), |
|
384 |
+## contains = "apeBootstrap" |
|
385 |
+## ) |
|
386 | 386 |
|
387 | 387 |
|
... | ... |
@@ -33,124 +33,124 @@ if ( !isGeneric("plot") ) |
33 | 33 |
##' @export |
34 | 34 |
setGeneric("reroot", function(object, node, ...) standardGeneric("reroot")) |
35 | 35 |
|
36 |
-##' @docType methods |
|
37 |
-##' @name get.tree |
|
38 |
-##' @rdname get.tree-methods |
|
39 |
-##' @title get.tree method |
|
40 |
-##' @param object one of \code{phylo}, \code{jplace}, \code{nhx}, \code{phangorn}, \code{beast}, \code{hyphy}, \code{codeml}, \code{codeml_mlc}, \code{paml_rst} object |
|
41 |
-##' @param ... additional parameter |
|
42 |
-##' @return phylo object |
|
43 |
-##' @export |
|
44 |
-setGeneric("get.tree", function(object, ...) standardGeneric("get.tree")) |
|
45 |
- |
|
46 |
-##' @docType methods |
|
47 |
-##' @name get.treetext |
|
48 |
-##' @rdname get.treetext-methods |
|
49 |
-##' @title get.treetext method |
|
50 |
-##' @param object one of \code{phylo}, \code{jplace}, \code{beast}, \code{hyphy}, \code{codeml}, \code{codeml_mlc}, \code{paml_rst} object |
|
51 |
-##' @param ... additional parameter |
|
52 |
-##' @return phylo object |
|
53 |
-##' @export |
|
54 |
-setGeneric("get.treetext", function(object, ...) standardGeneric("get.treetext")) |
|
55 |
- |
|
56 |
- |
|
57 |
-##' @docType methods |
|
58 |
-##' @name get.treeinfo |
|
59 |
-##' @rdname get.treeinfo-methods |
|
60 |
-##' @title get.treeinfo method |
|
61 |
-##' @param object jplace object |
|
62 |
-##' @param layout layout |
|
63 |
-##' @param ladderize ladderize, logical |
|
64 |
-##' @param right logical, parameter for ladderize |
|
65 |
-##' @param ... additional parameter |
|
66 |
-##' @return data.frame |
|
67 |
-##' @export |
|
68 |
-setGeneric("get.treeinfo", function(object, layout="phylogram", ladderize=TRUE, right=FALSE, ...) standardGeneric("get.treeinfo")) |
|
69 |
- |
|
70 |
- |
|
71 |
-##' @docType methods |
|
72 |
-##' @name get.fields |
|
73 |
-##' @rdname get.fields-methods |
|
74 |
-##' @title get.fields method |
|
75 |
-##' @param object one of \code{jplace}, \code{beast}, \code{hyphy}, \code{codeml}, \code{codeml_mlc}, \code{paml_rst} object |
|
76 |
-##' @param ... additional parameter |
|
77 |
-##' @return available annotation variables |
|
78 |
-##' @export |
|
79 |
-setGeneric("get.fields", function(object, ...) standardGeneric("get.fields")) |
|
80 |
- |
|
81 |
- |
|
82 |
-##' @docType methods |
|
83 |
-##' @name get.placements |
|
84 |
-##' @rdname get.placements-methods |
|
85 |
-##' @title get.placements method |
|
86 |
-##' @param object jplace object |
|
87 |
-##' @param by get best hit or others |
|
88 |
-##' @param ... additional parameter |
|
89 |
-##' @return data.frame |
|
90 |
-##' @export |
|
91 |
-setGeneric("get.placements", function(object, by, ...) standardGeneric("get.placements")) |
|
92 |
- |
|
93 |
-##' @docType methods |
|
94 |
-##' @name get.subs |
|
95 |
-##' @rdname get.subs-methods |
|
96 |
-##' @title get.subs method |
|
97 |
-##' @param object paml_rst object |
|
98 |
-##' @param type one of 'marginal_subs', 'marginal_AA_subs', |
|
99 |
-##' 'joint_subs' or 'joint_AA_subs'. |
|
100 |
-##' @param ... additional parameter |
|
101 |
-##' @return data.frame |
|
102 |
-##' @export |
|
103 |
-setGeneric("get.subs", function(object, type, ...) standardGeneric("get.subs")) |
|
104 |
- |
|
105 |
- |
|
106 |
-##' @docType methods |
|
107 |
-##' @name get.tipseq |
|
108 |
-##' @rdname get.tipseq-methods |
|
109 |
-##' @title get.tipseq method |
|
110 |
-##' @param object one of paml_rst or codeml object |
|
111 |
-##' @param ... additional parameter |
|
112 |
-##' @return character |
|
113 |
-##' @export |
|
114 |
-setGeneric("get.tipseq", function(object, ...) standardGeneric("get.tipseq")) |
|
115 |
- |
|
116 |
-##' @docType methods |
|
117 |
-##' @name groupOTU |
|
118 |
-##' @rdname groupOTU-methods |
|
119 |
-##' @title groupOTU method |
|
120 |
-##' @param object supported objects, including phylo, paml_rst, |
|
121 |
-##' codeml_mlc, codeml, jplace, beast, hyphy |
|
122 |
-##' @param focus a vector of tip (label or number) or a list of tips. |
|
123 |
-##' @param group_name name of the group, 'group' by default |
|
124 |
-##' @param ... additional parameter |
|
125 |
-##' @return group index |
|
126 |
-##' @export |
|
127 |
-setGeneric("groupOTU", function(object, focus, group_name="group", ...) standardGeneric("groupOTU")) |
|
128 |
- |
|
129 |
-##' @docType methods |
|
130 |
-##' @name groupClade |
|
131 |
-##' @rdname groupClade-methods |
|
132 |
-##' @title groupClade method |
|
133 |
-##' @param object supported objects, including phylo, paml_rst, |
|
134 |
-##' codeml_mlc, codeml, jplace, beast, hyphy |
|
135 |
-##' @param node a internal node or a vector of internal nodes |
|
136 |
-##' @param group_name name of the group, 'group' by default |
|
137 |
-##' @param ... additional parameter |
|
138 |
-##' @return group index |
|
139 |
-##' @export |
|
140 |
-setGeneric("groupClade", function(object, node, group_name="group", ...) standardGeneric("groupClade")) |
|
141 |
- |
|
142 |
- |
|
143 |
-##' @docType methods |
|
144 |
-##' @name scale_color |
|
145 |
-##' @rdname scale_color-methods |
|
146 |
-##' @title scale_color method |
|
147 |
-##' @param object supported objects, including phylo, paml_rst, |
|
148 |
-##' codeml_mlc, codeml, jplace, beast, hyphy |
|
149 |
-##' @param by one of numerical attributes |
|
150 |
-##' @param ... additional parameter |
|
151 |
-##' @return color vector |
|
152 |
-##' @export |
|
153 |
-setGeneric("scale_color", function(object, by, ...) standardGeneric("scale_color")) |
|
36 |
+## ##' @docType methods |
|
37 |
+## ##' @name get.tree |
|
38 |
+## ##' @rdname get.tree-methods |
|
39 |
+## ##' @title get.tree method |
|
40 |
+## ##' @param object one of \code{phylo}, \code{jplace}, \code{nhx}, \code{phangorn}, \code{beast}, \code{hyphy}, \code{codeml}, \code{codeml_mlc}, \code{paml_rst} object |
|
41 |
+## ##' @param ... additional parameter |
|
42 |
+## ##' @return phylo object |
|
43 |
+## ##' @export |
|
44 |
+## setGeneric("get.tree", function(object, ...) standardGeneric("get.tree")) |
|
45 |
+ |
|
46 |
+## ##' @docType methods |
|
47 |
+## ##' @name get.treetext |
|
48 |
+## ##' @rdname get.treetext-methods |
|
49 |
+## ##' @title get.treetext method |
|
50 |
+## ##' @param object one of \code{phylo}, \code{jplace}, \code{beast}, \code{hyphy}, \code{codeml}, \code{codeml_mlc}, \code{paml_rst} object |
|
51 |
+## ##' @param ... additional parameter |
|
52 |
+## ##' @return phylo object |
|
53 |
+## ##' @export |
|
54 |
+## setGeneric("get.treetext", function(object, ...) standardGeneric("get.treetext")) |
|
55 |
+ |
|
56 |
+ |
|
57 |
+## ##' @docType methods |
|
58 |
+## ##' @name get.treeinfo |
|
59 |
+## ##' @rdname get.treeinfo-methods |
|
60 |
+## ##' @title get.treeinfo method |
|
61 |
+## ##' @param object jplace object |
|
62 |
+## ##' @param layout layout |
|
63 |
+## ##' @param ladderize ladderize, logical |
|
64 |
+## ##' @param right logical, parameter for ladderize |
|
65 |
+## ##' @param ... additional parameter |
|
66 |
+## ##' @return data.frame |
|
67 |
+## ##' @export |
|
68 |
+## setGeneric("get.treeinfo", function(object, layout="phylogram", ladderize=TRUE, right=FALSE, ...) standardGeneric("get.treeinfo")) |
|
69 |
+ |
|
70 |
+ |
|
71 |
+## ##' @docType methods |
|
72 |
+## ##' @name get.fields |
|
73 |
+## ##' @rdname get.fields-methods |
|
74 |
+## ##' @title get.fields method |
|
75 |
+## ##' @param object one of \code{jplace}, \code{beast}, \code{hyphy}, \code{codeml}, \code{codeml_mlc}, \code{paml_rst} object |
|
76 |
+## ##' @param ... additional parameter |
|
77 |
+## ##' @return available annotation variables |
|
78 |
+## ##' @export |
|
79 |
+## setGeneric("get.fields", function(object, ...) standardGeneric("get.fields")) |
|
80 |
+ |
|
81 |
+ |
|
82 |
+## ##' @docType methods |
|
83 |
+## ##' @name get.placements |
|
84 |
+## ##' @rdname get.placements-methods |
|
85 |
+## ##' @title get.placements method |
|
86 |
+## ##' @param object jplace object |
|
87 |
+## ##' @param by get best hit or others |
|
88 |
+## ##' @param ... additional parameter |
|
89 |
+## ##' @return data.frame |
|
90 |
+## ##' @export |
|
91 |
+## setGeneric("get.placements", function(object, by, ...) standardGeneric("get.placements")) |
|
92 |
+ |
|
93 |
+## ##' @docType methods |
|
94 |
+## ##' @name get.subs |
|
95 |
+## ##' @rdname get.subs-methods |
|
96 |
+## ##' @title get.subs method |
|
97 |
+## ##' @param object paml_rst object |
|
98 |
+## ##' @param type one of 'marginal_subs', 'marginal_AA_subs', |
|
99 |
+## ##' 'joint_subs' or 'joint_AA_subs'. |
|
100 |
+## ##' @param ... additional parameter |
|
101 |
+## ##' @return data.frame |
|
102 |
+## ##' @export |
|
103 |
+## setGeneric("get.subs", function(object, type, ...) standardGeneric("get.subs")) |
|
104 |
+ |
|
105 |
+ |
|
106 |
+## ##' @docType methods |
|
107 |
+## ##' @name get.tipseq |
|
108 |
+## ##' @rdname get.tipseq-methods |
|
109 |
+## ##' @title get.tipseq method |
|
110 |
+## ##' @param object one of paml_rst or codeml object |
|
111 |
+## ##' @param ... additional parameter |
|
112 |
+## ##' @return character |
|
113 |
+## ##' @export |
|
114 |
+## setGeneric("get.tipseq", function(object, ...) standardGeneric("get.tipseq")) |
|
115 |
+ |
|
116 |
+## ##' @docType methods |
|
117 |
+## ##' @name groupOTU |
|
118 |
+## ##' @rdname groupOTU-methods |
|
119 |
+## ##' @title groupOTU method |
|
120 |
+## ##' @param object supported objects, including phylo, paml_rst, |
|
121 |
+## ##' codeml_mlc, codeml, jplace, beast, hyphy |
|
122 |
+## ##' @param focus a vector of tip (label or number) or a list of tips. |
|
123 |
+## ##' @param group_name name of the group, 'group' by default |
|
124 |
+## ##' @param ... additional parameter |
|
125 |
+## ##' @return group index |
|
126 |
+## ##' @export |
|
127 |
+## setGeneric("groupOTU", function(object, focus, group_name="group", ...) standardGeneric("groupOTU")) |
|
128 |
+ |
|
129 |
+## ##' @docType methods |
|
130 |
+## ##' @name groupClade |
|
131 |
+## ##' @rdname groupClade-methods |
|
132 |
+## ##' @title groupClade method |
|
133 |
+## ##' @param object supported objects, including phylo, paml_rst, |
|
134 |
+## ##' codeml_mlc, codeml, jplace, beast, hyphy |
|
135 |
+## ##' @param node a internal node or a vector of internal nodes |
|
136 |
+## ##' @param group_name name of the group, 'group' by default |
|
137 |
+## ##' @param ... additional parameter |
|
138 |
+## ##' @return group index |
|
139 |
+## ##' @export |
|
140 |
+## setGeneric("groupClade", function(object, node, group_name="group", ...) standardGeneric("groupClade")) |
|
141 |
+ |
|
142 |
+ |
|
143 |
+## ##' @docType methods |
|
144 |
+## ##' @name scale_color |
|
145 |
+## ##' @rdname scale_color-methods |
|
146 |
+## ##' @title scale_color method |
|
147 |
+## ##' @param object supported objects, including phylo, paml_rst, |
|
148 |
+## ##' codeml_mlc, codeml, jplace, beast, hyphy |
|
149 |
+## ##' @param by one of numerical attributes |
|
150 |
+## ##' @param ... additional parameter |
|
151 |
+## ##' @return color vector |
|
152 |
+## ##' @export |
|
153 |
+## setGeneric("scale_color", function(object, by, ...) standardGeneric("scale_color")) |
|
154 | 154 |
|
155 | 155 |
##' @docType methods |
156 | 156 |
##' @name gzoom |
... | ... |
@@ -166,17 +166,17 @@ setGeneric("scale_color", function(object, by, ...) standardGeneric("scale_color |
166 | 166 |
setGeneric("gzoom", function(object, focus, subtree=FALSE, widths=c(.3, .7), ...) standardGeneric("gzoom")) |
167 | 167 |
|
168 | 168 |
|
169 |
-##' @docType methods |
|
170 |
-##' @name drop.tip |
|
171 |
-##' @rdname drop.tip-methods |
|
172 |
-##' @title drop.tip method |
|
173 |
-##' @param object An nhx or phylo object |
|
174 |
-##' @param tip a vector of mode numeric or character specifying the tips to delete |
|
175 |
-##' @param ... additional parameters |
|
176 |
-##' @return updated object |
|
177 |
-##' @export |
|
178 |
-setGeneric ( |
|
179 |
- name = "drop.tip", |
|
180 |
- def = function( object, tip, ... ) |
|
181 |
- { standardGeneric("drop.tip") } |
|
182 |
-) |
|
169 |
+## ##' @docType methods |
|
170 |
+## ##' @name drop.tip |
|
171 |
+## ##' @rdname drop.tip-methods |
|
172 |
+## ##' @title drop.tip method |
|
173 |
+## ##' @param object An nhx or phylo object |
|
174 |
+## ##' @param tip a vector of mode numeric or character specifying the tips to delete |
|
175 |
+## ##' @param ... additional parameters |
|
176 |
+## ##' @return updated object |
|
177 |
+## ##' @export |
|
178 |
+## setGeneric ( |
|
179 |
+## name = "drop.tip", |
|
180 |
+## def = function( object, tip, ... ) |
|
181 |
+## { standardGeneric("drop.tip") } |
|
182 |
+## ) |
... | ... |
@@ -1,95 +1,95 @@ |
1 |
-##' parse RAxML bootstrapping analysis output |
|
2 |
-##' |
|
3 |
-##' |
|
4 |
-##' @title read.raxml |
|
5 |
-##' @param file RAxML bootstrapping analysis output |
|
6 |
-##' @return raxml object |
|
7 |
-##' @export |
|
8 |
-##' @author Guangchuang Yu |
|
9 |
-read.raxml <- function(file) { |
|
10 |
- tree.text <- readLines(file) |
|
11 |
- tree_text <- gsub('(:[0-9\\.eE+\\-]+)\\[(\\d+)\\]', '\\@\\2\\1', tree.text) |
|
12 |
- phylo <- read.tree(text=tree_text) |
|
13 |
- if(any(grepl('@', phylo$node.label))) { |
|
14 |
- bootstrap <- as.numeric(gsub("[^@]*@(\\d+)", "\\1", phylo$node.label)) |
|
15 |
- phylo$node.label <- gsub("@\\d+", "", phylo$node.label) |
|
16 |
- } |
|
1 |
+## ##' parse RAxML bootstrapping analysis output |
|
2 |
+## ##' |
|
3 |
+## ##' |
|
4 |
+## ##' @title read.raxml |
|
5 |
+## ##' @param file RAxML bootstrapping analysis output |
|
6 |
+## ##' @return raxml object |
|
7 |
+## ##' @export |
|
8 |
+## ##' @author Guangchuang Yu |
|
9 |
+## read.raxml <- function(file) { |
|
10 |
+## tree.text <- readLines(file) |
|
11 |
+## tree_text <- gsub('(:[0-9\\.eE+\\-]+)\\[(\\d+)\\]', '\\@\\2\\1', tree.text) |
|
12 |
+## phylo <- read.tree(text=tree_text) |
|
13 |
+## if(any(grepl('@', phylo$node.label))) { |
|
14 |
+## bootstrap <- as.numeric(gsub("[^@]*@(\\d+)", "\\1", phylo$node.label)) |
|
15 |
+## phylo$node.label <- gsub("@\\d+", "", phylo$node.label) |
|
16 |
+## } |
|
17 | 17 |
|
18 |
- if (all(phylo$node.label == "")) { |
|
19 |
- phylo$node.label <- NULL |
|
20 |
- } |
|
18 |
+## if (all(phylo$node.label == "")) { |
|
19 |
+## phylo$node.label <- NULL |
|
20 |
+## } |
|
21 | 21 |
|
22 |
- bootstrap <- data.frame(node = Ntip(phylo) + 1:phylo$Nnode, |
|
23 |
- bootstrap = bootstrap) |
|
22 |
+## bootstrap <- data.frame(node = Ntip(phylo) + 1:phylo$Nnode, |
|
23 |
+## bootstrap = bootstrap) |
|
24 | 24 |
|
25 |
- new("raxml", |
|
26 |
- file = file, |
|
27 |
- fields = "bootstrap", |
|
28 |
- treetext = tree.text, |
|
29 |
- phylo = phylo, |
|
30 |
- bootstrap = bootstrap |
|
31 |
- ) |
|
32 |
-} |
|
25 |
+## new("raxml", |
|
26 |
+## file = file, |
|
27 |
+## fields = "bootstrap", |
|
28 |
+## treetext = tree.text, |
|
29 |
+## phylo = phylo, |
|
30 |
+## bootstrap = bootstrap |
|
31 |
+## ) |
|
32 |
+## } |
|
33 | 33 |
|
34 | 34 |
|
35 |
-##' @rdname show-methods |
|
36 |
-##' @importFrom ape print.phylo |
|
37 |
-##' @exportMethod show |
|
38 |
-setMethod("show", signature(object = "raxml"), |
|
39 |
- function(object) { |
|
40 |
- cat("'raxml' S4 object that stored information of\n\t", |
|
41 |
- paste0("'", object@file, "'.\n\n")) |
|
42 |
- cat("...@ tree: ") |
|
43 |
- print.phylo(get.tree(object)) |
|
44 |
- cat("\nwith the following features available:\n") |
|
45 |
- print_fields(object) |
|
46 |
- }) |
|
35 |
+## ##' @rdname show-methods |
|
36 |
+## ##' @importFrom ape print.phylo |
|
37 |
+## ##' @exportMethod show |
|
38 |
+## setMethod("show", signature(object = "raxml"), |
|
39 |
+## function(object) { |
|
40 |
+## cat("'raxml' S4 object that stored information of\n\t", |
|
41 |
+## paste0("'", object@file, "'.\n\n")) |
|
42 |
+## cat("...@ tree: ") |
|
43 |
+## print.phylo(get.tree(object)) |
|
44 |
+## cat("\nwith the following features available:\n") |
|
45 |
+## print_fields(object) |
|
46 |
+## }) |
|
47 | 47 |
|
48 |
-##' @rdname groupOTU-methods |
|
49 |
-##' @exportMethod groupOTU |
|
50 |
-setMethod("groupOTU", signature(object="raxml"), |
|
51 |
- function(object, focus, group_name="group") { |
|
52 |
- groupOTU_(object, focus, group_name) |
|
53 |
- } |
|
54 |
- ) |
|
48 |
+## ##' @rdname groupOTU-methods |
|
49 |
+## ##' @exportMethod groupOTU |
|
50 |
+## setMethod("groupOTU", signature(object="raxml"), |
|
51 |
+## function(object, focus, group_name="group") { |
|
52 |
+## groupOTU_(object, focus, group_name) |
|
53 |
+## } |
|
54 |
+## ) |
|
55 | 55 |
|
56 |
-##' @rdname groupClade-methods |
|
57 |
-##' @exportMethod groupClade |
|
58 |
-setMethod("groupClade", signature(object="raxml"), |
|
59 |
- function(object, node, group_name="group") { |
|
60 |
- groupClade_(object, node, group_name) |
|
61 |
- }) |
|
56 |
+## ##' @rdname groupClade-methods |
|
57 |
+## ##' @exportMethod groupClade |
|
58 |
+## setMethod("groupClade", signature(object="raxml"), |
|
59 |
+## function(object, node, group_name="group") { |
|
60 |
+## groupClade_(object, node, group_name) |
|
61 |
+## }) |
|
62 | 62 |
|
63 |
-##' @rdname scale_color-methods |
|
64 |
-##' @exportMethod scale_color |
|
65 |
-setMethod("scale_color", signature(object="raxml"), |
|
66 |
- function(object, by="bootstrap", ...) { |
|
67 |
- scale_color_(object, by, ...) |
|
68 |
- }) |
|
63 |
+## ##' @rdname scale_color-methods |
|
64 |
+## ##' @exportMethod scale_color |
|
65 |
+## setMethod("scale_color", signature(object="raxml"), |
|
66 |
+## function(object, by="bootstrap", ...) { |
|
67 |
+## scale_color_(object, by, ...) |
|
68 |
+## }) |
|
69 | 69 |
|
70 | 70 |
|
71 |
-##' @rdname gzoom-methods |
|
72 |
-##' @exportMethod gzoom |
|
73 |
-setMethod("gzoom", signature(object="raxml"), |
|
74 |
- function(object, focus, subtree=FALSE, widths=c(.3, .7)) { |
|
75 |
- gzoom.phylo(get.tree(object), focus, subtree, widths) |
|
76 |
- }) |
|
71 |
+## ##' @rdname gzoom-methods |
|
72 |
+## ##' @exportMethod gzoom |
|
73 |
+## setMethod("gzoom", signature(object="raxml"), |
|
74 |
+## function(object, focus, subtree=FALSE, widths=c(.3, .7)) { |
|
75 |
+## gzoom.phylo(get.tree(object), focus, subtree, widths) |
|
76 |
+## }) |
|
77 | 77 |
|
78 | 78 |
|
79 |
-##' @rdname get.tree-methods |
|
80 |
-##' @exportMethod get.tree |
|
81 |
-setMethod("get.tree", signature(object="raxml"), |
|
82 |
- function(object,...) { |
|
83 |
- object@phylo |
|
84 |
- } |
|
85 |
- ) |
|
79 |
+## ##' @rdname get.tree-methods |
|
80 |
+## ##' @exportMethod get.tree |
|
81 |
+## setMethod("get.tree", signature(object="raxml"), |
|
82 |
+## function(object,...) { |
|
83 |
+## object@phylo |
|
84 |
+## } |
|
85 |
+## ) |
|
86 | 86 |
|
87 | 87 |
|
88 |
-##' @rdname get.fields-methods |
|
89 |
-##' @exportMethod get.fields |
|
90 |
-setMethod("get.fields", signature(object="raxml"), |
|
91 |
- function(object, ...) { |
|
92 |
- get.fields.tree(object) |
|
93 |
- } |
|
94 |
- ) |
|
88 |
+## ##' @rdname get.fields-methods |
|
89 |
+## ##' @exportMethod get.fields |
|
90 |
+## setMethod("get.fields", signature(object="raxml"), |
|
91 |
+## function(object, ...) { |
|
92 |
+## get.fields.tree(object) |
|
93 |
+## } |
|
94 |
+## ) |
|
95 | 95 |
|
... | ... |
@@ -1,29 +1,29 @@ |
1 | 1 |
|
2 |
-##' @export |
|
3 |
-ape::read.tree |
|
2 |
+## ##' @export |
|
3 |
+## ape::read.tree |
|
4 | 4 |
|
5 | 5 |
|
6 |
-##' generate random tree |
|
7 |
-##' @export |
|
8 |
-##' @rdname rtree |
|
9 |
-##' @param n number of tips in the tree |
|
10 |
-##' @param rooted logcial |
|
11 |
-##' @param tip.label tip label |
|
12 |
-##' @param br one of the following: (i) an R function used to generate the |
|
13 |
-##' branch lengths ('rtree'; use 'NULL' to simulate only a |
|
14 |
-##' topology), or the coalescence times ('rcoal'); (ii) a |
|
15 |
-##' character to simulate a genuine coalescent tree for 'rcoal' |
|
16 |
-##' (the default); or (iii) a numeric vector for the branch |
|
17 |
-##' lengths or the coalescence times. |
|
18 |
-##' @param ... additional parameters to be passed to 'br' |
|
19 |
-##' @source |
|
20 |
-##' This is just the imported function |
|
21 |
-##' from the ape package. The documentation you should |
|
22 |
-##' read for the rtree function can be found here: \link[ape]{rtree} |
|
23 |
-##' |
|
24 |
-##' @seealso |
|
25 |
-##' \link[ape]{rtree} |
|
26 |
-rtree <- ape::rtree |
|
6 |
+## ##' generate random tree |
|
7 |