Skip to content

Commit

Permalink
DEV: add check for taxonkit in kaiju convert
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Jul 24, 2023
1 parent 595ce07 commit b73fe7d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions condiga_utils/support/convert.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import subprocess
import sys

import click

Expand Down Expand Up @@ -71,6 +72,16 @@ def main(input, tool, nthreads, output):
)

elif tool.lower() == "kaiju":

# Check if taxonkit is installed
try:
p = subprocess.run(["which", "taxonkit"], capture_output=True)
if p.returncode != 0:
raise Exception("Command does not exist")
except:
print("taxonkit does not exist. Please install from https://github.com/shenwei356/taxonkit")
sys.exit(1)

kaiju_taxid = {}
kaiju_species = {}

Expand Down

0 comments on commit b73fe7d

Please sign in to comment.