{% set version = '1.9-2' %}

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

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

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

  sha256: b08e65ddbaa287fa7f4806a4a6c1556e4cefb036a77e1c56f7ddbcf591f46b84

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

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

requirements:
  build:
    - r-base
    - r-haplo.stats
    - r-mvtnorm
    - r-survival

  run:
    - r-base
    - r-haplo.stats
    - r-mvtnorm
    - r-survival

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

about:
  home: https://cran.r-project.org/web/packages/SNPassoc/index.html
  license: GPL (>= 2)
  summary: This package carries out most common analysis when performing whole genome association
    studies. These analyses include descriptive statistics and exploratory analysis
    of missing values, calculation of Hardy-Weinberg equilibrium, analysis of association
    based on generalized linear models (either for quantitative or binary traits), and
    analysis of multiple SNPs (haplotype and epistasis analysis). Permutation test and
    related tests (sum statistic and truncated product) are also implemented. Max-statistic
    and genetic risk-allele score exact distributions are also possible to be estimated.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}\/lib\/R\/share\/licenses\/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
