Bracken Command Not Found

Hello,

While running the read analysis section of the Qiime2 metagenomic analysis tutorial found here, I keep getting the following error:

`Plugin error from moshpit:

[Errno 2] No such file or directory: 'bracken'

Debug info has been saved to /var/folders/bc/p3c9l5mj1qn06pfqwpnw35rw0000gq/T/qiime2-q2cli-err-z5tq_rr4.log`

and when I peak into the debugging file it looks like the bracken command cannot be found while the kraken one can.

qiime2-metagenome-2024.10) jrabasc@phpmb48 tests % cat /var/folders/bc/p3c9l5mj1qn06pfqwpnw35rw0000gq/T/qiime2-q2cli-err-z5tq_rr4.log Running external command line application(s). This may print messages to stdout and/or stderr. The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: bracken -d /var/folders/bc/p3c9l5mj1qn06pfqwpnw35rw0000gq/T/qiime2/jrabasc/data/78cdef2b-953f-4e67-8e57-2ce95a0e6fc8/data -i /var/folders/bc/p3c9l5mj1qn06pfqwpnw35rw0000gq/T/qiime2/jrabasc/data/ddbeb4dd-2c43-42d0-8a45-9a5c1836276e/data/ERR1428213.fastq.gz.report.txt -o /var/folders/bc/p3c9l5mj1qn06pfqwpnw35rw0000gq/T/tmp283lzumn/ERR1428213.fastq.gz.bracken.output.txt -w /var/folders/bc/p3c9l5mj1qn06pfqwpnw35rw0000gq/T/qiime2/jrabasc/processes/55520-1734624741.919676@jrabasc/tmp/q2-OutPath-_hlcfzq7/ERR1428213.fastq.gz.report.txt -t 0 -r 100 -l S

Traceback (most recent call last): File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 530, in __call__ results = self._execute_action( File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 602, in _execute_action results = action(**arguments) File "<decorator-gen-698>", line 2, in estimate_bracken File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/site-packages/qiime2/sdk/action.py", line 299, in bound_callable outputs = self._callable_executor_( File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/site-packages/qiime2/sdk/action.py", line 570, in _callable_executor_ output_views = self._callable(**view_args) File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/site-packages/q2_moshpit/kraken2/bracken.py", line 172, in estimate_bracken table, reports = _estimate_bracken( File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/site-packages/q2_moshpit/kraken2/bracken.py", line 74, in _estimate_bracken bracken_table = _run_bracken_one_sample( File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/site-packages/q2_moshpit/kraken2/bracken.py", line 46, in _run_bracken_one_sample run_command(cmd=cmd, verbose=True) File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/site-packages/q2_moshpit/_utils.py", line 44, in run_command subprocess.run(cmd, check=True, **kwargs) File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/subprocess.py", line 503, in run with Popen(*popenargs, **kwargs) as process: File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/subprocess.py", line 971, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/lib/python3.10/subprocess.py", line 1863, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'bracken'

Any guidance on how to fix this would be much appreciated! Thanks so much!

2 Likes

Hey @jordenrabasco,

sorry to hear you've experienced issues while trying out MOSHPIT. We are more than happy to help but since the holiday season is just around the corner we won't be able to do that before January - sorry about that! In the meantime, could you please provide some details on how you created the conda environment where you are running those commands? Also, could you please share the output of the "qiime info" command? Thanks in advance - we will get back to you as soon as possible after the Christmas break!

Happy Holidays! :christmas_tree:

Michal

2 Likes

Hi @misialq,

No worries at all! I created the conda env using the installation instructions found here, and I installed the macOS (Apple Silicon) version of the metagenomic distribution, as I am using a machine with an M1 chip.

The output of QIIME info is below:
(qiime2-metagenome-2024.10) jrabasc@phpmb48 tests % qiime info System versions Python version: 3.10.14 QIIME 2 release: 2024.10 QIIME 2 version: 2024.10.1 q2cli version: 2024.10.1

Installed plugins assembly: 2024.10.0 composition: 2024.10.0 cutadapt: 2024.10.0 demux: 2024.10.0 diversity: 2024.10.0 diversity-lib: 2024.10.0 emperor: 2024.10.0 feature-classifier: 2024.10.0 feature-table: 2024.10.0 fondue: 2024.10.0 longitudinal: 2024.10.0 metadata: 2024.10.0 moshpit: 2024.10.0 quality-control: 2024.10.0 quality-filter: 2024.10.0 rescript: 2024.10.0 sample-classifier: 2024.10.0 sapienns: 2024.10.0 sourmash: 0.0.0 taxa: 2024.10.0 types: 2024.10.0 vizard: 0.0.1.dev0 vsearch: 2024.10.0

Application config directory /Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/var/q2cli

Config Config Source: /Users/jrabasc/miniconda3/envs/qiime2-metagenome-2024.10/etc/qiime2_config.toml

Getting help To get help with QIIME 2, visit https://qiime2.org To get help with configuring and/or understanding QIIME 2 parallelization, visit https://use.qiime2.org/en/latest/references/parallel-configuration.html

Let me know if you need any more information and happy holidays!

1 Like

Hey @jordenrabasco, happy New Year! :tada:

After some investigation (big thanks to @lizgehret!) it turned out that the version of Bracken for OSX which is available on conda does not provide the required functionality which we are using in the QIIME 2 action. Unfortunately, the only solution we can offer is to run that step on a Linux machine as there everything should be available. Until the developers of Bracken update their conda package we won't be able to do much about that :frowning: (we are going to update our documentation and the code to raise a more informative error, though).

Sorry for the inconvenience! Do let us know in case of any other questions :slight_smile:

Cheers,
Michal

5 Likes

Hey @misialq happy new year to you too!

No worries at all, I appreciate you looking into it!
I think I was able to find a work around by manually installing Bracken into the environment but am currently chasing down a residual error, before I can say that for sure.

best,

Jorden

3 Likes