# Make.contigs - error but command completes

**URL:** <https://forum.mothur.org/t/make-contigs-error-but-command-completes/2928>\
**Category:** Commands in mothur\
**Created:** [July 21, 2016, 8:54pm UTC](https://forum.mothur.org/t/make-contigs-error-but-command-completes/2928 "2016-07-21T20:54:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![steph43](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@steph43](https://forum.mothur.org/u/steph43)\
**Post date:** [July 21, 2016, 8:54pm UTC](https://forum.mothur.org/t/make-contigs-error-but-command-completes/2928/1 "2016-07-21T20:54:39Z")

</div>

Hi All,

I am trying to use mothur to run analysis of a set of community samples. I have paired end reads for multiple samples in \*.fastq format. I am getting an error message “Error opening file: No such file or directory” while running make.contigs, but make.contigs still runs and this this message doesn’t seem to be related to any of the input files I’m using.

Details:

I’m using make.contigs to combine the forward and reverse reads, with the oligos option to trim off primer sequences. The command I’m running is:

mothur \> make.contigs(file=fonseca.files, oligos=fon.contigs.oligos, checkorient=T, processors=20)

fonseca.files is in 3-column format, with sample ID in the first column, location of the forward fastq file in the second column and location of the reverse fastq file in the third column, as so:

FA3\_N3\_0.5 ~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R1.Fonseca.fastq ~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R2.Fonseca.fastq  
FA3\_N3\_0.2 ~/NIGHT\_TOW\_Fonseca\_Machida12S/1B\_S2/R1.Fonseca.fastq ~/NIGHT\_TOW\_Fonseca\_Machida12S/1B\_S2/R2.Fonseca.fastq …

My oligos file is formatted as follows (sequences were previously demultiplexed using both reverse and forward primers, so some have the forward primer left and some of the reverse primer left):

primer GCTTGTCTCAAAGATTAAGCC NONE V3  
primer NONE GCCTGCTGCCTTCCTTGGA V3

I have tried running make.contigs without the oligos option, without checkorient, with only 1 processor, and with direct input of the forward/reverse files (rather than the \*.files option). None of these make any difference. When I change the input reference to an incorrect file (or one that doesn’t exist), the error message changes to “Unable to open _incorrect file name_ [ERROR]: did not complete make.contigs”.

I noted in the MiSeq SOP that make.contigs first processes the fastq files to generate individual fasta and qual files, then makes contigs from these intermediate files. This leads me to believe that the error is due to some internal intermediate file. Can anybody corroborate this theory? Or is there some simple input I’m missing?

I am running this on my university’s computing cluster using a slurm scheduler. Is it possible that intermediate files are being placed in a different directory and mothur cannot find them?

Below is the output from running the command:

mothur \> make.contigs(ffastq=~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R1.Fonseca.fastq, rfastq=~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R2.Fonseca.fastq)

Using 1 processors.  
Error opening file: No such file or directory  
Making contigs…  
1000  
2000  
3000  
4000  
5000  
6000  
7000  
8000  
9000  
10000  
11000  
12000  
13000  
14000  
15000  
16000  
17000  
18000  
19000  
20000  
21000  
22000  
23000  
24000  
25000  
26000  
27000  
28000  
29000  
30000  
31000  
32000  
33000  
34000  
35000  
36000  
37000  
38000  
39000  
40000  
41000  
42000  
43000  
44000  
45000  
46000  
47000  
48000  
49000  
50000  
51000  
52000  
53000  
54000  
55000  
56000  
57000  
58000  
59000  
60000  
61000  
62000  
63000  
64000  
65000  
65811  
Done.  
It took 71 secs to process 65811 sequences.

Output File Names:  
~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R1.Fonseca.trim.contigs.fasta  
~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R1.Fonseca.scrap.contigs.fasta  
~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R1.Fonseca.trim.contigs.qual  
~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R1.Fonseca.scrap.contigs.qual  
~/NIGHT\_TOW\_Fonseca\_Machida12S/1A\_S1/R1.Fonseca.contigs.report

---

<div class="post-metadata">

**Author:** ![steph43](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@steph43](https://forum.mothur.org/u/steph43)\
**Post date:** [July 22, 2016, 4:25am UTC](https://forum.mothur.org/t/make-contigs-error-but-command-completes/2928/2 "2016-07-22T04:25:44Z")

</div>

Some updated information:

I contacted the help desk for my computing cluster, and they suggested verifying that the temp folder used by mothur has write permissions for users. According to the wiki, the default temp folder is mothur’s executable location. I used set.dir to change the input, output, and tempdefault to the directory I launched mothur from. Rerunning the make.contigs command from the same instance of mothur did not fix the problem, I am still receiving “Error opening file: No such file or directory”, and the command still seems to create the contigs as before.

---

<div class="post-metadata">

**Author:** ![steph43](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@steph43](https://forum.mothur.org/u/steph43)\
**Post date:** [July 22, 2016, 8:34pm UTC](https://forum.mothur.org/t/make-contigs-error-but-command-completes/2928/3 "2016-07-22T20:34:09Z")

</div>

One more update:

I installed mothur on my local machine and ran a subset of samples on both my local machine and on my university computer cluster. The analysis on the local machine does not give any error messages. I compared the outputs of the two analyses and they are identical.

This must be an issue with compatibility between the computing cluster I am using and the mothur program. I would still like to be able to track where the error message is originating from (i.e. what files are missing, and how might this affect downstream steps in the analysis?), but setting debug=t doesn’t give any additional information on the error.

I’m open to any suggestions on how to further troubleshoot this!

---

<div class="post-metadata">

**Author:** ![steph43](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@steph43](https://forum.mothur.org/u/steph43)\
**Post date:** [July 28, 2016, 6:53pm UTC](https://forum.mothur.org/t/make-contigs-error-but-command-completes/2928/4 "2016-07-28T18:53:25Z")

</div>

I found one instance of another user reporting a similar problem, except in trim.seqs:

[http://mothur.ltcmp.net/t/trim-seqs-error-opening-file/741/1](http://mothur.ltcmp.net/t/trim-seqs-error-opening-file/741/1)

Their error was due to a bug when run in the Windows OS. I am curious whether my problem in make.contigs may be due to a bug as well?

I am running on 64bit GNU/Linux, if that makes any difference.

---

<div class="post-metadata">

**Author:** ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)\
**Post date:** [July 29, 2016, 5:39pm UTC](https://forum.mothur.org/t/make-contigs-error-but-command-completes/2928/5 "2016-07-29T17:39:55Z")

</div>

Could you send an email to [mothur.bugs@gmail.com](mailto:mothur.bugs@gmail.com) referencing this post so I can look into the issue for you further?

---

<div class="post-metadata">

**Author:** ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)\
**Post date:** [August 2, 2016, 7:46pm UTC](https://forum.mothur.org/t/make-contigs-error-but-command-completes/2928/6 "2016-08-02T19:46:41Z")

</div>

Thanks for your help in finding this bug! The filename was not being fully expanded in a few places. I have resolved the issue and the fix will be part of our next release.
