{% set version = '0.14.1' %}

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

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

source:
  fn: heatmaply_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/heatmaply_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/heatmaply/heatmaply_{{ version }}.tar.gz
  sha256: 4c0602e5848f5778d6e455be02f4eb757869002c93713efa7df839489962e20e

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-rcolorbrewer
    - r-assertthat
    - r-colorspace
    - r-dendextend >=1.4.0
    - r-ggplot2 >=2.2.0
    - r-gplots
    - r-htmlwidgets
    - r-magrittr >=1.0.1
    - r-plotly >=4.7.1
    - r-reshape2
    - r-scales
    - r-seriation
    - r-viridis
    - r-webshot

  run:
    - r-base
    - r-rcolorbrewer
    - r-assertthat
    - r-colorspace
    - r-dendextend >=1.4.0
    - r-ggplot2 >=2.2.0
    - r-gplots
    - r-htmlwidgets
    - r-magrittr >=1.0.1
    - r-plotly >=4.7.1
    - r-reshape2
    - r-scales
    - r-seriation
    - r-viridis
    - r-webshot

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

about:
  home: https://cran.r-project.org/package=heatmaply, https://github.com/talgalili/heatmaply/, https://www.r-statistics.com/tag/heatmaply/
  license: GPL-2 | GPL-3
  summary: Create interactive cluster 'heatmaps' that can be saved as a stand- alone HTML file,
    embedded in 'R Markdown' documents or in a 'Shiny' app, and available in the 'RStudio'
    viewer pane. Hover the mouse pointer over a cell to show details or drag a rectangle
    to zoom. A 'heatmap' is a popular graphical method for visualizing high-dimensional
    data, in which a table of numbers are encoded as a grid of colored cells. The rows
    and columns of the matrix are ordered to highlight patterns and are often accompanied
    by 'dendrograms'. 'Heatmaps' are used in many fields for visualizing observations,
    correlations, missing values patterns, and more. Interactive 'heatmaps' allow the
    inspection of specific value by hovering the mouse over a cell, as well as zooming
    into a region of the 'heatmap' by dragging a rectangle around the relevant area.
    This work is based on the 'ggplot2' and 'plotly.js' engine. It produces similar
    'heatmaps' as 'heatmap.2' or 'd3heatmap', with the advantage of speed ('plotly.js'
    is able to handle larger size matrix), the ability to zoom from the 'dendrogram'
    panes, and the placing of factor variables in the sides of the 'heatmap'.
  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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
