{% set name = "BBMap" %}
{% set version = "38.22" %}
{% set sha256 = "7ee6165440efc5fcfd108416d041e00c7d89002bc1fabfeb74a9c175528c9dea" %}

build:
  number: 0

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

source:
  url: http://downloads.sourceforge.net/project/{{ name|lower }}/{{ name }}_{{ version }}.tar.gz
  sha256: {{ sha256 }}
  patches:
    - 0001-changed-jni-makefiles-to-be-more-standards-compatibl.patch

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

test:
  files:
    - test.fa
    - testdatabase.fa
    - testexpected.sam
  commands:
    - bbmap.sh -V 2>&1 | grep "BBMap" > /dev/null
    - bbmap.sh -V 2>&1 | grep "Version {{ version }}" > /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
  recipe-maintainers:
    - notestaff


