trim.seq error

I’m trying to run this command:
for i in *.fasta_temp;do mothur “#trim.seqs(fasta=$i,
qfile=${i%.fasta_temp}.fastq_temp, minlength=280, maxambig=0, maxhomop=8,
qwindowaverage=30, qwindowsize=50)”; done

But I’m having issues with the names of the reads, as it returns this
error:
mothur > trim.seqs(fasta=S2951_R2.fasta_temp, qfile=S2951_R2.fastq_temp,
minlength=280, maxambig=0, maxhomop=8, qwindowaverage=30, qwindowsize=50)

Using 1 processors.
M03033_30_000000000-AFEBD_1_1101_15725_1007 is in your fasta file and not
in your quality file, not using quality file.
Segmentation fault (core dumped)

But when I check the files, it is present in both files:

grep M03033_30_000000000-AFEBD_1_1101_15725_1007 S2951_R2.fasta_temp

M03033_30_000000000-AFEBD_1_1101_15725_1007 2_N_0_172
grep M03033_30_000000000-AFEBD_1_1101_15725_1007 S2951_R2.fastq_temp
@M03033_30_000000000-AFEBD_1_1101_15725_1007 2_N_0_172

My names had colons in them but I changed them to underscores, but the same
error remains.

Any help would be greatly appreciated

From your file name and the @ character, I suspect your qfile is not a quality file, but instead a fastq file.

S2951_R2.fastq_temp
grep M03033_30_000000000-AFEBD_1_1101_15725_1007 S2951_R2.fastq_temp
@M03033_30_000000000-AFEBD_1_1101_15725_1007 2_N_0_172

The fastq format looks like:

@M00178:4:000000000-A1AE6:1:1101:15103:1499 2:N:0:0
CCAACACGACACGAGCTGACGACAACCATGCAGCACCTCGCCAAAGA…
+
AA?AAAAADDDDDDDDGGGGGGHHHIHHIIIHIIIIIIIFHHHEHH-AFFHHC…


The quality file format looks like:

M00178_4_000000000-A1AE6_1_1101_15103_1499
32 32 32 32 32 30 32 33 35 35 35 35 27 33 30 33 38 37 37 37 37 36 39 39 37 34 …

Thanks Westcott, that was the issue.

Cheers!