# Qiime diversity alpha-rarefaction tmp directory error

**URL:** https://forum.qiime2.org/t/qiime-diversity-alpha-rarefaction-tmp-directory-error/5435
**Category:** User Support
**Tags:** pending-development
**Created:** [August 6, 2018, 10:04pm UTC](https://forum.qiime2.org/t/qiime-diversity-alpha-rarefaction-tmp-directory-error/5435 "2018-08-06T22:04:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hkiss](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/h/a8b319/32.png) [@hkiss](https://forum.qiime2.org/u/hkiss)
#### Post date: [August 6, 2018, 10:04pm UTC](https://forum.qiime2.org/t/qiime-diversity-alpha-rarefaction-tmp-directory-error/5435/1 "2018-08-06T22:04:28Z")

</div>

Hi, I am trying to run alpha rarefaction script with qiime2-2018.6 but I keep getting the following error.

Command:

```auto
export TMPDIR=/rhome/hkiss001/qiime2-tmp

qiime diversity alpha-rarefaction \
  --i-table ~/shared/LakeRing/analysis-results/16SEMP/featureTABLE/feature-table-2.qza \
  --i-phylogeny ~/shared/LakeRing/analysis-results/16SEMP/tree/reference-hit-seqs-aligned_masked-rooted-tree.qza \
  --p-max-depth 18431 \
  --p-min-depth 245 \
  --m-metadata-file ~/shared/LakeRing/qiime-files/mapping-files/mapping-file.tsv \
  --o-visualization ~/shared/LakeRing/analysis-results/16SEMP/diversityMETRICS/alpha-rarefaction.qzv \
  --verbose

```

Error:

```auto
Traceback (most recent call last):
  File "/rhome/hkiss001/.conda/envs/qiime2-2018.6/lib/python3.5/site-packages/q2cli/commands.py", line 274, in __call__
    results = action(**arguments)
  File "<decorator-gen-355>", line 2, in alpha_rarefaction
  File "/rhome/hkiss001/.conda/envs/qiime2-2018.6/lib/python3.5/site-packages/qiime2/sdk/action.py", line 232, in bound_callable
    output_types, provenance)
  File "/rhome/hkiss001/.conda/envs/qiime2-2018.6/lib/python3.5/site-packages/qiime2/sdk/action.py", line 429, in _callable_executor_
    ret_val = self._callable(output_dir=temp_dir, **view_args)
  File "/rhome/hkiss001/.conda/envs/qiime2-2018.6/lib/python3.5/site-packages/q2_diversity/_alpha/_visualizer.py", line 368, in alpha_rarefaction
    metric_name, c_df, column)
  File "/rhome/hkiss001/.conda/envs/qiime2-2018.6/lib/python3.5/site-packages/q2_diversity/_alpha/_visualizer.py", line 262, in _alpha_rarefaction_jsonp
    with open(os.path.join(output_dir, filename), 'w') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/bigdata/biklab/shared/tmp/qiime2-temp-e189kn4j/observed_otus-Alona_rectangula/guttata.jsonp'

Plugin error from diversity:

  [Errno 2] No such file or directory: '/bigdata/biklab/shared/tmp/qiime2-temp-e189kn4j/observed_otus-Alona_rectangula/guttata.jsonp'

See above for debug info.

```

To prevent the possible deletion of this file in the /tmp directory, I have set the TMPDIR to a permanent directory where space is not an issue with 'export TMPDIR=', but it results in the same error.

Do you have any suggestions on how to solve this error?

-Hannah

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [August 6, 2018, 10:24pm UTC](https://forum.qiime2.org/t/qiime-diversity-alpha-rarefaction-tmp-directory-error/5435/2 "2018-08-06T22:24:36Z")

</div>



---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [August 6, 2018, 10:25pm UTC](https://forum.qiime2.org/t/qiime-diversity-alpha-rarefaction-tmp-directory-error/5435/3 "2018-08-06T22:25:52Z")

</div>

It looks like you have bumped into a [known issue](https://github.com/qiime2/q2-diversity/issues/205) related to forward slashes `/` in metadata column names: `Alona_rectangula/guttata`. Drop the slash and you should be good to go.

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [August 6, 2018, 10:25pm UTC](https://forum.qiime2.org/t/qiime-diversity-alpha-rarefaction-tmp-directory-error/5435/4 "2018-08-06T22:25:57Z")

</div>



---

<div class="post-metadata">

### Author: ![hkiss](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/h/a8b319/32.png) [@hkiss](https://forum.qiime2.org/u/hkiss)
#### Post date: [August 7, 2018, 5:25pm UTC](https://forum.qiime2.org/t/qiime-diversity-alpha-rarefaction-tmp-directory-error/5435/5 "2018-08-07T17:25:05Z")

</div>

Thank you @thermokarst! The alpha rarefaction script was successful.  
-Hannah

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [September 7, 2018, 11:25pm UTC](https://forum.qiime2.org/t/qiime-diversity-alpha-rarefaction-tmp-directory-error/5435/6 "2018-09-07T23:25:10Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
