Mothur expects the files to contain the same sequences in the same order. It looks like your files have some mismatches. More importantly, from the look of your input filenames, you are trying to create a fastq file using the qual output from the make.contigs command. It is important to note that the assembled quality scores outputted by mothur cannot be used for downstream quality screening. The score calculations are modeled after pandseq’s method. Here’s a link to the explanation from their documentation, GitHub - neufeld/pandaseq: PAired-eND Assembler for DNA sequences.
To resolve file mismatches you can use the following commands:
mothur > list.seqs(fasta=Tube1_S1_L001_R1_001.trim.contigs.fasta) - list sequences in the fasta file
mothur > get.seqs(qfile=Tube1_S1_L001_R1_001.trim.contigs.qual, accnos=current) - select sequences present in the fasta file from the qual file
At this point you may still have sequences in the fasta file that are not in the qual file. This can happen when the qual file is missing reads present in the fasta file. Unfortunately the list.seqs command does not include the qfile parameter. So you can’t list the sequences in the qual file and then select them from the fasta file. You will have to remove any missing reads manually. I will add the qfile option in the list.seqs command to our features list for version 1.47.0. Let’s assume you are not missing reads from the qual file. Continue with this:
mothur > sort.seqs(fasta=current, qfile=current) - sorts sequences in the order of the fasta file.
mothur > make.fastq(fasta=current, qfile=current) - create fastq file from sorted files