Skip to content

Commit 487d3a2

Browse files
authored
Merge pull request #20 from microbiome/fix
Update iSEEtree compat requirements
2 parents e3934a5 + 439be2e commit 487d3a2

File tree

7 files changed

+76
-28
lines changed

7 files changed

+76
-28
lines changed

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: miaDash
2-
Version: 0.99.9
2+
Version: 0.99.11
33
Authors@R:
44
c(person(given = "Giulio", family = "Benedetti", role = c("aut", "cre"),
55
email = "[email protected]",
@@ -27,7 +27,7 @@ Imports:
2727
ape,
2828
biomformat,
2929
htmltools,
30-
iSEEtree,
30+
iSEEtree (>= 1.1.4),
3131
mia,
3232
rintrojs,
3333
scater,
@@ -42,6 +42,7 @@ Imports:
4242
Suggests:
4343
BiocStyle,
4444
knitr,
45+
philr,
4546
remotes,
4647
rmarkdown,
4748
testthat (>= 3.0.0)

R/constants.R

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
#' Constants
22
#'
3-
#' Constant values used throughout miaDash panels and extensions.
3+
#' Constant values used throughout the miaDash app.
44
#'
55
#' @section Panel layout:
66
#' \describe{
77
#' \item{\code{.miaDashDefaultPanels}}{List of panel names in the default layout of miaDash.}
88
#' \item{\code{.miaDashOtherPanels}}{List of panel names not in the default layout of miaDash.}
9+
#' \item{\code{.transformMethods}}{List of transformations applicable to assays.}
10+
#' \item{\code{.alphaMetrics}}{List of alpha diversity metrics.}
11+
#' \item{\code{.betaMetrics}}{List of beta diversity metrics.}
12+
#' \item{\code{.betaMethods}}{List of beta diversity methods.}
913
#' }
1014
#'
1115
#' @author Giulio Benedetti
1216
#'
1317
#' @keywords internal
1418
#' @name constants
15-
#' @aliases .miaDashDefaultPanels
16-
#' .miaDashOtherPanels
19+
#' @aliases .miaDashDefaultPanels .miaDashOtherPanels .transformMethods
20+
#' .alphaMetrics .betaMetrics .betaMethods
1721
NULL
1822

1923
#' @rdname constants
@@ -24,4 +28,26 @@ NULL
2428
#' @rdname constants
2529
.miaDashOtherPanels <- c("PrevalencePlot", "RDAPlot", "ScreePlot",
2630
"LoadingPlot", "ColumnTreePlot", "RowGraphPlot", "ColumnGraphPlot",
27-
"RowDataPlot", "ColumnDataPlot")
31+
"RowDataPlot", "ColumnDataPlot")
32+
33+
#' @rdname constants
34+
.transformMethods <- c("alr", "chi.square", "clr", "css", "frequency",
35+
"hellinger", "log", "log10", "log2", "max", "normalize", "pa",# "philr",
36+
"range", "rank", "rclr", "relabundance", "rrank", "standardize", "total")
37+
38+
#' @rdname constants
39+
.alphaMetrics <- c("coverage_diversity", "fisher_diversity", "faith_diversity",
40+
"gini_simpson_diversity", "inverse_simpson_diversity",
41+
"log_modulo_skewness_diversity", "shannon_diversity", "absolute_dominance",
42+
"dbp_dominance", "core_abundance_dominance", "gini_dominance",
43+
"dmn_dominance", "relative_dominance", "simpson_lambda_dominance",
44+
"camargo_evenness", "pielou_evenness", "simpson_evenness", "evar_evenness",
45+
"bulla_evenness", "ace_richness", "chao1_richness", "hill_richness",
46+
"observed_richness")
47+
48+
#' @rdname constants
49+
.betaMetrics <- c("euclidean", "bray", "jaccard", "unifrac")
50+
51+
#' @rdname constants
52+
.betaMethods <- c("MDS", "NMDS", "PCA", "RDA")
53+
#"TSNE", "UMAP")

R/landing_page.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@
141141
label = "Assay:", choices = NULL),
142142

143143
selectInput(inputId = "trans.method",
144-
label = "Method:", choices = c("relabundance",
145-
"clr", "standardize")),
144+
label = "Method:", choices = .transformMethods),
146145

147146
checkboxInput(inputId = "pseudocount",
148147
label = "Pseudocount"),
@@ -168,20 +167,21 @@
168167

169168
selectInput(inputId = "alpha.index",
170169
label = "Metric:", multiple = TRUE,
171-
choices = c("coverage", "shannon", "faith"))),
170+
choices = .alphaMetrics)),
172171

173172
tabPanel(title = "Beta", value = "beta",
174173

175-
radioButtons(inputId = "bmethod", label = "Method:",
176-
choices = c("MDS", "NMDS", "PCA", "RDA"),
174+
radioButtons(inputId = "bmethod",
175+
label = "Method:", choices = .betaMethods,
177176
inline = TRUE),
178177

179178
conditionalPanel(
180-
condition = "input.bmethod != 'PCA'",
179+
condition = paste("input.bmethod == 'MDS' || ",
180+
"input.bmethod == 'NMDS' || ",
181+
"input.bmethod == 'RDA'"),
181182

182183
selectInput(inputId = "beta.index",
183-
label = "Metric:", choices = c("euclidean",
184-
"bray", "jaccard", "unifrac"))),
184+
label = "Metric:", choices = .betaMetrics)),
185185

186186
conditionalPanel(
187187
condition = "input.bmethod == 'RDA'",

R/miaDash.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ miaDash <- function() {
3434
paste0("Microbiome Analysis Dashboard - v", packageVersion("miaDash")),
3535
tags$img(src = "assets/mia_logo.png", height = "40px", style = "margin-left: 10px"),
3636
style = "cursor: pointer; font-weight: 500",
37-
onclick = "window.location='https://miadash-microbiome.2.rahtiapp.fi/'")
38-
37+
onclick = "window.location='https://miadash-microbiome.2.rahtiapp.fi/'")
3938
)
4039
}
4140

R/observers.R

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,6 @@
152152
})
153153

154154
} else if( input$manipulate == "transform" ){
155-
156-
if( input$trans.method == "clr" && !input$pseudocount &&
157-
any(assay(rObjects$tse, input$assay.type) <= 0)){
158-
159-
.print_message(
160-
"'clr' cannot be used with non-positive data:",
161-
"please turn on pseudocount."
162-
)
163-
164-
return()
165-
}
166155

167156
isolate({
168157
req(input$assay.type)
@@ -177,6 +166,11 @@
177166
method = input$trans.method, assay.type = input$assay.type,
178167
MARGIN = input$margin, pseudocount = input$pseudocount)
179168

169+
#if( input$trans.method == "philr" ){
170+
# fun_args <- c(fun_args, tree = list(rowTree(rObjects$tse)),
171+
# node.labels = rowTree(tse)$node.label)
172+
#}
173+
180174
rObjects$tse <- .update_tse(
181175
rObjects$tse, transformAssay, fun_args
182176
)

man/constants.Rd

Lines changed: 25 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkgdown/_pkgdown.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
destination: docs
22
reference:
33
- title: App
4+
- subtitle: Main
45
- contents:
56
- miaDash
7+
- subtitle: Other
8+
- contents:
9+
- utils
610
- constants

0 commit comments

Comments
 (0)