faithpd-error -diversity metrics

Please read the following before posting!

(qiime2-amplicon-2023.9) shwethavasanth@DESKTOP-PC5QPNC:~/trial/Deblur$ qiime diversity core-metrics-phylogenetic \

--i-table feature-table-1.qza \
--i-phylogeny treerooted.qza \
--p-sampling-depth 1000 \
--m-metadata-file sample_metadata.tsv \
--output-dir diversity

Plugin error from diversity:

[Errno 8] Exec format error: 'faithpd'

Debug info has been saved to /tmp/qiime2-q2cli-err-z05u9_uc.log

Why am I getting this? I read other posts and none of them actually mentioned what they did exceot they reinstalled qiime2. for reference this is in wsl.

Shwetha

Hi @pavana14,

Can you please try re-running your command with the --verbose flag and copy/paste the results in your response?

Great job looking through the forum for a solution to your problem. Did you try any of the solutions those users implemented to resolve this? This one seems similar as they are having the same error on WSL.

-Hannah

3 Likes

Command:

faithpd -i /tmp/qiime2/shwethavasanth/data/2a308030-8dff-4fdf-9cc8-8bdd9ed20bfe/data/feature-table.biom -t /tmp/qiime2/shwethavasanth/data/68daca7b-6018-413a-8dea-a58aa0d52704/data/tree.nwk -o /tmp/q2-AlphaDiversityFormat-d4_zspgy

Traceback (most recent call last):
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 520, in call
results = self._execute_action(
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 586, in _execute_action
results = action(**arguments)
File "", line 2, in core_metrics_phylogenetic
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 647, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_diversity/_core_metrics.py", line 62, in core_metrics_phylogenetic
faith_pd_vector, = faith_pd(table=cr.rarefied_table,
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/context.py", line 140, in deferred_action
return action_obj._bind(
File "", line 2, in faith_pd
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in callable_executor
output_views = self._callable(**view_args)
File "", line 2, in faith_pd
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 69, in _disallow_empty_tables
return wrapped_function(*args, **kwargs)
File "", line 2, in faith_pd
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 112, in _validate_requested_cpus
return wrapped_function(*bound_arguments.args, **bound_arguments.kwargs)
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_diversity_lib/alpha.py", line 53, in faith_pd
_omp_cmd_wrapper(threads, cmd)
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 128, in _omp_cmd_wrapper
return _run_external_cmd(cmd, verbose=verbose, env=env)
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_diversity_lib/_util.py", line 122, in _run_external_cmd
return subprocess.run(cmd, check=True, env=env)
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/subprocess.py", line 493, in run
with Popen(*popenargs, **kwargs) as process:
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/shwethavasanth/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: 'faithpd'

Plugin error from diversity:

[Errno 8] Exec format error: 'faithpd'

See above for debug info.

@pavana14,
Thank you for the debug info.
Did you try any of the solutions from this post?
-Hannah

1 Like

There was one earlier this year

I was not able to parse through the post.

@pavana14,

Please try uninstalling and reinstalling your qiime environment using the WSL tutorial on how to install Qiime2. Here is the link: Installing QIIME 2 using WSL — QIIME 2 2023.9.2 documentation

-Hannah

Hi I did that before I sent you the message. I removed the previous installation and did everything from scratch

Great! can you try rerunning your commands that failed before using that added --verbose flag?

I see the binary and I don't know it can't read it.

@pavana14,
Please run faithpd and post a screenshot of your whole command and error message here. Also please check out this post for a possible solution: linux - cannot execute binary file: Exec format error for a binary compiled in WSL environment - Stack Overflow

Hi, yes, I did all that. That's when I emailed you. I followed most of the post. I will try to do it again.

Best
Shwetha

I removed conda and qiime2 and it still gives me an error. Seems like a recurrent error.

it says that I am using the wrong binary which is not true. Since I used WSL. Is there an alternate way to calculate metrics. I am new to microbiome analysis. It seems WSL has an issue witj qiime and viceversa.

Shwetha

Hi @pavana14,

We have plenty of users who use WSL for their Qiime2 analysis with no problems so that is not the issue here.
Can you please run file $(which faithpd_nv) in the command line and send me a screenshot of the output here?

-Hannah

This is what I got

@pavana14

When you say you followed most of the post:

Were you not able to follow some of the commands or did you get stuck at any point? Any details about that would be helpful.

Also, please try running, in Powershell (not the same terminal as your linux terminal),
wsl -l -v and post a screenshot of the output here. This command will tell us which WSL version you are on.

1 Like

An off-topic reply has been split into a new topic: issue running diversity with faith pd

Please keep replies on-topic in the future.