{% set version = '1.2.7' %}

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

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

source:
  fn: huge_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/huge_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/huge/huge_{{ version }}.tar.gz
  sha256: 042b771c334cf4d1a92c5c546ca025238919f772a50457594b7e0bd243498d8c

build:
  merge_build_host: True  # [win]
  number: 2

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]

  host:
    - r-base
    - r-mass
    - r-matrix
    - r-igraph
    - r-lattice

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-mass
    - r-matrix
    - r-igraph
    - r-lattice

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

about:
  home: https://CRAN.R-project.org/package=huge
  license: GPL-2
  summary: 'Provides a general framework for high-dimensional undirected graph estimation. It
    integrates data preprocessing, neighborhood screening, graph estimation, and model
    selection techniques into a pipeline. In preprocessing stage, the nonparanormal(npn)
    transformation is applied to help relax the normality assumption. In the graph estimation
    stage, the graph structure is estimated by Meinshausen-Buhlmann graph estimation
    or the graphical lasso, and both methods can be further accelerated by the lossy
    screening rule preselecting the neighborhood of each variable by correlation thresholding.
    We target on high-dimensional data analysis usually d >> n, and the computation
    is memory-optimized using the sparse matrix output. We also provide a computationally
    efficient approach, correlation thresholding graph estimation. Three regularization/thresholding
    parameter selection methods are included in this package. (1)stability approach
    for regularization selection (2) rotation information criterion (3) extended Bayesian
    information criterion which is only available for the graphical lasso.'
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

extra:
  recipe-maintainers:
    - nick-youngblut
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
