Skip to content

Commit

Permalink
Merge branch 'devel' of https://github.com/microbiome/mia into import…
Browse files Browse the repository at this point in the history
…_functions
  • Loading branch information
thpral committed Apr 3, 2024
2 parents c025756 + 266637d commit fd44bd5
Show file tree
Hide file tree
Showing 20 changed files with 177 additions and 409 deletions.
286 changes: 0 additions & 286 deletions .github/workflows/check-bioc-devel.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: rworkflows
'on':
push:
branches:
- master
- main
- devel
- RELEASE_**
pull_request:
branches:
- master
- main
- devel
- RELEASE_**
jobs:
rworkflows:
permissions:
contents: write
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
container: ${{ matrix.config.cont }}
strategy:
fail-fast: ${{ false }}
matrix:
config:
- os: ubuntu-latest
bioc: devel
r: auto
cont: bioconductor/bioconductor_docker:devel
rspm: https://packagemanager.rstudio.com/cran/__linux__/latest/release
- os: macOS-latest
bioc: devel
r: auto
cont: ~
rspm: ~
- os: windows-latest
bioc: devel
r: auto
cont: ~
rspm: ~
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck: ${{ false }}
run_rcmdcheck: ${{ true }}
as_cran: ${{ true }}
run_vignettes: ${{ true }}
has_testthat: ${{ true }}
run_covr: ${{ true }}
run_pkgdown: ${{ true }}
has_runit: ${{ false }}
has_latex: ${{ false }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_docker: ${{ false }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
runner_os: ${{ runner.os }}
cache_version: cache-v1
enable_act: ${{ false }}
4 changes: 2 additions & 2 deletions R/estimateDivergence.R
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ setMethod("estimateDivergence", signature = c(x="SummarizedExperiment"),
if( "median" %in% reference || "mean" %in% reference ){
reference <- apply(mat, 1, reference)
} else if( !reference %in% colnames(mat) ) {
stop(paste("Reference", reference, "not recognized."))
stop("Reference ", reference, " not recognized.", call. = FALSE)
}
}

# Distance between all samples against one reference sample
# FIXME: could be be optimzed with sweep / parallelization
v <- seq_len(ncol(mat))
sapply(v, function (i) {FUN(rbind(mat[,i], reference), method=method, ...)})
vapply(v, function (i) {FUN(rbind(mat[,i], reference), method=method, ...)},FUN.VALUE = numeric(1))
}

2 changes: 1 addition & 1 deletion R/estimateDiversity.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
#' plotColData(tse, "Shannon")
#' # ... by sample type
#' plotColData(tse, "Shannon", "SampleType")
#' \dontrun{
#' \donttest{
#' # combining different plots
#' library(patchwork)
#' plot_index <- c("Shannon","GiniSimpson")
Expand Down
2 changes: 1 addition & 1 deletion R/estimateDominance.R
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
#'
#' # Indices must be written correctly (e.g. dbp, not dbp), otherwise an error
#' # gets thrown
#' \dontrun{esophagus <- estimateDominance(esophagus, index="dbp")}
#' \donttest{esophagus <- estimateDominance(esophagus, index="dbp")}
#' # Calculates dbp and Core Abundance indices
#' esophagus <- estimateDominance(esophagus, index=c("dbp", "core_abundance"))
#' # Shows all indices
Expand Down
2 changes: 1 addition & 1 deletion R/estimateRichness.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
#'
#' # Indices must be written correctly (all lowercase), otherwise an error
#' # gets thrown
#' \dontrun{esophagus <- estimateRichness(esophagus, index="ace")}
#' \donttest{esophagus <- estimateRichness(esophagus, index="ace")}
#'
#' # Calculates Chao1 and ACE indices only
#' esophagus <- estimateRichness(esophagus, index=c("chao1", "ace"),
Expand Down
Loading

0 comments on commit fd44bd5

Please sign in to comment.