diff --git a/.github/workflows/actions.yml b/.github/workflows/R-CMD-check.yml similarity index 99% rename from .github/workflows/actions.yml rename to .github/workflows/R-CMD-check.yml index c509c4de..62a8ade5 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/R-CMD-check.yml @@ -9,7 +9,7 @@ on: schedule: - cron: '0 8 * * 4' -name: R-CMD-check +name: R-CMD-check.yml jobs: ## pre-job to determine if a job has been run for the same SHA (e.g. on a different branch) diff --git a/README.md b/README.md index 58b0cff4..486bc96d 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ -[![R build -status](https://github.com/mixOmicsteam/mixOmics/workflows/R-CMD-check/badge.svg)](https://github.com/mixOmicsteam/mixOmics/actions) -[![](https://img.shields.io/badge/bioc%20release-6.20.0-green.svg)](https://www.bioconductor.org/packages/mixOmics) -[![](https://app.codecov.io/gh/mixOmicsTeam/mixOmics/branch/master/graph/badge.svg)](https://app.codecov.io/gh/mixOmicsTeam/mixOmics) +[![](https://img.shields.io/badge/release%20version-6.28.0-green.svg)](https://www.bioconductor.org/packages/mixOmics) [![download](http://www.bioconductor.org/shields/downloads/release/mixOmics.svg)](https://bioconductor.org/packages/stats/bioc/mixOmics) +[![R build +status](https://github.com/mixOmicsteam/mixOmics/workflows/R-CMD-check.yml/badge.svg)](https://github.com/mixOmicsteam/mixOmics/actions) [![](https://img.shields.io/github/last-commit/mixOmicsTeam/mixOmics.svg)](https://github.com/mixOmicsTeam/mixOmics/commits/master) +[![](https://codecov.io/gh/mixOmicsTeam/mixOmics/branch/master/graph/badge.svg)](https://app.codecov.io/gh/mixOmicsTeam/mixOmics) [![license](https://img.shields.io/badge/license-GPL%20(%3E=%202)-lightgrey.svg)](https://choosealicense.com/) [![dependencies](http://bioconductor.org/shields/dependencies/release/mixOmics.svg)](http://bioconductor.org/packages/release/bioc/html/mixOmics.html#since) ![](http://mixomics.org/wp-content/uploads/2019/07/MixOmics-Logo-1.png) -This repository contains the `R` package [now hosted on +This repository contains the `R` package which is [hosted on Bioconductor](http://bioconductor.org/packages/release/bioc/html/mixOmics.html) and our stable and development `GitHub` versions. @@ -21,72 +21,51 @@ and our stable and development `GitHub` versions. (**macOS users only:** Ensure you have installed [XQuartz](https://www.xquartz.org/) first.) +### From Bioconductor + +The best way to install `mixOmics` is using `Bioconductor`. You can see +the landing page for the release version of `mixOmics` on Bioconductor +[here](https://bioconductor.org/packages/release/bioc/html/mixOmics.html). + Make sure you have the latest R version and the latest `BiocManager` package installed following [these -instructions](https://www.bioconductor.org/install/) (if you use legacy -R versions (\<=3.5.0) refer to the instructions at the end of the -mentioned page). +instructions](https://www.bioconductor.org/install/). ``` r ## install BiocManager if not installed if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") -``` - -Ensure the following returns `TRUE`, or follow the guidelines provided -by the output. - -``` r -BiocManager::valid() -``` - -For installation in R, see options a) and b). For Docker containers, see -c). - -#### a) Latest `Bioconductor` Release - -You can then install `mixOmics` using the following code: -``` r ## install mixOmics BiocManager::install('mixOmics') -``` - -#### b) `GitHub` Versions -##### Stable version - -Install the latest stable version (see below for latest -[development](https://github.com/ajabadi/mixOmics#development-version) -version) of `mixOmics` from `GitHub` (as bug-free as it can be): - -``` r -BiocManager::install("mixOmicsTeam/mixOmics") +## load mixOmics +library(mixOmics) ``` -Check after installation that the following code does not throw any -error (especially Mac users - refer to [installation -instructions](#installation)) and that the welcome message confirms you -have installed [the latest -version](https://github.com/mixOmicsTeam/mixOmics/blob/master/DESCRIPTION#L4): +### From Github + +Bioconductor versions are updated twice a year, between these updates +you can downlod the latest stable version of `mixOmics` from `Github` +using: ``` r -library(mixOmics) -#> Loaded mixOmics ?.?.? +BiocManager::install('mixOmicsTeam/mixOmics') ``` -##### Development version - You can also install the [development -version](https://github.com/mixOmicsTeam/mixOmics/blob/devel/DESCRIPTION#L4) -for new features yet to be widely tested (see [What’s -New](/https://github.com/ajabadi/mixOmics#whats-new)): +version](https://github.com/mixOmicsTeam/mixOmics/tree/development) for +new features yet to be widely tested: ``` r -BiocManager::install("mixOmicsTeam/mixOmics@devel") +BiocManager::install("mixOmicsTeam/mixOmics@development") ``` -#### c) `Docker` container of the stable GitHub version +### From `Docker` container + +You can install our latest stable Github version of `mixOmics` via our +Docker container. You can do this by downloading and using the Docker +desktop application or via the command line as described below.
@@ -101,8 +80,8 @@ Click to expand **if your OS is not compatible with the latest version** download an older version of Docker from the following link: -- MacOS: -- Windows: +- MacOS: +- Windows: Then open your system’s command line interface (e.g. Terminal for MacOS and Command Promot for Windows) for the following steps. @@ -132,7 +111,7 @@ to the following: > REPOSITORY TAG IMAGE ID CREATED SIZE > mixomicsteam/mixomics latest e755393ac247 2 weeks ago 4.38GB -4) Active the container +4) Activate the container Running the following command activates the container. You must change `your_password` to a custom password of your own. You can also customise @@ -197,9 +176,9 @@ tests on our datasets. Set up development environment -- Install the latest version of R -- Install RStudio -- Clone this repo, checkout master branch, pull origin and then run: +- Install the latest version of R +- Install RStudio +- Clone this repo, checkout master branch, pull origin and then run: ``` r install.packages("renv", Ncpus=4) @@ -291,95 +270,89 @@ Thank you for using `mixOmics`! #### March 2022 -- bug fix implemented for [Issue - \#196](https://github.com/mixOmicsTeam/mixOmics/issues/196). - `perf()` can now handle features with a `(s)pls` which have near - zero variance. -- bug fix implemented for [Issue - \#192](https://github.com/mixOmicsTeam/mixOmics/issues/192). - `predict()` can now handle when the testing and training data have - their columns in different orders. -- bug fix implemented for [Issue - \#178](https://github.com/mixOmicsTeam/mixOmics/issues/178). If the - `indY` parameter is used in `block.spls()`, `circosPlot()` can now - properly identify the - ![Y](https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D&space;%5Cbg_white&space;Y "Y") - dataframe. -- bug fix implemented for [Issue - \#172](https://github.com/mixOmicsTeam/mixOmics/issues/172). - `perf()` now returns values for the `choice.ncomp` component when - `nrepeat` - ![\< 3](https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D&space;%5Cbg_white&space;%3C%203 "< 3") - whereas before it would just return `NA`s. -- bug fix implemented for [Issue - \#171](https://github.com/mixOmicsTeam/mixOmics/issues/171). `cim()` - now can take `pca` objects as input. -- bug fix implemented for [Issue - \#161](https://github.com/mixOmicsTeam/mixOmics/issues/161). - `tune.spca()` can now handle `NA` values appropriately. -- bug fix implemented for [Issue - \#150](https://github.com/mixOmicsTeam/mixOmics/issues/150). - Provided users with a specific error message for when `plotArrow()` - is run on a `(mint).(s)plsda` object. -- bug fix implemented for [Issue - \#122](https://github.com/mixOmicsTeam/mixOmics/issues/122). - Provided users with a specific error message for when a `splsda` - object that has only one sample associated with a given class is - passed to `perf()`. -- bug fix implemented for [Issue - \#120](https://github.com/mixOmicsTeam/mixOmics/issues/120). - `plotLoadings()` now returns the loading values for features from - **all** dataframes rather than just the last one when operating on a - `(mint).(block).(s)plsda` object. -- bug fix implemented for [Issue - \#43](https://github.com/mixOmicsTeam/mixOmics/issues/43). - Homogenised the way in which `tune.mint.splsda()` and - `perf.mint.splsda()` calculate balanced error rate (BER) as there - was disparity between them. Also made the global BER a weighted - average of BERs across each study. -- enhancement implemented for [Issue - \#30/#34](https://github.com/mixOmicsTeam/mixOmics/issues/34). The - parameter `verbose.call` was added to most of the methods. This - parameter allows users to access the specific values input into the - call of a function from its output. -- bug fix implemented for [Issue - \#24](https://github.com/mixOmicsTeam/mixOmics/issues/24). - `background.predict()` can now operate on `mint.splsda` objects and - can be used as part of `plotIndiv()`. +- bug fix implemented for [Issue + \#196](https://github.com/mixOmicsTeam/mixOmics/issues/196). `perf()` + can now handle features with a `(s)pls` which have near zero variance. +- bug fix implemented for [Issue + \#192](https://github.com/mixOmicsTeam/mixOmics/issues/192). + `predict()` can now handle when the testing and training data have + their columns in different orders. +- bug fix implemented for [Issue + \#178](https://github.com/mixOmicsTeam/mixOmics/issues/178). If the + `indY` parameter is used in `block.spls()`, `circosPlot()` can now + properly identify the $Y$ dataframe. +- bug fix implemented for [Issue + \#172](https://github.com/mixOmicsTeam/mixOmics/issues/172). `perf()` + now returns values for the `choice.ncomp` component when `nrepeat` + $< 3$ whereas before it would just return `NA`s. +- bug fix implemented for [Issue + \#171](https://github.com/mixOmicsTeam/mixOmics/issues/171). `cim()` + now can take `pca` objects as input. +- bug fix implemented for [Issue + \#161](https://github.com/mixOmicsTeam/mixOmics/issues/161). + `tune.spca()` can now handle `NA` values appropriately. +- bug fix implemented for [Issue + \#150](https://github.com/mixOmicsTeam/mixOmics/issues/150). Provided + users with a specific error message for when `plotArrow()` is run on a + `(mint).(s)plsda` object. +- bug fix implemented for [Issue + \#122](https://github.com/mixOmicsTeam/mixOmics/issues/122). Provided + users with a specific error message for when a `splsda` object that + has only one sample associated with a given class is passed to + `perf()`. +- bug fix implemented for [Issue + \#120](https://github.com/mixOmicsTeam/mixOmics/issues/120). + `plotLoadings()` now returns the loading values for features from + **all** dataframes rather than just the last one when operating on a + `(mint).(block).(s)plsda` object. +- bug fix implemented for [Issue + \#43](https://github.com/mixOmicsTeam/mixOmics/issues/43). Homogenised + the way in which `tune.mint.splsda()` and `perf.mint.splsda()` + calculate balanced error rate (BER) as there was disparity between + them. Also made the global BER a weighted average of BERs across each + study. +- enhancement implemented for [Issue + \#30/#34](https://github.com/mixOmicsTeam/mixOmics/issues/34). The + parameter `verbose.call` was added to most of the methods. This + parameter allows users to access the specific values input into the + call of a function from its output. +- bug fix implemented for [Issue + \#24](https://github.com/mixOmicsTeam/mixOmics/issues/24). + `background.predict()` can now operate on `mint.splsda` objects and + can be used as part of `plotIndiv()`. #### July 2021 -- new function `plotMarkers` to visualise the selected features in - block analyses (see - ) -- `tune.spls` now able to tune the selected variables on both `X` and - `Y`. See `?tune.spls` -- new function `impute.nipals` to impute missing values using the - nipals algorithm -- new function `tune.spca` to tune the number of selected variables - for pca components -- `circosPlot` now has methods for `block.spls` objects. It can now - handle similar feature names across blocks. It is also much more - customisable. See advanced arguments in `?circosPlot` -- new `biplot` function for `pca` and `pls` objects. See - `?mixOmics::biplot` -- `plotDiablo` now takes `col.per.group` (see \#119) +- new function `plotMarkers` to visualise the selected features in block + analyses (see ) +- `tune.spls` now able to tune the selected variables on both `X` and + `Y`. See `?tune.spls` +- new function `impute.nipals` to impute missing values using the nipals + algorithm +- new function `tune.spca` to tune the number of selected variables for + pca components +- `circosPlot` now has methods for `block.spls` objects. It can now + handle similar feature names across blocks. It is also much more + customisable. See advanced arguments in `?circosPlot` +- new `biplot` function for `pca` and `pls` objects. See + `?mixOmics::biplot` +- `plotDiablo` now takes `col.per.group` (see \#119) #### April 2020 -- weighted consensus plots for DIABLO objects now consider - per-component weights +- weighted consensus plots for DIABLO objects now consider per-component + weights #### March 2020 -- `plotIndiv` now supports (weighted) consensus plots for block - analyses. See the example in [this - issue](https://github.com/mixOmicsTeam/mixOmics/issues/57) -- `plotIndiv(..., ind.names=FALSE)` [warning - issue](https://github.com/mixOmicsTeam/mixOmics/issues/59) now fixed +- `plotIndiv` now supports (weighted) consensus plots for block + analyses. See the example in [this + issue](https://github.com/mixOmicsTeam/mixOmics/issues/57) +- `plotIndiv(..., ind.names=FALSE)` [warning + issue](https://github.com/mixOmicsTeam/mixOmics/issues/59) now fixed #### January 2020 -- `perf.block.splsda` now supports calculation of combined AUC -- `block.splsda` bug which could drop some classes with - `near.zero.variance=TRUE` now fixed +- `perf.block.splsda` now supports calculation of combined AUC +- `block.splsda` bug which could drop some classes with + `near.zero.variance=TRUE` now fixed diff --git a/inst/README.Rmd b/inst/README.Rmd index 728c3685..9d75b485 100644 --- a/inst/README.Rmd +++ b/inst/README.Rmd @@ -31,92 +31,60 @@ if (!requireNamespace('badger', quietly = TRUE)) library(badger) pkg_license <- read.dcf("../DESCRIPTION")[, "License"] pkg_license_badge <- sprintf("https://img.shields.io/badge/license-%s-lightgrey.svg", pkg_license) -## ------------------------------------------------------------------------ ## -# source('https://raw.githubusercontent.com/ajabadi/Altools/master/R/get_package_version.R') -## ------------------------------------------------------------------------ ## -# source('https://raw.githubusercontent.com/ajabadi/Altools/master/R/bump_up_version.R') - -bioc_release_badge <- badge_bioc_release('mixOmics', 'green') -bioc_release_badge <- gsub(bioc_release_badge, pattern = "release%20version", replacement = "bioc%20release") - -# github_master <- get_package_version('../', branch = 'master')$currVersion -# github_devel <- get_package_version('../', branch = 'devel')$currVersion - -# latest_stable <- sprintf("https://img.shields.io/badge/latest%%20stable-%s-blue.svg", github_master) -# latest_devel <- sprintf("https://img.shields.io/badge/latest%%20devel-%s-orange.svg", github_devel) -# -# latest_stable_badge <- sprintf("[![](%s)](https://github.com/mixOmicsTeam/mixOmics#latest-github-version)", latest_stable) -# latest_devel_badge <- sprintf("[![](%s)](https://github.com/mixOmicsTeam/mixOmics#development-version)", latest_devel) -# latest_devel_build <- "[![Build Status](https://travis-ci.org/mixOmicsTeam/mixOmics.svg?branch=devel)](https://travis-ci.org/mixOmicsTeam/mixOmics)" ``` -`r badge_github_actions("mixOmicsteam/mixOmics")` -`r bioc_release_badge` -`r badge_codecov("mixOmicsTeam/mixOmics", branch='master')` +`r badge_bioc_release("mixOmics", "green")` `r badge_bioc_download_rank('mixOmics')` +`r badge_github_actions(re = "mixOmicsteam/mixOmics", action = "R-CMD-check.yml")` `r badge_last_commit("mixOmicsTeam/mixOmics", branch='master')` +`r badge_codecov("mixOmicsTeam/mixOmics", branch='master')` [![license](`r pkg_license_badge`)](https://choosealicense.com/) [![dependencies](http://bioconductor.org/shields/dependencies/release/mixOmics.svg)](http://bioconductor.org/packages/release/bioc/html/mixOmics.html#since) ![](http://mixomics.org/wp-content/uploads/2019/07/MixOmics-Logo-1.png) -This repository contains the `R` package [now hosted on Bioconductor](http://bioconductor.org/packages/release/bioc/html/mixOmics.html) and our stable and development `GitHub` versions. +This repository contains the `R` package which is [hosted on Bioconductor](http://bioconductor.org/packages/release/bioc/html/mixOmics.html) and our stable and development `GitHub` versions. ## Installation (**macOS users only:** Ensure you have installed [XQuartz](https://www.xquartz.org/) first.) -Make sure you have the latest R version and the latest `BiocManager` package installed following [these instructions](https://www.bioconductor.org/install/) (if you use legacy R versions (<=3.5.0) refer to the instructions at the end of the mentioned page). +### From Bioconductor + +The best way to install `mixOmics` is using `Bioconductor`. You can see the landing page for the release version of `mixOmics` on Bioconductor [here](https://bioconductor.org/packages/release/bioc/html/mixOmics.html). + +Make sure you have the latest R version and the latest `BiocManager` package installed following [these instructions](https://www.bioconductor.org/install/). + ```{r} ## install BiocManager if not installed if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") -``` - -Ensure the following returns `TRUE`, or follow the guidelines provided by the output. - -```{r} -BiocManager::valid() -``` - -For installation in R, see options a) and b). For Docker containers, see c). -#### a) Latest `Bioconductor` Release - -You can then install `mixOmics` using the following -code: - -```{r} ## install mixOmics BiocManager::install('mixOmics') -``` -#### b) `GitHub` Versions +## load mixOmics +library(mixOmics) +``` -##### Stable version +### From Github -Install the latest stable version (see below for latest [development](https://github.com/ajabadi/mixOmics#development-version) version) of `mixOmics` from `GitHub` (as bug-free as it can be): +Bioconductor versions are updated twice a year, between these updates you can downlod the latest stable version of `mixOmics` from `Github` using: ```{r} -BiocManager::install("mixOmicsTeam/mixOmics") +BiocManager::install('mixOmicsTeam/mixOmics') ``` -Check after installation that the following code does not throw any error (especially Mac users - refer to [installation instructions](#installation)) and that the welcome message confirms you have installed [the latest version](https://github.com/mixOmicsTeam/mixOmics/blob/master/DESCRIPTION#L4): +You can also install the [development version](https://github.com/mixOmicsTeam/mixOmics/tree/development) for new features yet to be widely tested: ```{r} -library(mixOmics) -#> Loaded mixOmics ?.?.? +BiocManager::install("mixOmicsTeam/mixOmics@development") ``` -##### Development version - -You can also install the [development version](https://github.com/mixOmicsTeam/mixOmics/blob/devel/DESCRIPTION#L4) for new features yet to be widely tested (see [What's New](/https://github.com/ajabadi/mixOmics#whats-new)): -```{r} -BiocManager::install("mixOmicsTeam/mixOmics@devel") -``` +### From `Docker` container -#### c) `Docker` container of the stable GitHub version +You can install our latest stable Github version of `mixOmics` via our Docker container. You can do this by downloading and using the Docker desktop application or via the command line as described below.
Click to expand @@ -154,7 +122,7 @@ $ docker images > REPOSITORY TAG IMAGE ID CREATED SIZE > mixomicsteam/mixomics latest e755393ac247 2 weeks ago 4.38GB ``` -4) Active the container +4) Activate the container Running the following command activates the container. You must change `your_password` to a custom password of your own. You can also customise ports (8787:8787) if desired/necessary. see https://docs.docker.com/config/containers/container-networking/ for details.