{% set version = '2.0.5' %}

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

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

source:
  fn: ashr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ashr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ashr/ashr_{{ version }}.tar.gz
  sha256: bf3864a868f3224a81a38233d9a25990b63316446dd2f86397dc2a76630a992e

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

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

requirements:
  build:
    - r-base
    - r-rcpp
    - r-squarem
    - r-assertthat
    - r-doparallel
    - r-etrunct
    - r-foreach
    - r-pscl
    - r-truncnorm
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-rcpp
    - r-squarem
    - r-assertthat
    - r-doparallel
    - r-etrunct
    - r-foreach
    - r-pscl
    - r-truncnorm
    - {{native}}gcc-libs   # [win]
    - libgcc               # [not win]

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

about:
  home: http://github.com/stephens999/ashr
  license: GPL (>= 3)
  summary: 'The R package ''ashr'' implements an Empirical Bayes approach for large-scale hypothesis
    testing and false discovery rate (FDR) estimation based on the methods proposed
    in M. Stephens, 2016, "False discovery rates: a new deal", <DOI:10.1093/biostatistics/kxw041>.
    These methods can be applied whenever two sets of summary statistics---estimated
    effects and standard errors---are available, just as ''qvalue'' can be applied to
    previously computed p-values. Two main interfaces are provided: ash(), which is
    more user-friendly; and ash.workhorse(), which has more options and is geared toward
    advanced users.'
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
