mothur

Make.fastq giving error (unable to create fastq file)

Dear All,
I am not able to merge fasta and qual files. Please check the error message given below. I am also attaching the dropbox links of files. Thanks in advance


Regards,
Dinesh

make.fastq(fasta=/Volumes/DineshMac2/miseq-iitdata12sep/Philip_5285B.F2_MS515_909.fasta, qfile=/Volumes/DineshMac2/miseq-iitdata12sep/Philip_5285B.F2_MS515_909.qual)

[ERROR]: In sequence F2-MS515-909__M02696_105_000000000-BC8FK_1_2102_9983_2967’s quality scores, expected a number and got >F2-MS515-909::M02696:105:000000000-BC8FK:1:2114:12482:12195, setting score to 0.

[ERROR]: In sequence F2-MS515-909__M02696_105_000000000-BC8FK_1_2101_5687_21979’s quality scores, expected a number and got >F2-MS515-909::M02696:105:000000000-BC8FK:1:2101:5672:21992, setting score to 0.

[ERROR]: sequence name does not match quality score name. Found sequence named F2-MS515-909__M02696_105_000000000-BC8FK_1_2114_12482_12195 quality scores named F2-MS515-909__M02696_105_000000000-BC8FK_1_2101_5687_21979 Cannot construct fastq object.

Thanks for reporting this issue. Mothur is having some trouble reading the quality file. Here’s a workaround:

mothur > list.seqs(fasta=/Volumes/DineshMac2/miseq-iitdata12sep/Philip_5285B.F2_MS515_909.fasta) - list sequences present in the fasta file

mothur > get.seqs(qfile=/Volumes/DineshMac2/miseq-iitdata12sep/Philip_5285B.F2_MS515_909.qual) - select sequences from the quality file that are present in the fasta file (should be all seqs)

mothur > make.fastq(fasta=current, qfile=current) - assemble fastq file from fasta and qual files.

Dear All

I faced the same problem as noted by Dinesh. I followed the steps suggested by Sara and could run only two steps without any problem as below. The third step is still giving the problem. Kindly advise how to resolve this issue as I ahve to prepare files for SRA submission.
Windows version

Using Boost

mothur v.1.46.1

Last updated: 9/1/21

mothur >
list.seqs(fasta=Tube1_S1_L001_R1_001.trim.contigs.fasta)

Output File Names:
Tube1_S1_L001_R1_001.trim.contigs.accnos

mothur >
get.seqs(qfile=Tube1_S1_L001_R1_001.trim.contigs.qual)
Using Tube1_S1_L001_R1_001.trim.contigs.accnos as input file for the accnos parameter.
Selected 19844691 sequences from your quality file.

Output File Names:
Tube1_S1_L001_R1_001.trim.contigs.pick.qual

mothur > make.fastq(fasta=Tube1_S1_L001_R1_001.trim.contigs.fasta, qfile=Tube1_S1_L001_R1_001.trim.contigs.pick.qual)

ERROR]: sequence name does not match quality score name. Found sequence named M02034__420_000000000-CB46P_1_2112_12482_17061_20990 quality scores named M02034_420_000000000-CB46P_1_2115_22769_5338 Cannot construct fastq object.

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

Thank you Sarah for a detailed explanation. I will follow the suggestions given by you.

Sincerely
Gurdeep