Skip to content

Commit

Permalink
Merge pull request #78 from vallenderlab/quick-fix
Browse files Browse the repository at this point in the history
Quick fixes and update to 0.4.1
  • Loading branch information
grabear authored Feb 14, 2019
2 parents 9dca8bf + eb2c0b0 commit 095a03c
Show file tree
Hide file tree
Showing 100 changed files with 120 additions and 93 deletions.
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: MicrobiomeR
Title: Analyze Microbiome Data
Version: 0.4.0
Version: 0.4.1
Authors@R: c(
person("Robert", "Gilmore", email = "rgilmore@umc.edu", role = "cre"),
person("Shaurita", "Hutchins", email = "shutchins2@umc.edu", role = "aut"))
Expand All @@ -15,7 +15,8 @@ Remotes:
github::ropensci/taxa,
github::grunwaldlab/metacoder,
github::joey711/phyloseq,
github::microbiome/microbiome
github::microbiome/microbiome,
github::jonclayden/shades
Imports:
ape,
DT,
Expand Down Expand Up @@ -50,7 +51,8 @@ Imports:
scales,
vegan,
leaflet,
htmlwidgets
htmlwidgets,
shades
Suggests:
knitr,
testthat,
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export(is_raw_format)
export(metacoder_comp_func_1)
export(order_metacoder_data)
export(ordination_plot)
export(ordination_plots)
export(otu_id_filter)
export(otu_prevalence_filter)
export(otu_proportion_filter)
Expand Down Expand Up @@ -155,6 +156,8 @@ importFrom(rlang,enquos)
importFrom(rlang,eval_tidy)
importFrom(rlang,is_quosure)
importFrom(scico,scico)
importFrom(shades,saturation)
importFrom(shades,scalefac)
importFrom(stats,median)
importFrom(stats,na.omit)
importFrom(stats,sd)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# MicrobiomeR 0.4.1

* Fixed wilcoxon pvalue in analysis vignette.
* Updated default color palette for stacked_barplot function.

# MicrobiomeR 0.4.0

## Renamed functions
Expand Down
11 changes: 9 additions & 2 deletions R/barplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ convert_proportions <- function(melted_df, tax_level) {
#' @importFrom ggplot2 ggplot aes annotate geom_bar ylab element_blank element_rect xlab annotate
#' @importFrom magrittr %>%
#' @importFrom dplyr mutate
#' @importFrom shades scalefac saturation
#' @import scales
#' @import vegan
#'
Expand All @@ -81,9 +82,15 @@ stacked_barplot <- function(obj, tax_level = "Phylum", fill = "Phylum", xlabel =
p <- p + ggplot2::geom_bar(stat = "identity", position = "stack")

# Add a palette if default not given.
# Dynamically change palette colors based on number of taxa being input.
if (is.null(palette_values)) {
# Dynamically change palette colors based on number of taxa being input.
palette_values <- get_color_palette(pal_func = scico_palette(), color_no = length(unique(mdf[[fill]])), display = FALSE)
pal_func <- combination_palette(
magma = list(palette = viridis::magma, args = list(n=500), range=450:500, rev=TRUE),
inferno = list(palette = viridis::inferno, args = list(n=500), range=100:400, rev=TRUE),
cividis = list(palette = viridis::cividis, args = list(n=500), range=100:200, rev=TRUE),
viridis = list(palette = viridis::viridis, args = list(n=500), range=100:480))
palette_values <- shades::saturation(get_color_palette(pal_func = pal_func, color_no = length(unique(mdf[[fill]])), display = FALSE),
shades::scalefac(.6))
}

# Create the theme
Expand Down
1 change: 1 addition & 0 deletions R/ordination.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ ordination_plot <- function(obj, method = "PCoA", distance = "wunifrac", color =
#' @return Returns a melted dataframe.
#' @family Visualizations
#' @rdname ordination_plot
#' @export
ordination_plots <- function(obj, methods = c("PCoA", "NMDS"), distances = c("wunifrac", "unifrac", "bray"),
color = "TreatmentGroup", select_otu_table = "otu_proportions") {
if (is.null(methods)) {
Expand Down
2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ISSUE_TEMPLATE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/PULL_REQUEST_TEMPLATE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/about.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/articles/analysis.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/articles/analysis_files/figure-html/unnamed-chunk-10-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/analysis_files/figure-html/unnamed-chunk-11-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/analysis_files/figure-html/unnamed-chunk-12-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/analysis_files/figure-html/unnamed-chunk-13-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/analysis_files/figure-html/unnamed-chunk-13-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/analysis_files/figure-html/unnamed-chunk-13-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/analysis_files/figure-html/unnamed-chunk-13-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/articles/color-palettes.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/articles/data-wrangling.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/filtering.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/introduction.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/MicrobiomeR.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/MicrobiomeR_Formats.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/MicrobiomeR_Workflow.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/agglomerate_metacoder.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/alpha_diversity_measures.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/alpha_diversity_plot.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/as_MicrobiomeR_format.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/as_analyzed_format.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/as_basic_format.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/as_custom_format.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/as_phyloseq_format.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 095a03c

Please sign in to comment.