Skip to content

Commit

Permalink
Merge pull request #91 from jasenfinch/devel
Browse files Browse the repository at this point in the history
v0.15.0
  • Loading branch information
jasenfinch committed Feb 20, 2023
2 parents 5b3a032 + b81658b commit cb4d1b2
Show file tree
Hide file tree
Showing 94 changed files with 1,817 additions and 1,404 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/R-CMD-check.yaml
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
Expand All @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand All @@ -29,18 +29,21 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
33 changes: 22 additions & 11 deletions .github/workflows/pkgdown.yaml
@@ -1,8 +1,10 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:
Expand All @@ -12,24 +14,33 @@ name: pkgdown
jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: pkgdown
extra-packages: any::pkgdown, local::.
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
folder: docs
32 changes: 26 additions & 6 deletions .github/workflows/test-coverage.yaml
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
Expand All @@ -15,16 +15,36 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov()
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
15 changes: 10 additions & 5 deletions DESCRIPTION
@@ -1,9 +1,9 @@
Package: metabolyseR
Title: Methods for Pre-Treatment, Data Mining and Correlation Analyses of Metabolomics Data
Version: 0.14.10
Version: 0.15.0
Authors@R: person("Jasen", "Finch", email = "jsf9@aber.ac.uk", 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 @@ -38,7 +38,7 @@ Imports: Hmisc,
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Suggests: knitr,
rmarkdown,
readr,
Expand All @@ -47,7 +47,7 @@ Suggests: knitr,
prettydoc,
covr,
kableExtra
Collate: allClasses.R
Collate: all-classes.R
analysis-accessors.R
aggregate.R
analysisData.R
Expand All @@ -61,7 +61,7 @@ Collate: allClasses.R
metabolyse.R
metabolyseR.R
modelling.R
modellingPlots.R
modelling-plots.R
nlda.R
occupancy.R
parameters.R
Expand All @@ -80,6 +80,11 @@ Collate: allClasses.R
QC.R
reexports.R
remove.R
randomForest-permute.R
randomForest-classification.R
randomForest-regression.R
randomForest-internals.R
randomForest-unsupervised.R
randomForest.R
rsd.R
roc.R
Expand Down
8 changes: 8 additions & 0 deletions NAMESPACE
Expand Up @@ -75,6 +75,7 @@ export(preTreatmentElements)
export(preTreatmentMethods)
export(preTreatmentParameters)
export(predict)
export(predictions)
export(proximity)
export(randomForest)
export(raw)
Expand Down Expand Up @@ -138,12 +139,14 @@ importFrom(dplyr,mutate_all)
importFrom(dplyr,mutate_at)
importFrom(dplyr,mutate_if)
importFrom(dplyr,n)
importFrom(dplyr,pull)
importFrom(dplyr,relocate)
importFrom(dplyr,rename)
importFrom(dplyr,rename_with)
importFrom(dplyr,rowwise)
importFrom(dplyr,select)
importFrom(dplyr,select_if)
importFrom(dplyr,slice)
importFrom(dplyr,summarise)
importFrom(dplyr,summarise_all)
importFrom(dplyr,ungroup)
Expand All @@ -152,6 +155,7 @@ importFrom(forestControl,fpr_fs)
importFrom(furrr,furrr_options)
importFrom(furrr,future_map)
importFrom(furrr,future_map2)
importFrom(furrr,future_map_dfr)
importFrom(future,plan)
importFrom(ggdendro,dendro_data)
importFrom(ggplot2,aes)
Expand Down Expand Up @@ -204,6 +208,7 @@ importFrom(magrittr,set_names)
importFrom(magrittr,set_rownames)
importFrom(methods,"slot<-")
importFrom(methods,as)
importFrom(methods,is)
importFrom(methods,new)
importFrom(methods,show)
importFrom(methods,slot)
Expand All @@ -217,10 +222,12 @@ importFrom(purrr,map_chr)
importFrom(purrr,map_dbl)
importFrom(purrr,map_depth)
importFrom(purrr,map_df)
importFrom(purrr,map_dfr)
importFrom(purrr,map_lgl)
importFrom(purrr,walk)
importFrom(randomForest,margin)
importFrom(rlang,":=")
importFrom(rlang,squash)
importFrom(rlang,sym)
importFrom(stats,cmdscale)
importFrom(stats,cov)
Expand All @@ -243,6 +250,7 @@ importFrom(stringr,str_replace_all)
importFrom(stringr,str_split)
importFrom(stringr,str_split_fixed)
importFrom(stringr,str_sub)
importFrom(stringr,str_to_title)
importFrom(tibble,as_tibble)
importFrom(tibble,deframe)
importFrom(tibble,rowid_to_column)
Expand Down
22 changes: 22 additions & 0 deletions NEWS.md
@@ -1,3 +1,25 @@
# metabolyseR 0.15.0

* It is now possible to specify multiple `cls` arguments to the [aggregation methods](https://jasenfinch.github.io/metabolyseR/reference/aggregate.html).

* Correlation thresholds are now available for both coefficient and total number using the `minCoef` and `maxCor` arguments in the [`correlations()`](https://jasenfinch.github.io/metabolyseR/reference/correlations.html) method.

* Added the [`predictions()`]() accessor method for the [`RandomForest`](https://jasenfinch.github.io/metabolyseR/reference/RandomForest-class.html) S4 class to enable the retrieval of the out of bag model response predictions.

* The [occupancy filtering methods](https://jasenfinch.github.io/metabolyseR/reference/occupancyFilter.html) now error if the value supplied to argument `occupancy` is non-numeric.

* Memory usage and performance improvements for the [`randomForest()`](https://jasenfinch.github.io/metabolyseR/reference/randomForest.html) method.

* Added [`type()`](https://jasenfinch.github.io/metabolyseR/reference/modelling-accessors.html) and [`response()`](https://jasenfinch.github.io/metabolyseR/reference/modelling-accessors.html) methods for the [`Univariate`](https://jasenfinch.github.io/metabolyseR/reference/Univariate-class.html) S4 class.

* [`plotLDA()`](https://jasenfinch.github.io/metabolyseR/reference/plotLDA.html) now returns a warning and skips plotting if an error is encountered during PC-LDA.

* The value `pre-treated` is now the default for argument `type` in the [`Analysis`](https://jasenfinch.github.io/metabolyseR/reference/Analysis-class.html) S4 class [accessor methods](https://jasenfinch.github.io/metabolyseR/reference/analysis-accessors.html).

* Added the `value` argument to the [`explanatoryFeatures()`](https://jasenfinch.github.io/metabolyseR/reference/modelling-accessors.html) method to allow the specification of on which importance value to apply the specified `threshold`.

* The specified `cls` argument is now correctly displayed on the x-axis title of the resulting plots from the [`plotFeature()`](https://jasenfinch.github.io/metabolyseR/reference/plotFeature.html) method.

# metabolyseR 0.14.10

* Added the method [`predict()`](https://jasenfinch.github.io/metabolyseR/reference/predict.html) for the [`RandomForest`](https://jasenfinch.github.io/metabolyseR/reference/RandomForest-class.html) S4 class to predict model response values.
Expand Down
2 changes: 1 addition & 1 deletion R/QC.R
Expand Up @@ -80,7 +80,7 @@ setMethod('QCimpute',signature = 'AnalysisData',

dat(d)[d %>%
sinfo() %>%
select(cls) %>%
select(all_of(cls)) %>%
deframe() %>%
{. == QCidx},] <- QC %>%
dat()
Expand Down

0 comments on commit cb4d1b2

Please sign in to comment.