# Diamond error：Disk full

**URL:** <https://forum.biobakery.org/t/diamond-error-disk-full/525>\
**Category:** HUMAnN\
**Created:** [May 29, 2020, 12:19am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525 "2020-05-29T00:19:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfgui](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@wfgui](https://forum.biobakery.org/u/wfgui)\
**Post date:** [May 29, 2020, 12:19am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/1 "2020-05-29T00:19:34Z")

</div>

I use conda install humann2( version 2.8.1).Now I’m have some problems with diamond(version 0.8.22) on HPC-cluster:

```auto
Searching alignments... terminate called after throwing an instance of 'File_write_exception'
  what(): Error writing file /public/home/gaoxuefeng/test/p136C_3/p136C_R12_humann2_temp/tmp0UOuOq/diamond-5ed12556-174.tmp. Disk full?
terminate called recursively
terminate called recursively
terminate called recursively

```

The problem seems to be solved by this way:[bbuchfink/diamond#73 (comment)](https://github.com/bbuchfink/diamond/issues/73#issue-178049961)

I want to know how to modify the script parameters of the diamond.

Thanks!

---

<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:** [May 29, 2020, 2:10am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/2 "2020-05-29T02:10:35Z")

</div>

The DIAMOND temp is being written under the HUMAnN temp folder, which is written wherever you tell HUMAnN to place its outputs. Can you save the HUMAnN output (including temp) to a location with more disk space while it is running?

The recently announced HUMAnN 3.0 alpha also includes a new flag (`--diamond-options`) that lets you pass arbitrary arguments to the DIAMOND binary (if you’d rather tune DIAMOND’s operation that way).

---

<div class="post-metadata">

**Author:** ![wfgui](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@wfgui](https://forum.biobakery.org/u/wfgui)\
**Post date:** [May 29, 2020, 2:29am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/3 "2020-05-29T02:29:30Z")

</div>

Thank u help me,the disk has enough space（\>1TB），log file：

```auto
CRITICAL ERROR: Error executing: /public/home/myuser/anaconda3/envs/humann2/bin/diamond blastx --query /public/home/test/p136C_3/p136C_R12_humann2_temp/p136C_R12_bowtie2_unaligned.fa --evalue 1.0 --threads 48 --max-target-seqs 20 --outfmt 6 --db /public/home/myuser/Database/humann2/uiref90_full/uniref90_annotated.1.1 --out /public/home/myuser/test/p136C_3/p136C_R12_humann2_temp/tmp1RgPjH/diamond_m8_tohBRL --tmpdir /public/home/myuser/test/p136C_3/p136C_R12_humann2_temp/tmp1RgPjH

```

when I run this command,the work is normal：

```auto
diamond blastx --query /public/home/test/p136C_3/p136C_R12_humann2_temp/p136C_R12_bowtie2_unaligned.fa --evalue 1.0 --threads 48 --max-target-seqs 20 --outfmt 6 --db /public/home/myuser/Database/humann2/uiref90_full/uniref90_annotated.1.1 --out /public/home/myuser/test/p136C_3/p136C_R12_humann2_temp/tmp1RgPjH/diamond_m8_tohBRL --tmpdir /dev/shm

```

Thanks~  
[humann2-diamond.csv](https://forum.biobakery.org/uploads/short-url/ggB6Rq8J9GKXrjyWlQRlA6QJrsv.csv) (4.0 KB)

---

<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:** [May 29, 2020, 2:51am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/4 "2020-05-29T02:51:16Z")

</div>

`/dev/shm` is a location in memory rather than a hard disk, so it seems like there is an issue with writing to the disk while diamond is running. Maybe it can’t handle 48 threads trying to write at the same time? If you have enough memory to write temp files to `/dev/shm` (and/or store databases there) it can definitely increase efficiency.

---

<div class="post-metadata">

**Author:** ![wfgui](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@wfgui](https://forum.biobakery.org/u/wfgui)\
**Post date:** [May 29, 2020, 3:11am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/5 "2020-05-29T03:11:16Z")

</div>

I used 1 thread, but the problem remained. It could be a problem of a computer cluster.I used higher version(0.9.34) of diamond ，work is normal:

```auto
diamond blastx --query /public/home/myuser/test/p136C_3/p136C_R12_humann2_temp/p136C_R12_bowtie2_unaligned.fa --evalue 1.0 --threads 48 --max-target-seqs 20 --outfmt 6 --db /public/home/myuser/Database/humann2/uiref90_full/uniref90_annotated.1.1 --out /public/home/myuser/test/p136C_3/p136C_R12_humann2_temp/tmp1RgPjH/diamond_m8_tohBRL --tmpdir --tmpdir /public/home/myuser/test/p136C_3/p136C_R12_humann2_temp/tmp1RgPjH --threads 48 --no-unlink

```

I will try HUMAnN 3.0,  
Thanks~

---

<div class="post-metadata">

**Author:** ![wujiafa9](https://avatars.discourse-cdn.com/v4/letter/w/b5ac83/32.png) [@wujiafa9](https://forum.biobakery.org/u/wujiafa9)\
**Post date:** [June 23, 2020, 6:13am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/6 "2020-06-23T06:13:46Z")

</div>

hello, could you tell me how to change diamond version to 0.9.34

---

<div class="post-metadata">

**Author:** ![wfgui](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@wfgui](https://forum.biobakery.org/u/wfgui)\
**Post date:** [June 24, 2020, 12:51am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/7 "2020-06-24T00:51:02Z")

</div>

You can use diamond(version 0.8.22) to get the database in fasta format and then use latest version(version 0.9.34) to bulid a new database,eg:

```auto
#version 0.8.22
diamond getseq -db uniref90_annotated_1_1.dmnd > uniref90.fasta

#version 0.9.34
diamond makedb --db uniref90.fasta uniref90_annotated_1_1_0.9.34 --in uniref90.fasta

```

---

<div class="post-metadata">

**Author:** ![wujiafa9](https://avatars.discourse-cdn.com/v4/letter/w/b5ac83/32.png) [@wujiafa9](https://forum.biobakery.org/u/wujiafa9)\
**Post date:** [June 25, 2020, 4:45am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/8 "2020-06-25T04:45:28Z")

</div>

thanks a lot. But when I used your method. another error occured. 🤣

Computing alignments… No such file or directory  
[0.001s]  
Error: Error writing file /public/home/nx\_lfs/metaphlan2\_analysis/demo\_fastq2/demo\_humann2\_temp/tmpZuEC[demo.txt](https://forum.biobakery.org/uploads/short-url/cerwcdixGGQesGY8PDcLUn1FZiu.txt) (11.7 KB) Nb/diamond-tmp-PTc5Iq

---

<div class="post-metadata">

**Author:** ![wfgui](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@wfgui](https://forum.biobakery.org/u/wfgui)\
**Post date:** [June 28, 2020, 11:26am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/9 "2020-06-28T11:26:36Z")

</div>

I not sure what happened，but you can try this：find this file：`translated.py`(may be :/public/home/nx\_lfs/anaconda2/envs/metagenome\_env/lib/python2.7/site-packages/humann2/search/translated.py)，then add a parameter (–`no-unlink`) on line 205，such as:

 ![1](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/b1196fe140819ef6948cea3f3d782cd1083ba4b0.png)  
Good luck.

---

<div class="post-metadata">

**Author:** ![PRATIK\_SHINDE](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/pratik_shinde/32/287_2.png) [@PRATIK\_SHINDE](https://forum.biobakery.org/u/PRATIK_SHINDE)\
**Post date:** [July 27, 2021, 1:26pm UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/10 "2021-07-27T13:26:46Z")

</div>

@wfgui Did you find the solution to the ‘File\_write\_exception’, I am trying it with Humann3 and facing same issue. @franzosa --diamond-options command is not recognized by humann3 and throws error expected one argument

this is my command

humann -i /media/drkksharma/EUNI/AM15\_merged.fastq --threads 2 --input-format fastq --memory-use minimum --search-mode uniref90 -o /media/drkksharma/EUNI/humann3 --diamond-options ‘–no-unlink’

---

<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:** [July 27, 2021, 7:19pm UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/11 "2021-07-27T19:19:49Z")

</div>

`--diamond-options` should be fine. It looks like you have a special dash character in the flag you are passing to diamond. I would format as `--diamond-options "--no-unlink"` (note: I have not tested this option, I’m just saying it is syntactically OK).

---

<div class="post-metadata">

**Author:** ![PRATIK\_SHINDE](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/pratik_shinde/32/287_2.png) [@PRATIK\_SHINDE](https://forum.biobakery.org/u/PRATIK_SHINDE)\
**Post date:** [July 28, 2021, 9:09am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/12 "2021-07-28T09:09:51Z")

</div>

Used this format too… does not recognize the command, only recognizes --top and --outfmt, previously humann3 gave me SIgnal 9 and killed process so I changed my database and sample location to external harddrive(4TB, 3.0USB) and thats why reduced the threads to 4 and now I get the error signal 6  
CRITICAL ERROR: Error executing: /home/drkksharma/anaconda3/envs/biobakery\_env/bin/diamond blastx --query /media/drkksharma/EUNI/humann3/AM15\_merged\_humann\_temp/AM15\_merged\_bowtie2\_unaligned.fa --evalue 1.0 --threads 4 --top 1 --outfmt 6 --db /media/drkksharma/EUNI/biobakery\_database/humann3\_db/uniref\_90/uniref/uniref90\_201901b\_full --out /media/drkksharma/EUNI/humann3/AM15\_merged\_humann\_temp/tmpgau6xjo6/diamond\_m8\_z54f8ga9 --tmpdir /media/drkksharma/EUNI/humann3/AM15\_merged\_humann\_temp/tmpgau6xjo6

Error message returned from diamond :  
diamond v0.9.36.137 (C) Max Planck Society for the Advancement of Science  
Documentation, support and updates available at [http://www.diamondsearch.org](http://www.diamondsearch.org)

#CPU threads: 4  
Scoring parameters: (Matrix=BLOSUM62 Lambda=0.267 K=0.041 Penalties=11/1)  
Temporary directory: /media/drkksharma/EUNI/humann3/AM15\_merged\_humann\_temp/tmpgau6xjo6  
Opening the database… [0.786s]  
Percentage range of top alignment score to report hits: 1  
Reference = /media/drkksharma/EUNI/biobakery\_database/humann3\_db/uniref\_90/uniref/uniref90\_201901b\_full.dmnd  
Sequences = 87296736  
Letters = 29247941583  
Block size = 2000000000  
Opening the input file… [0.021s]  
Opening the output file… [0s]  
Loading query sequences… [25.683s]  
Masking queries… [29.667s]  
Building query seed set… [0.078s]  
Algorithm: Double-indexed  
Building query histograms… [6.307s]  
Allocating buffers… [0s]  
Loading reference sequences… [19.536s]  
Masking reference… [23.676s]  
Initializing temporary storage… [0s]  
Building reference histograms… [9.063s]  
Allocating buffers… [0s]  
Processing query block 0, reference block 0, shape 0, index chunk 0.  
Building reference seed array… [6.574s]  
Building query seed array… [4.717s]  
Computing hash join… [2.771s]  
Building seed filter… [0.137s]  
Searching alignments… [20.008s]  
Processing query block 0, reference block 0, shape 0, index chunk 1.  
Building reference seed array… [7.853s]  
Building query seed array… [5.52s]  
Computing hash join… [2.743s]  
Building seed filter… [0.137s]  
Searching alignments… [19.418s]  
Processing query block 0, reference block 0, shape 0, index chunk 2.  
Building reference seed array… [8.334s]  
Building query seed array… [5.848s]  
Computing hash join… [2.699s]  
Building seed filter… [0.136s]  
Searching alignments… Input/output error  
terminate called after throwing an instance of ‘File\_write\_exception’  
what(): Error writing file /media/drkksharma/EUNI/humann3/AM15\_merged\_humann\_temp/tmpgau6xjo6/diamond-tmp-qw3o19

---

<div class="post-metadata">

**Author:** ![PRATIK\_SHINDE](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/pratik_shinde/32/287_2.png) [@PRATIK\_SHINDE](https://forum.biobakery.org/u/PRATIK_SHINDE)\
**Post date:** [July 28, 2021, 9:57am UTC](https://forum.biobakery.org/t/diamond-error-disk-full/525/13 "2021-07-28T09:57:47Z")

</div>

I ran humann\_test --run-functional-tests-end-to-end, and one test failed.

## FAIL: test\_humann\_fastq\_biom\_output\_pathways (functional\_tests\_biom\_humann.TestFunctionalHumannEndtoEndBiom) Test the standard humann flow on a fastq input file

Traceback (most recent call last):  
File “/home/drkksharma/anaconda3/envs/biobakery\_env/lib/python3.7/site-packages/humann/tests/functional\_tests\_biom\_humann.py”, line 56, in test\_humann\_fastq\_biom\_output\_pathways  
self.assertEqual(pathways\_found,cfg.expected\_demo\_output\_files\_biom\_pathways)  
AssertionError: Items in the second set but not the first:  
‘PWY-6305’  
‘PWY-5173’  
‘PWY490-3’
