{% set name = "BBMap" %}
{% set version = "39.01" %}
{% set sha256 = "98608da50130c47f3abd095b889cc87f60beeb8b96169b664bc9d849abe093e6" %}

build:
  number: 1

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: http://downloads.sourceforge.net/project/{{ name|lower }}/{{ name }}_{{ version }}.tar.gz
  sha256: {{ sha256 }}

requirements:
  build:
    - {{ compiler('c') }}
  host:
    - openjdk >=7.0
    - pbzip2
    - bzip2
    - samtools
  run:
    - openjdk >=7.0
    - pbzip2
    - bzip2
    - samtools

test:
  files:
    - test.fa
    - testdatabase.fa
    - testexpected.sam
  commands:
    - bbmap.sh -V 2>&1 | grep "BBMap" > /dev/null
    - bbmerge.sh -V 2>&1 | grep "BBMerge" > /dev/null
    - bbduk.sh -V 2>&1 | grep "BBDuk" > /dev/null
    - bbmask.sh -V 2>&1 | grep "BBMask" > /dev/null
    - bbnorm.sh --help 2>&1 | grep "BBNorm" > /dev/null

about:
  home: https://sourceforge.net/projects/bbmap
  doc_url: https://jgi.doe.gov/data-and-tools/bbtools/bb-tools-user-guide/
  license: "UC-LBL license (see package)"
  license_file: license.txt
  summary: "BBMap is a short read aligner, as well as various other bioinformatic tools."

extra:
  notes: |
    BBMap is a series of Java programs, but they come with a number of custom
    wrapper shell scripts. Each of these is symlinked to the conda bin directory
    during install.
  identifiers:
    - biotools:bbmap
    - doi:10.1371/journal.pone.0185056
