Skip to content

Commit 90dfc92

Browse files
committed
Incorporated CRAN comments, resubmitted
1 parent 32057c4 commit 90dfc92

18 files changed

+121
-11
lines changed

DESCRIPTION

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
Package: aphylo
22
Title: Statistical Inference and Prediction of Annotations in Phylogenetic Trees
3-
Authors@R: person("George", "Vega Yon", role=c("aut","cre"),
4-
email="g.vegayon@gmail.com", comment = c(ORCID = "0000-0002-3171-0844"))
3+
Authors@R: c(person("George", "Vega Yon", role=c("aut","cre"),
4+
email="g.vegayon@gmail.com", comment = c(ORCID = "0000-0002-3171-0844")),
5+
person("National
6+
Cancer Institute (NCI)", role = "fnd", comment = "Grant Number
7+
5P01CA196569-02"),
8+
person("USC Biostatistics", role = "cph")
9+
)
510
Version: 0.2-1
611
Date: 2022-01-14
712
Description: Implements a parsimonious evolutionary model to analyze and
813
predict gene-functional annotations in phylogenetic trees as described in Vega
914
Yon et al. (2021) <doi:10.1371/journal.pcbi.1007948>. With a focus on
10-
computational efficiency, aphylo makes it possible to estimate pooled
15+
computational efficiency, 'aphylo' makes it possible to estimate pooled
1116
phylogenetic models, including thousands (hundreds) of annotations (trees) in
1217
the same run. The package also provides the tools for visualization of
1318
annotated phylogenies, calculation of posterior probabilities (prediction,)
1419
and goodness-of-fit assessment featured in Vega Yon et al. (2021).
15-
Depends: R (>= 3.1.1), ape (>= 5.0)
20+
Depends: R (>= 3.5.0), ape (>= 5.0)
1621
LazyData: true
1722
Imports: Rcpp (>= 0.12.1), Matrix, methods, coda, fmcmc,
1823
utils, MASS, xml2

LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
YEAR: 2017
2-
COPYRIGHT HOLDER: USC Biostats
1+
YEAR: 2022
2+
COPYRIGHT HOLDER: USC Biostatistics

R/accuracy_sifter.R

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@
2323
#' excluded from the analysis.
2424
#'
2525
#' When `highlight = ""`, no highlight is done.
26+
#' @returns
27+
#' A data frame with `Ntip()` rows and four variables. The variables are:
28+
#' - Gene: Label of the gene
29+
#' - Predicted: The assigned gene function.
30+
#' - Observed: The true set of gene functions.
31+
#' - Accuracy: The measurement of accuracy according to Engelhardt et al. (2011).
2632
#'
2733
#' @examples
2834
#' set.seed(81231)
29-
#' atree <- raphylo(100, psi = c(0,0), P = 3)
35+
#' atree <- raphylo(50, psi = c(0,0), P = 3)
3036
#' ans <- aphylo_mcmc(atree ~ mu_d + mu_s + Pi)
3137
#'
3238
#' accuracy_sifter(ans)

R/aphylo_mcmc.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ APHYLO_DEFAULT_MCMC_CONTROL <- list(
3737
#' @examples
3838
#' # Using the MCMC ------------------------------------------------------------
3939
#'
40-
#' \dontrun{
40+
#' \donttest{
4141
#'
4242
#' set.seed(1233)
4343
#' # Simulating a tree

R/cv.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#' @export
2121
#' @examples
2222
#' # It takes about two minutes to run this example
23-
#' \dontrun{
23+
#' \donttest{
2424
#'
2525
#' set.seed(123)
2626
#' atrees <- rmultiAphylo(10, 10, P = 1)

R/indexing.R

+9
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,21 @@
88
#' the [aphylo] object. Whenever `i` is specified, then aphylo returns the corresponding
99
#' annotations.
1010
#' @name aphylo-index
11+
#' @returns
12+
#' - When indexing with `i`: A data frame with the annotations of the
13+
#' selected genes.
14+
#' - When only indexing with `j` (`drop = FALSE`): An `aphylo` object with the selected sets of
15+
#' annotations.
16+
#' - When only indexing with `j` (`drop = TRUE`): A data.frame with the selected
17+
#' annotations.
18+
#' - When indexing on both `i` and `j`: A data.frame with the selected genes and annotations.
1119
#' @examples
1220
#' set.seed(12312)
1321
#' atree <- raphylo(50, P = 4)
1422
#' atree[1:10,]
1523
#' atree[,2:3]
1624
#' atree[, 2:3, drop = TRUE]
25+
#' atree[1:10, 2:3]
1726
#'
1827
#'
1928
NULL

R/multiaphylo.R

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#' @param ... One or several object of class `aphylo` or `multiAPhylo`. Ignored
66
#' in the case of `print.multiAphylo`.
77
#' @name multiAphylo
8+
#' @returns
9+
#' A list of class `multiAphylo`. Each element corresponds to a single `aphylo`
10+
#' object.
811
#' @examples
912
#' data(fakeexperiment)
1013
#' data(faketree)

R/plot_logLik.R

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#' @param x An object of class [aphylo()]
33
#' @inheritParams plot_multivariate
44
#' @param ... Aditional parameters to be passed to `plotfun`.
5+
#' @returns
6+
#' NULL (invisible). Generates a plot of the loglikelihood of the model.
57
#' @examples
68
#' # Loading data
79
#' data(fakeexperiment)
@@ -192,6 +194,10 @@ plot_logLik.aphylo_estimates <- function(x, sets,...) {
192194
#' generate all possible combinations as `combn(names(params), 2)`.
193195
#' @param mfrow Passed to [graphics::par].
194196
#' @export
197+
#' @returns
198+
#' A list of length `length(sets)`, each with the following:
199+
#' - x,y,z vectors of coordinates.
200+
#' - xlab,ylab vectors with the corresponding labels.
195201
#'
196202
#' @examples
197203
#' # Example: A model with less parameters

R/prediction_score.R

+19-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,23 @@
88
#' @export
99
#' @details In the case of `prediction_score`, `...` are passed to
1010
#' `predict.aphylo_estimates`.
11-
#'
11+
#' @returns
12+
#' A list of class `aphylo_prediction_score`:
13+
#' - obs : Observed 1 - MAE.
14+
#' - obs_raw : Unnormalized (raw) scores.
15+
#' - random_raw: Unnormalized (raw) scores.
16+
#' - worse_raw : Unnormalized (raw) scores.
17+
#' - pval : Computed p-value.
18+
#' - worse : Reference of worse case.
19+
#' - predicted : Numeric matrix with observed predictions.
20+
#' - expected : Integer matrix with expected annotations.
21+
#' - random : Random score (null).
22+
#' - alpha0 : The passed alpha parameters.
23+
#' - alpha1 : The passed alpha parameters.
24+
#' - auc : An object of class `aphylo_auc`.
25+
#' - obs.ids : Indices of the ids.
26+
#' - leaf.ids : IDs of the leafs (if present).
27+
#' - tree : Of class `phylo`.
1228
#' @examples
1329
#' # Example with prediction_score ---------------------------------------------
1430
#' set.seed(11552)
@@ -350,6 +366,8 @@ blue <- function(x) {
350366
#'
351367
#' If `include.labels = NULL` and `ncol(x$expected) > 40`,
352368
#' then `include.labels=FALSE` by default.
369+
#' @returns
370+
#' NULL (invisible) Generates a plot of the predictions.
353371
#' @aliases plot-prediction
354372
#' @examples
355373
#' set.seed(8783)

R/read_sifter.R

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ read_pli <- function(fn, dropNAs = TRUE) {
7979
#' @param family_id Character scalar. Name of the family
8080
#' @param file Character scalar passed to [cat].
8181
#' @export
82+
#' @returns
83+
#' A string with the XML file.
8284
#' @examples
8385
#' set.seed(882)
8486
#' atree <- raphylo(5)

man/accuracy_sifter.Rd

+10-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/aphylo-index.Rd

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/multiAphylo.Rd

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot.aphylo_prediction_score.Rd

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_logLik.Rd

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_multivariate.Rd

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/prediction_score.Rd

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/write_pli.Rd

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)