{% set name = "SeqSero2S" %}
{% set version = "1.1.4" %}
{% set release = "89f1f5aca7a8819ee96239592fedd2e737036ada" %}
{% set sha256 = "995f1815cc6cee7b8e37604b068bbec673e2ee8880e41adf6df0350966fe4c65" %}

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

source:
  url: https://github.com/LSTUGA/SeqSero2S/archive/refs/tags/v{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 2
  noarch: python
  script:
    - {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation --no-cache-dir
    # patch stringMLST.py log path: replace dbPrefix reference with cwd to avoid
    # patches ALL occurrences (at line 1464 and predict section at line 1478).
    - bash $RECIPE_DIR/patch_stringmlst.sh
  run_exports:
    - {{ pin_subpackage(name|lower, max_pin="x.x") }}

requirements:
  host:
    - python >=3
    - pip
    - setuptools
    - stringmlst >=0.6
  run:
    - python >=3
    - blast >=2.2
    - zstd         # libzstd.so.1 required by blastn binary
    - samtools
    - bedtools >=2.17
    - sra-tools >=2.8
    - spades >=3.9
    - salmid
    - bwa >=0.7
    - seqtk >=1.3
    - stringmlst >=0.6
    - mlst >=2.32.2

test:
  commands:
    - SeqSero2S.py -h
    - blastn -help
    - SalmID.py -h
    - mlst -h

about:
  home: "https://github.com/LSTUGA/{{ name }}"
  license: "GPL-2.0-or-later"
  license_family: GPL
  license_file: 'LICENSE'
  summary: "Simplified Salmonella serotype prediction from genome sequencing data"
  dev_url: "https://github.com/LSTUGA/{{ name }}"

extra:
  recipe-maintainers:
    - LSTUGA
    - crashfrog
    - biocoder
  identifiers:
    - doi:10.1128/aem.02600-24

