language: perl

sudo: false

addons:
  apt:
    packages:
    - hmmer
    - bedtools

perl:
  - "5.26"
  
install:
  - "export PATH=$PWD/bin:$PATH"
  - "sed -i~ -e 's/-name+/-name/' bin/barrnap"
    
script:
  - "barrnap --version"
  - "barrnap --help"
  - "barrnap --citation"
  - "! barrnap --doesnotexist"
  - "barrnap 2>&1 | grep 'ERROR: No input file'"
  - "barrnap -q --kingdom bac  examples/bacteria.fna"
  - "barrnap -q --kingdom arc  examples/bacteria.fna"
  - "barrnap -q --kingdom mito examples/mitochondria.fna"
  - "barrnap -q --kingdom euk  examples/fungus.fna"
  - "! barrnap examples/empty.fna"
  - "! barrnap examples/null.fna"
  - "barrnap -q examples/small.fna | grep 16S_rRNA"
  - "barrnap -q < examples/small.fna | grep 16S_rRNA"
  - "barrnap -q - < examples/small.fna | grep 16S_rRNA"
  - "barrnap examples/nohits.fna 2>&1 | grep 'Found 0 '"  
  - "barrnap --threads 2 examples/small.fna"
  - "barrnap -q --incseq examples/small.fna | grep '^>'"
  - "barrnap -q --outseq hits.fa < examples/small.fna && head -n3 hits.fa"
