Make.contigs - error but command completes

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

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.

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!

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

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.

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

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.