mothur

Error in make.fastq command

Dear All

Kindly help me in resolving the issue with make.fastq command

I am running following command
Windows version

Using Boost

mothur v.1.46.1

Last updated: 9/1/21
mothur > make.fastq(fasta= Tube1_S1_L001_R1_001.trim.contigs.fasta, qfile= Tube1_S1_L001_R1_001.trim.contigs.qual)

ERROR]: sequence name does not match quality score name.Found sequence named …quality scores named … Cannot construct fastq object.

I can see the same error was reported earlier in the forum on April 2020 and Sarah has provided a way around to resolve the issue. I was thinking that maybe with the latest version the problem would have been resolved and I could simply use the straightforward approach, but this doesn’t seem to happen.
thank you
Gurdeep

Hi Gurdeep,
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

Kindly,
Sarah