Skip to content

Commit

Permalink
Merge pull request #80 from jasenfinch/devel
Browse files Browse the repository at this point in the history
v0.14.3
  • Loading branch information
jasenfinch committed Sep 14, 2021
2 parents 75bf394 + 8dc6d43 commit 83c4f9d
Show file tree
Hide file tree
Showing 157 changed files with 4,465 additions and 1,245 deletions.
77 changes: 26 additions & 51 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- master
- devel
branches: [main, master, devel]
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * *'
branches: [main, master]

name: R-CMD-check

Expand All @@ -23,63 +18,43 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel/1'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-pandoc@v1

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
- uses: r-lib/actions/setup-r-dependencies@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
sudo apt-get install -y libgit2-dev
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran(c("rcmdcheck","goodpractice"))
shell: Rscript {0}
extra-packages: rcmdcheck

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Goodpractice
run: goodpractice::goodpractice()
_R_CHECK_CRAN_INCOMING_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Test coverage
run: covr::codecov()
Expand Down
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Package: metabolyseR
Title: Methods for Pre-Treatment, Data Mining and Correlation Analyses of Metabolomics Data
Version: 0.14.2
Version: 0.14.3
Authors@R: person("Jasen", "Finch", email = "[email protected]", role = c("aut", "cre"))
Description: A tool kit for pre-treatment, modelling, feature selection and correlation analyses of metabolomics data.
URL: https://jasenfinch.github.io/metabolyseR
URL: https://jasenfinch.github.io/metabolyseR
BugReports: https://github.com/jasenfinch/metabolyseR/issues
biocViews: Metabolomics
Depends: R (>= 3.4.0)
Expand Down Expand Up @@ -37,9 +37,8 @@ Imports: Hmisc,
future
License: GPL (>= 3)
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
RoxygenNote: 7.1.2
Suggests: knitr,
rmarkdown,
readr,
Expand Down Expand Up @@ -87,4 +86,4 @@ Collate: allClasses.R
univariate.R
modelling-accessors.R
VignetteBuilder: knitr
Remotes: aberHRML/metaboData
Remotes: jasenfinch/missForest
18 changes: 18 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# metabolyseR 0.14.3

* Temporarily added [jasenfinch/missForest](https://github.com/jasenfinch/missForest) as a remote until [stekhoven/missForest](https://github.com/stekhoven/missForest) pull request [#25](https://github.com/stekhoven/missForest/pull/25) is resolved.

* The limit of the number of plotted features in [`plotExplanatoryHeatmap`](https://jasenfinch.github.io/metabolyseR/reference/plotExplanatoryHeatmap.html) can now be specified using the `featureLimit` argument.

* [`plotExplanatoryHeatmap()`](https://jasenfinch.github.io/metabolyseR/reference/plotExplanatoryHeatmap.html) now returns NULL and returns a message when no explanatory features are found.

* Fixed the alignment of the dendrogram branches with heat map rows in [`plotExplanatoryHeatmap()`](https://jasenfinch.github.io/metabolyseR/reference/plotExplanatoryHeatmap.html).

* Fixed `ggplot2::guides()` warning in [`plotFeature()`](https://jasenfinch.github.io/metabolyseR/reference/plotFeature.html) and [`plotTIC()`](https://jasenfinch.github.io/metabolyseR/reference/plotTIC.html).

* Fixed bug in [`explanatoryFeatures()`](https://jasenfinch.github.io/metabolyseR/reference/modelling-accessors.html) methods for [`Analysis`](https://jasenfinch.github.io/metabolyseR/reference/Analysis-class.html) class and lists where the threshold was not applied.

* Fixed the error in [`plotRSD()`](https://jasenfinch.github.io/metabolyseR/reference/plotRSD.html) method for the [`Analysis`](https://jasenfinch.github.io/metabolyseR/reference/Analysis-class.html) class.

* Corrected the text in the [modelling vignette](https://jasenfinch.github.io/metabolyseR/articles/modelling.html) concerning the results of using unsupervised random forest for outlier detection.

# metabolyseR 0.14.2

* Package version, creation date and verbose argument added to prototype of `Analysis` class.
Expand Down
6 changes: 3 additions & 3 deletions R/modelling-accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ setGeneric('explanatoryFeatures', function(x,...)
#' @importFrom dplyr arrange

setMethod('explanatoryFeatures',signature = 'Univariate',
function(x,threshold = 0.05,...){
function(x,threshold = 0.05){
importance(x) %>%
filter(adjusted.p.value < threshold) %>%
arrange(adjusted.p.value)
Expand Down Expand Up @@ -247,7 +247,7 @@ setMethod('explanatoryFeatures',signature = 'RandomForest',
#' @rdname modelling-accessors

setMethod('explanatoryFeatures',signature = 'list',
function(x,threshold = 0.05, ...){
function(x,...){
object_classes <- x %>%
map_chr(class)

Expand All @@ -266,7 +266,7 @@ setMethod('explanatoryFeatures',signature = 'list',
#' @rdname modelling-accessors

setMethod('explanatoryFeatures',signature = 'Analysis',
function(x,threshold = 0.05, ...){
function(x,...){
x %>%
analysisResults(element = 'modelling') %>%
explanatoryFeatures(...)
Expand Down
Loading

0 comments on commit 83c4f9d

Please sign in to comment.