{% set version = "3.14.1" %}
{% set sha256 = "d629b78f7e74c82534ac20f5b3c2eb367f245e6840a67b9ef6a76f6fac5323ca" %}

package:
  name: spades
  version: {{ version }}

source:
  url: http://cab.spbu.ru/files/release{{ version }}/SPAdes-{{ version }}.tar.gz  
  sha256: {{ sha256 }}
  patches:
    - 0001-change-verbosity.patch
    - 0001-add-rt-lib-to-easel.patch  # [linux]
    - 0001-link-rt-for-static-jemalloc.patch  # [linux]

build:
  number: 2

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - clangdev  # [osx]
    - llvm-openmp  # [osx]
    - openmp  # [linux]
    - cmake
    - make
    - pkg-config
  host:
    - llvm-openmp  # [osx]
    - openmp  # [linux]
    - zlib
    - bzip2
  run:
    - llvm-openmp  # [osx]
    - openmp  # [linux]
    - python

test:
  commands:
    - spades.py --version 2>&1 | grep {{ version }}
    - rnaspades.py --version 2>&1 | grep {{ version }}
    - truspades.py --help 2>&1 | grep {{ version }}
    - metaspades.py --version 2>&1 | grep {{ version }}
    - plasmidspades.py --version 2>&1 | grep {{ version }}
    - spades-kmercount -h 2>&1 | grep spades-kmercount
    - spades-gmapper 2>&1 | grep spades-gmapper
    - spades-gbuilder 2>&1 | grep spades-gbuilder
    - spades.py --test && rm -rf spades_test


about:
  home: http://cab.spbu.ru/software/spades/
  license: GPLv2
  license_family: GPL
  license_file: LICENSE
  summary: SPAdes (St. Petersburg genome assembler) is intended for both standard isolates and single-cell MDA bacteria assemblies.
  description: |
    SPAdes (St. Petersburg genome assembler) is a genome assembly algorithm which was designed for
    single cell and multi-cells bacterial data sets. However, it might not be suitable for large
    genomes projects.

    SPAdes works with Ion Torrent, PacBio, Oxford Nanopore, and Illumina paired-end, mate-pairs and
    single reads

  dev_url: https://github.com/ablab/spades
  doc_url: http://cab.spbu.ru/files/release{{version}}/manual.html


extra:
  recipe-maintainers:
    - druvus
    - notestaff
  identifiers:
    - biotools:spades
    - usegalaxy-eu:spades
    - doi:10.1089/cmb.2012.0021
    - doi:10.1101/gr.213959.116
    - doi:10.1093/gigascience/giz100
    - doi:10.1093/bioinformatics/btz349
  skip-lints:
    - should_not_be_noarch_source
