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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/ComICS_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ComICS/ComICS_{{ version }}.tar.gz
  sha256: 0af7901215876f95f309d7da6e633c38e4d7faf04112dd6fd343bc15fc593a2f

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [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-roxygen2
    - r-glmnet
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-roxygen2
    - r-glmnet

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

about:
  home: http://dcq.tau.ac.il/ , http://csgi.tau.ac.il/VoCAL/
  license: GPL-2.0-only
  summary: Provided are Computational methods for Immune Cell-type Subsets, including:(1) DCQ
    (Digital Cell Quantifier) to infer global dynamic changes in immune cell quantities
    within a complex tissue; and (2) VoCAL (Variation of Cell-type Abundance Loci) a
    deconvolution-based method that utilizes transcriptome data to infer the quantities
    of immune-cell types, and then uses these quantitative traits to uncover the underlying
    DNA loci.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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