alpha-rarefaction can't find temp file

Hello,

I've been running an analysis using version 2022.2 and I've randomly run into a problem with alpha rarefaction. I ran the command on a different dataset on July 6th without issue, so I'm not sure why I'm getting errors now (I have not installed/changed anything with the QIIME2 virtual environment).

Command:

qiime diversity alpha-rarefaction \
--i-table dada2_out_trimmed/table.qza \
--i-phylogeny aln_mask_tree/rooted_tree.qza \
--m-metadata-file mapping_IM.txt \
--p-max-depth 61320 \
--o-visualization vis_alpha_rare_all_61320.qzv

Error:

Plugin error from diversity:

  [Errno 2] No such file or directory: '/tmp/qiime2-temp-cq2at5x8/shannon-Race/Ethnicity.jsonp'

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

Log file:

Traceback (most recent call last):
  File "/home/saatkinson/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2cli/commands.py", line 339, in __call__
    results = action(**arguments)
  File "<decorator-gen-253>", line 2, in alpha_rarefaction
  File "/home/saatkinson/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/home/saatkinson/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 453, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/home/saatkinson/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_diversity/_alpha/_visualizer.py", line 398, in alpha_rarefaction
    _alpha_rarefaction_jsonp(output_dir, jsonp_filename,
  File "/home/saatkinson/anaconda3/envs/qiime2-2022.2/lib/python3.8/site-packages/q2_diversity/_alpha/_visualizer.py", line 272, in _alpha_rarefaction_jsonp
    with open(os.path.join(output_dir, filename), 'w') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/qiime2-temp-cq2at5x8/shannon-Race/Ethnicity.jsonp'

Any help determining why the shannon temp file can't be found/made this time would be greatly appreciated!

Thanks,
Samantha

P.S. I just reran the command that worked a few weeks ago and it finished without issue:

qiime diversity alpha-rarefaction \
--i-table dada2_out_trimmed/table.qza \ #different table from command above
--i-phylogeny aln_mask_tree/rooted_tree.qza \ #different tree from above
--m-metadata-file mapping_file.txt \
--p-max-depth 60101 \
--o-visualization vis_alpha_rare_all_60101_test.qzv

Hi @saatkinson ,
By any chance do you have a metadata column called Race/Ethnicity?

This error sounds similar to here:

You can rename the column(s) to remove all slashes (/)... this could also be why the command worked a few weeks ago but does not now, if the metadata file was modified.

Good luck!

Sorry, I looked for similar errors, but was apparently to specific to alpha rarefaction. There was indeed a metadata column called Race/Ethnicity (the slash snuck by me). I didn't realize the error was referring to a column name. Changing to Race_Ethnicity fixed the problem!

Thanks for your help!
~Samantha

1 Like