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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/SKAT_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/SKAT/SKAT_{{ version }}.tar.gz
  sha256: 2b349896560ad18c3428e245fc25b17e9c2946676044fa56025ddf9c87ff08bf

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-matrix
    - r-rspectra
    - r-spatest
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-rspectra
    - r-spatest

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

about:
  home: https://CRAN.R-project.org/package=SKAT
  license: GPL-2.0-or-later
  summary: Functions for kernel-regression-based association tests including Burden test, SKAT and SKAT-O. These methods aggregate individual SNP score statistics in a SNP set and efficiently compute SNP-set level p-values.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
    - bsennblad

# Package: SKAT
# Type: Package
# Title: SNP-Set (Sequence) Kernel Association Test
# Version: 2.0.0
# Date: 2020-03-07
# Author: Seunggeun (Shawn) Lee and Zhangchen Zhao, with contributions from Larisa Miropolsky and Michael Wu
# Maintainer: Seunggeun (Shawn) Lee <lee7801@snu.ac.kr>
# Description: Functions for kernel-regression-based association tests including Burden test, SKAT and SKAT-O. These methods aggregate individual SNP score statistics in a SNP set and efficiently compute SNP-set level p-values.
# License: GPL (>= 2)
# Depends: R (>= 2.13.0), Matrix, SPAtest
# NeedsCompilation: yes
# Packaged: 2020-03-09 00:07:35 UTC; leeshawn
# Repository: CRAN
# Date/Publication: 2020-03-09 12:10:02 UTC
