Skip to content

Commit 95fcebf

Browse files
committed
adding badges
1 parent 90dfc92 commit 95fcebf

12 files changed

+44
-31
lines changed

R/aphylo_mcmc.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ APHYLO_DEFAULT_MCMC_CONTROL <- list(
5555
#' set.seed(1231)
5656
#'
5757
#' ans_mcmc <- aphylo_mcmc(
58-
#' dat ~ mu_d + psi + eta + Pi,
58+
#' atree ~ mu_d + psi + eta + Pi,
5959
#' control = list(nsteps = 2e5, burnin=1000, thin=200)
6060
#' )
6161
#' }

R/prediction_score.R

+9-8
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ prediction_score.default <- function(
9090
W <- W[ids, ids, drop=FALSE]
9191

9292
# obs <- rowSums(x - expected)
93-
obs <- NULL
94-
for (p in 1:ncol(x))
95-
obs <- cbind(obs, ifelse(expected == 1, 1 - x, x))
96-
obs <- sum(obs)
93+
# obs <- NULL
94+
# for (p in 1:ncol(x))
95+
# obs <- cbind(obs, ifelse(expected == 1, 1 - x, x))
96+
obs <- sum(abs(x - expected))
97+
# obs <- sum(obs)
9798
# obs <- t(obs) %*% W %*% obs
9899

99100
# Best case
@@ -228,14 +229,14 @@ prediction_score.aphylo_estimates <- function(
228229
n <- length(ids)
229230
if (is.null(alpha0) && loo) {
230231

231-
alpha0 <- max(sum(expected[ids,] == 0) - 1, 0)
232-
alpha0 <- alpha0/(n - 1)
232+
alpha0 <- max(sum(expected[ids,] == 0) - ncol(expected), 0)
233+
alpha0 <- alpha0/((nrow(expected[ids,]) - 1) * ncol(expected))
233234

234235
}
235236
if (is.null(alpha1) && loo) {
236237

237-
alpha1 <- max(sum(expected[ids,]) - 1, 0)
238-
alpha1 <- alpha1/(n - 1)
238+
alpha1 <- max(sum(expected[ids,]) - ncol(expected), 0)
239+
alpha1 <- alpha1/((nrow(expected[ids,]) - 1) * ncol(expected))
239240

240241
}
241242

README.Rmd

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ output:
55
html_preview: false
66
---
77

8-
[![](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
8+
<!--[![](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)-->
9+
910
[![R CI](https://github.com/USCbiostats/aphylo/actions/workflows/ci.yml/badge.svg)](https://github.com/USCbiostats/aphylo/actions/workflows/ci.yml)
1011
[![Build status](https://ci.appveyor.com/api/projects/status/1xpgpv10yifojyab?svg=true)](https://ci.appveyor.com/project/gvegayon/phylogenetic)
1112
[![Coverage Status](https://codecov.io/gh/USCbiostats/aphylo/branch/master/graph/badge.svg)](https://codecov.io/gh/USCbiostats/aphylo) [![Integrative Methods of Analysis for Genetic Epidemiology](https://raw.githubusercontent.com/USCbiostats/badges/master/tommy-image-badge.svg)](https://image.usc.edu)
13+
[![CRAN status](https://www.r-pkg.org/badges/version/aphylo)](https://CRAN.R-project.org/package=aphylo)
14+
[![status](https://tinyverse.netlify.com/badge/fmcmc)](https://CRAN.R-project.org/package=fmcmc)
15+
[![CRAN downloads](http://cranlogs.r-pkg.org/badges/grand-total/aphylo)](https://cran.r-project.org/package=aphylo)
1216

1317
# aphylo: Statistical Inference of Annotated Phylogenetic Trees <img src="man/figures/logo.svg" align="right" width="180px"/>
1418

README.md

+26-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
[![](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
2+
<!--[![](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)-->
3+
34
[![R
45
CI](https://github.com/USCbiostats/aphylo/actions/workflows/ci.yml/badge.svg)](https://github.com/USCbiostats/aphylo/actions/workflows/ci.yml)
56
[![Build
@@ -8,6 +9,11 @@ status](https://ci.appveyor.com/api/projects/status/1xpgpv10yifojyab?svg=true)](
89
Status](https://codecov.io/gh/USCbiostats/aphylo/branch/master/graph/badge.svg)](https://codecov.io/gh/USCbiostats/aphylo)
910
[![Integrative Methods of Analysis for Genetic
1011
Epidemiology](https://raw.githubusercontent.com/USCbiostats/badges/master/tommy-image-badge.svg)](https://image.usc.edu)
12+
[![CRAN
13+
status](https://www.r-pkg.org/badges/version/aphylo)](https://CRAN.R-project.org/package=aphylo)
14+
[![status](https://tinyverse.netlify.com/badge/fmcmc)](https://CRAN.R-project.org/package=fmcmc)
15+
[![CRAN
16+
downloads](http://cranlogs.r-pkg.org/badges/grand-total/aphylo)](https://cran.r-project.org/package=aphylo)
1117

1218
# aphylo: Statistical Inference of Annotated Phylogenetic Trees <img src="man/figures/logo.svg" align="right" width="180px"/>
1319

@@ -35,24 +41,26 @@ Southern California.
3541
citation(package="aphylo")
3642
```
3743

44+
```
3845
39-
To cite aphylo in publications use the following paper:
46+
To cite aphylo in publications use the following paper:
4047
41-
Vega Yon GG, Thomas DC, Morrison J, Mi H, Thomas PD, et al. (2021)
42-
Bayesian parameter estimation for automatic annotation of gene
43-
functions using observational data and phylogenetic trees. PLOS
44-
Computational Biology 17(2): e1007948.
45-
https://doi.org/10.1371/journal.pcbi.1007948
48+
Vega Yon GG, Thomas DC, Morrison J, Mi H, Thomas PD, et al. (2021)
49+
Bayesian parameter estimation for automatic annotation of gene
50+
functions using observational data and phylogenetic trees. PLOS
51+
Computational Biology 17(2): e1007948.
52+
https://doi.org/10.1371/journal.pcbi.1007948
4653
47-
And the actual R package:
54+
And the actual R package:
4855
49-
Vega Yon G (2022). _Statistical Inference of Annotated Phylogenetic
50-
Trees_. R package version 0.2-1, <URL:
51-
https://github.com/USCBiostats/aphylo>.
56+
Vega Yon G (2022). _Statistical Inference of Annotated Phylogenetic
57+
Trees_. R package version 0.2-1, <URL:
58+
https://github.com/USCBiostats/aphylo>.
5259
53-
To see these entries in BibTeX format, use 'print(<citation>,
54-
bibtex=TRUE)', 'toBibtex(.)', or set
55-
'options(citation.bibtex.max=999)'.
60+
To see these entries in BibTeX format, use 'print(<citation>,
61+
bibtex=TRUE)', 'toBibtex(.)', or set
62+
'options(citation.bibtex.max=999)'.
63+
```
5664

5765
## Install
5866

@@ -320,10 +328,10 @@ pred
320328
## Prediction score (H0: Observed = Random)
321329
##
322330
## N obs. : 99
323-
## alpha(0, 1) : 0.24, 0.73
324-
## Observed : 0.71
325-
## Random : 0.61
326-
## P(<t) : 0.1539
331+
##
332+
## Observed : 0.71 ***
333+
## Random : NA
334+
## P(<t) : 0.0000
327335
## --------------------------------------------------------------------------------
328336
## Values scaled to range between 0 and 1, 1 being best.
329337
##
-132 Bytes
Loading
-561 Bytes
Loading

README_files/figure-gfm/MCMC-1.png

-109 Bytes
Loading

README_files/figure-gfm/MCMC-2.png

-150 Bytes
Loading

README_files/figure-gfm/MLE-1.png

36 Bytes
Loading

README_files/figure-gfm/Predict-1.png

311 Bytes
Loading

man/aphylo_cv.Rd

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

man/aphylo_mcmc.Rd

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

0 commit comments

Comments
 (0)