{% set version = '0.9.6' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-ruv
  version: {{ version|replace("-", "_") }}

source:
  fn: ruv_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ruv_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ruv/ruv_{{ version }}.tar.gz

  sha256: 200885936c45cc1ef2eab6b8d638b42e2b9053363d24f37592619a6ecb39f18b

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - libgcc  # [not win]

test:
  commands:
    - $R -e "library('ruv')"  # [not win]
    - "\"%R%\" -e \"library('ruv')\""  # [win]

about:
  home: https://cran.r-project.org/web/packages/ruv/index.html
  license: GPL
  summary: Implements the 'RUV' (Remove Unwanted Variation) algorithms.  These algorithms attempt
    to adjust for systematic errors of unknown origin in high-dimensional data.  The
    algorithms were originally developed for use with genomic data, especially microarray
    data, but may be useful with other types of high-dimensional data as well.  These
    algorithms were proposed by Gagnon-Bartsch and Speed (2012), and by Gagnon-Bartsch,
    Jacob and Speed (2013).  The algorithms require the user to specify a set of negative
    control variables, as described in the references.  The algorithms included in this
    package are 'RUV-2', 'RUV-4', 'RUV-inv', and 'RUV-rinv', along with various supporting
    algorithms.
  license_family: GPL
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
