-
Notifications
You must be signed in to change notification settings - Fork 0
/
ISSUES.Rmd
156 lines (92 loc) · 7.01 KB
/
ISSUES.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
title: "Package issues"
author: "Arthur Rodrigues"
date: '2022-05-04'
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## `evoregions`
the function `evoregions` need to be revised with care. It was working well, but I implement a set of changes in the behavior of the function.
Some changes are:
- the cleaning of `tree` and `comm` inside the function was removed. Now the code `picante::match.phylo.comm(phy, comm)` only assure if the order of the names is correct. If any species is misssing in `tree` or `comm`the function `stop`s and inform the user to use `picante::match.phylo.comm` before `evoregions`. This makes sure that the function will not delete anything, and the output could be easaly merged with the initial data.
- The output was dramatically changed:
1) the PCPS results was organized in a single list, with i) PCPS vectors, ii) proportinal explanation of the vectors, iii) the threshold value to used to select the number of PCPS axis in the cluster step.
2) I changed the output of the `Cluster_Evoregions` list to return only the vector with the groups. I think the other results are not necessarry.
3) I removed the `Matrix_P` output. I think this is not a important result, since it is only used to calculate PCPS vectors.
4) also removed the cumulative explanation of the axis used in the cluster step. This could be get by the output in the current PCPS list.
Also, I have some sugestions to be implemented:\
\* The argument `max.n.clust.method` should be removed. It only provides one option, and do not need an argument. In addition, I think that this functionality shouldn't be within the `evoregions` function. It should be provided as sepated function to find the maximun number of cluster. In the `evoregions` function, we can set the `max.n.clust` with a default number (i think 10 or 15 is ok) and explain what functions could be used to define this number.
## `afilliation.evoreg`
Not working well.
The function calculates the affiliation without error (using evoregion class) but the order of the sites in the output differs from the input. As this function is intented to be used to map the zones of transition, this mismatch in the output generates a map without recognizable pattern.
Then, I think this function need to be reviewed e re-written.
some issues in this function:
- [x] line 21: this object `phylo_regionalization` is not in the argument list;
- [x] line 40 (and 34) - the distance matrix is calculated from all PCPS axis. I think it should be only the same as used in the regionalization. Maybe the PCPS output in the `evoregion` function should return only the axis used in `adegenet::find.cluster`.
- [x] argument `method` have not being used with `phylregion` class. - this argument was removed
some suggestion:
I think the `evo.classification` could be transformed into two new arguments. `phylo.comp`, `regions`. The first a matrix to be computed the distance among sites, the second the regions provided by the phylogenetic classification.
I allows to remove the necessity of predict the behaviour of each class (`phyloregion` or `evoregion`)
- [x] I followed your suggestion and changed the arguments as explained above
## `tipranges_to_BioGeoBEARS`
Function included in the package to save a phyllip file as required by BioGeoBEARS
# Issues - May 15 2022
- [x] Function `tipranges_to_BioGeoBEARS` ain't working
- [x] I haven't found the result of DEC model in biogeobears
# Issues - May 17 2022
- [x] Evoregions output in number and all other in Letter (something related with phyllip file)
- [x] Change the output of get.node.range_BioGeoBEARS to keep only internal nodes
# Issues - May 18 2022
- [x] Error in diversification based jetz metric
# Issues - May 19th 2022
- [ ] Find a better way to represent the percentage of contribution of dispersal events in a map
- [ ] Describe dispersal_from function
- [x] Error in db-PD and PE
- [x] Fixing minor issue with Db-metrics function - different number of nodes in reconstruction object and node names object
# Issues - May 24th 2022 [AVR]
- [x] remove 'DivB_metrics.R'
- [x] change 'Herodotools/inst/extdata/resDEC_akodon.rds' to an '.RData' file. Or
```
Add dependency on R >= 3.5.0 because serialized objects in
serialize/load version 3 cannot be read in older versions of R.
File(s) containing such objects:
'Herodotools/inst/extdata/resDEC_akodon.rds'
```
- [ ] from which package does the function `.node.desc` belong to? [line 82 of 'function_model_based_diversificationJetz.R']. it must be included in Imports/Suggests of the DESCRIPTION file or be refered as `pkg::.node.desc`
- [x] keep coherent pattern for function names. I suggest use always "_" instead of ".". For example, `find_max_nclust()` instead of `find.max.nclust()`
- [x] ggplot2, sf and rcartocolor were removed from @import in the`plot_ada()`. They are suggested packages in DECRIPTION file.
- [x] function `GridFilter()` is based on `rgeos` [Please note that rgeos will be retired by the end of 2023, plan transition to sf functions using GEOS at your earliest convenience]. I suggest to remove the function if it has no clear utility. If the function will kept in the package run the following code in the console:
```
use_this::use_package("sp", "suggest")
use_this::use_package("rgeos", "suggest")
use_this::use_package("terra", "suggest")
```
In addition, put the following code in line 17 of the 'function_gridfilter.R' file:
```
pkg_req <- c("rgeos", "sp", "raster", "terra")
for(pkg in pkg_req) {
if (!requireNamespace(pkg, quietly = TRUE)) {
stop(
paste0("Package '", pkg, "' must be installed to use this function."),
call. = FALSE
)
}
}
```
- [x] add documentation for argument `age.no.ancestor` in 'function_age_arrival.R'.
- [x] `max.n.clust.method` argument was removed from `evoregions()`. The behavior of `max.n.clust = NULL` argument was maintained.
# Open issues May 25
- [ ] from which package does the function `.node.desc` belong to? [line 82 of 'function_model_based_diversificationJetz.R']. it must be included in Imports/Suggests of the DESCRIPTION file or be refered as `pkg::.node.desc` - I have no idea where this function comes from
- [X] Find a better way to represent the percentage of contribution of dispersal events in a map
- [X] Describe dispersal_from function
# Open issues May 26
- [x] build a toy example -> I used the same toy example that I made for the Tyrannidae paper
- [x] fix website (working just locally but not on the server) -> Ive fixed it by changing the folder used to build the site
- [x] add examples to the functions -> working in progress
# open issues may 27
- [ ] when possible, add the tests made with the toy_example to the testthat.R file.
- [ ] suggestion: change the vignette to article. create an article with `use_article()` and copy/paste the vignette to there. When the package is built, the article is not biult, but the vignette is.
# open issues June 17
- [ ] remove unused files in the inst/extdata directory