Skip to content

Commit

Permalink
deal with some CRAN notes and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adw96 committed Aug 6, 2018
1 parent dcf6099 commit fb8d4b4
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 37 deletions.
7 changes: 4 additions & 3 deletions R/plot_alpha_estimates.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,18 @@ plot.alpha_estimates <- function(x, physeq = NULL, measure = NULL, color = NULL,
df$sample_names <- rownames(df)
}

aes_map <- ggplot2::aes_string(colour = color, shape = shape)
aes_map <- ggplot2::aes_string(color = "color", shape = "shape")
my_gg <- ggplot2::ggplot(df, aes_map) +
ggplot2::geom_point(ggplot2::aes(x = sample_names, y = estimate)) +
ggplot2::geom_point(ggplot2::aes_string(x = "sample_names", y = "estimate")) +
ggplot2::ylab(paste(yname1, "estimate of", yname2)) +
ggplot2::xlab("") +
ggplot2::labs(title = title) +
ggplot2::theme_bw() +
ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 45, hjust = 1))

if (!(all(is.na(df$lower)) || all(is.na(df$upper)))) {
my_gg <- my_gg + ggplot2::geom_segment(ggplot2::aes(x = sample_names, xend = sample_names, y = lower, yend = upper))
my_gg <- my_gg +
ggplot2::geom_segment(ggplot2::aes_string(x = "sample_names", xend = "sample_names", y = "lower", yend = "upper"))
}

if (!trim_plot) {
Expand Down
2 changes: 1 addition & 1 deletion R/shannon_good_turing.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ good_turing <- function(input_data) {
} else {
return(input_data %>%
otu_table %>%
apply(1, function(x) good_turin(make_frequency_count_table(x))) %>%
apply(1, function(x) good_turing(make_frequency_count_table(x))) %>%
alpha_estimates)
}
}
Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ knitr::opts_chunk$set(


`breakaway` is the premier package for statistical analysis of microbial diversity. `breakaway` implements the latest and greatest estimates of richness, as well as the most commonly used estimates.
Understanding the drivers of microbial diversity is an important frontier of microbial ecology, and investigating the diversity of samples from microbial ecosystems is a common step in any microbiome analysis.
Understanding the drivers of microbial diversity is an important frontier of microbial ecology, and investigating the diversity of samples from microbial ecosystems is a common step in any microbiome analysis.

[`DivNet`](https://github.com/adw96/DivNet) is a new package by the same authors for estimating Shannon diversity, and other diversity indices. `breakaway` focuses on richness while `DivNet` focuses on Shannon, Simpson, and other alpha diversities as well as some beta diversity indices. Check it out!

Expand Down Expand Up @@ -53,7 +53,7 @@ devtools::install_github("adw96/breakaway")

### CRAN

For now, `breakaway` is no longer being updated on CRAN. You can access v3.0 on CRAN [here](https://cran.r-project.org/web/packages/breakaway/index.html) or with
For now, `breakaway` is no longer being updated on CRAN. You can access v3.0 on CRAN [here](https://CRAN.R-project.org/package=breakaway) or with
```R
install.packages("breakaway")
```
Expand All @@ -73,4 +73,4 @@ Authors: [Amy Willis](http://faculty.washington.edu/adwillis/), [Bryan Martin](h
- ~~automated estimator selection based on data structure~~
- ~~new format for modelling functions~~

Do you have a request for us? Let us know! We want folks to use `breakaway` and are committed to making it as easy to use as possible.
Do you have a request for us? Let us know! We want folks to use `breakaway` and are committed to making it as easy to use as possible.
89 changes: 59 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,49 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->
breakaway <img src="docs/breakaway-logo.png" align="right" width="165px"/>
==========================================================================

[![Travis-CI Build Status](https://travis-ci.org/adw96/breakaway.svg?branch=master)](https://travis-ci.org/adw96/breakaway) [![Coverage status](https://codecov.io/gh/adw96/breakaway/branch/master/graph/badge.svg)](https://codecov.io/github/adw96/breakaway?branch=master) [![CRAN version](http://www.r-pkg.org/badges/version/breakaway)](https://cran.r-project.org/package=breakaway)

`breakaway` is the premier package for statistical analysis of microbial diversity. `breakaway` implements the latest and greatest estimates of richness, as well as the most commonly used estimates. Understanding the drivers of microbial diversity is an important frontier of microbial ecology, and investigating the diversity of samples from microbial ecosystems is a common step in any microbiome analysis.

[`DivNet`](https://github.com/adw96/DivNet) is a new package by the same authors for estimating Shannon diversity, and other diversity indices. `breakaway` focuses on richness while `DivNet` focuses on Shannon, Simpson, and other alpha diversities as well as some beta diversity indices. Check it out!

`breakaway` has undergone substantial renovations to make it more modern, easy-to-use, and robust. If functionality that you previously enjoyed in `breakaway` no longer exists, please submit an [issue](https://github.com/adw96/breakaway/issues)!
# breakaway <img src="docs/breakaway-logo.png" align="right" width="165px"/>

[![Travis-CI Build
Status](https://travis-ci.org/adw96/breakaway.svg?branch=master)](https://travis-ci.org/adw96/breakaway)
[![Coverage
status](https://codecov.io/gh/adw96/breakaway/branch/master/graph/badge.svg)](https://codecov.io/github/adw96/breakaway?branch=master)
[![CRAN
version](http://www.r-pkg.org/badges/version/breakaway)](https://cran.r-project.org/package=breakaway)

`breakaway` is the premier package for statistical analysis of microbial
diversity. `breakaway` implements the latest and greatest estimates of
richness, as well as the most commonly used estimates. Understanding the
drivers of microbial diversity is an important frontier of microbial
ecology, and investigating the diversity of samples from microbial
ecosystems is a common step in any microbiome analysis.

[`DivNet`](https://github.com/adw96/DivNet) is a new package by the same
authors for estimating Shannon diversity, and other diversity indices.
`breakaway` focuses on richness while `DivNet` focuses on Shannon,
Simpson, and other alpha diversities as well as some beta diversity
indices. Check it out\!

`breakaway` has undergone substantial renovations to make it more
modern, easy-to-use, and robust. If functionality that you previously
enjoyed in `breakaway` no longer exists, please submit an
[issue](https://github.com/adw96/breakaway/issues)\!

### Citing breakaway

The `R` package `breakaway` implements a number of different richness estimates. Please cite the following if you use them:
The `R` package `breakaway` implements a number of different richness
estimates. Please cite the following if you use them:

- `breakaway()` and `kemp()`: Willis, A. & Bunge, J. (2015). Estimating diversity via frequency ratios. Biometrics.
- `betta()`: Willis, A., Bunge, J., & Whitman, T. (2017). Improved detection of changes in species richness in high diversity microbial communities. JRSS-C.
- `breakaway_nof1()`: Willis, A. (2016+). Species richness estimation with high diversity but spurious singletons. arXiv.
- `objective_bayes_*()`: Barger, K. & Bunge, J. (2010). Objective Bayesian estimation for the number of species. Bayesian Analysis.
- `breakaway()` and `kemp()`: Willis, A. & Bunge, J. (2015).
Estimating diversity via frequency ratios. Biometrics.
- `betta()`: Willis, A., Bunge, J., & Whitman, T. (2017). Improved
detection of changes in species richness in high diversity microbial
communities. JRSS-C.
- `breakaway_nof1()`: Willis, A. (2016+). Species richness estimation
with high diversity but spurious singletons. arXiv.
- `objective_bayes_*()`: Barger, K. & Bunge, J. (2010). Objective
Bayesian estimation for the number of species. Bayesian Analysis.

Installation
------------
## Installation

### Development version

Expand All @@ -32,31 +54,38 @@ install.packages("devtools")
devtools::install_github("adw96/breakaway")
```

`breakaway` is actively maintained and continually expanding and developing its scope! Is there a method you would like to have implemented in breakaway? Submit a pull request or contact the [maintainer](http://faculty.washington.edu/adwillis/)!
`breakaway` is actively maintained and continually expanding and
developing its scope\! Is there a method you would like to have
implemented in breakaway? Submit a pull request or contact the
[maintainer](http://faculty.washington.edu/adwillis/)\!

### CRAN

For now, `breakaway` is no longer being updated on CRAN. You can access v3.0 on CRAN [here](https://cran.r-project.org/web/packages/breakaway/index.html) or with
For now, `breakaway` is no longer being updated on CRAN. You can access
v3.0 on CRAN [here](https://CRAN.R-project.org/package=breakaway) or
with

``` r
install.packages("breakaway")
```

Humans
------
## Humans

Maintainer: [Amy Willis](http://faculty.washington.edu/adwillis/)

Authors: [Amy Willis](http://faculty.washington.edu/adwillis/), [Bryan Martin](https://bryandmartin.github.io/), [Kathryn Barger](http://hnrca.tufts.edu/kathryn-barger-ph-d/) and [John Bunge](https://stat.cornell.edu/people/faculty/john-bunge)
Authors: [Amy Willis](http://faculty.washington.edu/adwillis/), [Bryan
Martin](https://bryandmartin.github.io/), [Kathryn
Barger](http://hnrca.tufts.edu/kathryn-barger-ph-d/) and [John
Bunge](https://stat.cornell.edu/people/faculty/john-bunge)

Upcoming features
-----------------
## Upcoming features

- extended tutorials
- ~~phyloseq integration~~
- ~~better unit testing~~
- ~~better graphics~~
- ~~automated estimator selection based on data structure~~
- ~~new format for modelling functions~~
- extended tutorials
- ~~phyloseq integration~~
- ~~better unit testing~~
- ~~better graphics~~
- ~~automated estimator selection based on data structure~~
- ~~new format for modelling functions~~

Do you have a request for us? Let us know! We want folks to use `breakaway` and are committed to making it as easy to use as possible.
Do you have a request for us? Let us know\! We want folks to use
`breakaway` and are committed to making it as easy to use as possible.
Binary file removed breakaway-master.zip
Binary file not shown.

0 comments on commit fb8d4b4

Please sign in to comment.