# HUMAnN3 Diamond tmp file doesnt exist

**URL:** <https://forum.biobakery.org/t/humann3-diamond-tmp-file-doesnt-exist/560>\
**Category:** HUMAnN\
**Created:** [June 10, 2020, 7:02pm UTC](https://forum.biobakery.org/t/humann3-diamond-tmp-file-doesnt-exist/560 "2020-06-10T19:02:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aimirza](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aimirza/32/499_2.png) [@aimirza](https://forum.biobakery.org/u/aimirza)\
**Post date:** [June 10, 2020, 7:02pm UTC](https://forum.biobakery.org/t/humann3-diamond-tmp-file-doesnt-exist/560/1 "2020-06-10T19:02:41Z")

</div>

For only a couple of my samples, I got two error messages when Diamond was running. It seems that it cannot save the joined output blocks to the diamond tmp directory because the directory doesn’t exist. Should I simply create the directory and resume humann?

First:

```
06/10/2020 05:27:39 AM - humann.utilities - CRITICAL: Error executing: /home/CSCScience.ca/amirza/miniconda3/envs/biobakery3/bin/diamond blastx --query /Drives/W/Projects/Project_Tremlett_lab/MetagenomicMSPeds/biobakery/humann3/main-2/HSC-10099-HC-01_S8_humann_temp/HSC-10099-HC-01_S8_bowtie2_unaligned.fa --evalue 1.0 --threads 8 --top 1 --outfmt 6 --db /home/CSCScience.ca/amirza/biobakery_databases/humann2/uniref/uniref90_201901 --out /Drives/W/Projects/Project_Tremlett_lab/MetagenomicMSPeds/biobakery/humann3/main-2/HSC-10099-HC-01_S8_humann_temp/tmpap8y90uh/diamond_m8_2_azlphp --tmpdir /Drives/W/Projects/Project_Tremlett_lab/MetagenomicMSPeds/biobakery/humann3/main-2/HSC-10099-HC-01_S8_humann_temp/tmpap8y90uh

Error message returned from diamond :
diamond v0.9.24.125 | by Benjamin Buchfink <buchfink@gmail.com>
Licensed under the GNU GPL <https://www.gnu.org/licenses/gpl.txt>
Check http://github.com/bbuchfink/diamond for updates.

```

Then Diamond runs and fails to join output blocks:

```
Building seed filter... [0.611389s]
Searching alignments... [44.898s]
Deallocating buffers... [0.033879s]
Opening temporary output file... [0.076705s]
Computing alignments... [63.8764s]
Deallocating reference... [0.009413s]
Loading reference sequences... [0.041094s]
Deallocating buffers... [0.015319s]
Joining output blocks... Bad file descriptor
 [0.005746s]
Error: Error writing file /Drives/W/Projects/Project_Tremlett_lab/MetagenomicMSPeds/biobakery/humann3/main-2/HSC-10099-HC-01_S8_humann_temp/tmpap8y90uh/diamond-tmp-85U4Ua

06/10/2020 05:27:39 AM - humann.utilities - CRITICAL: TRACEBACK:
Traceback (most recent call last):
  File "/home/CSCScience.ca/amirza/miniconda3/envs/biobakery3/lib/python3.7/site-packages/humann/utilities.py", line 734, in execute_command
    p_out = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File "/home/CSCScience.ca/amirza/miniconda3/envs/biobakery3/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/home/CSCScience.ca/amirza/miniconda3/envs/biobakery3/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/CSCScience.ca/amirza/miniconda3/envs/biobakery3/bin/diamond', 'blastx', '--query', '/Drives/W/Projects/Project_Tremlett_lab/MetagenomicMSPeds/biobakery/humann3/main-2/HSC-10099-HC-01_S8_humann_temp/HSC-10099-HC-01_S8_bowtie2_unaligned.fa', '--evalue', '1.0', '--threads', '8', '--top', '1', '--outfmt', '6', '--db', '/home/CSCScience.ca/amirza/biobakery_databases/humann2/uniref/uniref90_201901', '--out', '/Drives/W/Projects/Project_Tremlett_lab/MetagenomicMSPeds/biobakery/humann3/main-2/HSC-10099-HC-01_S8_humann_temp/tmpap8y90uh/diamond_m8_2_azlphp', '--tmpdir', '/Drives/W/Projects/Project_Tremlett_lab/MetagenomicMSPeds/biobakery/humann3/main-2/HSC-10099-HC-01_S8_humann_temp/tmpap8y90uh']' returned non-zero exit status 1.
```

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [June 24, 2020, 3:16pm UTC](https://forum.biobakery.org/t/humann3-diamond-tmp-file-doesnt-exist/560/2 "2020-06-24T15:16:59Z")

</div>

Sorry for the delay - I haven’t seen this before. It looks like it might be a problem with reading/writing to the disk you’re working with.

---

<div class="post-metadata">

**Author:** ![aimirza](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aimirza/32/499_2.png) [@aimirza](https://forum.biobakery.org/u/aimirza)\
**Post date:** [June 25, 2020, 2:53am UTC](https://forum.biobakery.org/t/humann3-diamond-tmp-file-doesnt-exist/560/3 "2020-06-25T02:53:10Z")

</div>

Simply starting over solved the problem.
