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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/dnapath_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/dnapath/dnapath_{{ version }}.tar.gz
  sha256: 2f0087d48579b0be70d9e967f0e7eaa5b47b93d5d909e6b39fa168ae034afdf6

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-rcpp >=1.0.1
    - r-rcpparmadillo
    - r-rdpack
    - r-seqnet
    - r-corpcor
    - r-curl
    - r-dplyr
    - r-ggplot2
    - r-gtools
    - r-igraph
    - r-tibble
    - r-wcorr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=1.0.1
    - r-rcpparmadillo
    - r-rdpack
    - r-seqnet
    - r-corpcor
    - r-curl
    - r-dplyr
    - r-ggplot2
    - r-gtools
    - r-igraph
    - r-tibble
    - r-wcorr

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

about:
  home: https://CRAN.R-project.org/package=dnapath
  license: GPL-2.0-or-later
  summary: Integrates pathway information into the differential network analysis of two gene
    expression datasets as described in Grimes, Potter, and Datta (2019) <doi:10.1038/s41598-019-41918-3>.
    Provides summary functions to break down the results at the pathway, gene, or individual
    connection level. The differential networks for each pathway of interest can be
    plotted, and the visualization will highlight any differentially expressed genes
    and all of the gene-gene associations that are significantly differentially connected.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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