I am running bowtie2 for mate pairs specifying this parameter:

    bowtie2 --local --phred64  --threads 25 -x "rest of the command"

It gives me this error:

```
Saw ASCII character -126 but expected 64-based Phred qual.
Try not specifying --solexa1.3-quals/--phred64-quals.
terminate called after throwing an instance of 'int'
bowtie2-align died with signal 6 (ABRT)
```

I removed the parameter `--phred64`, but it gives another error:

```
Saw ASCII character -126 but expected 33-based Phred qual.
terminate called after throwing an instance of 'int'
bowtie2-align died with signal 6 (ABRT)
```

Any idea?

Thanks
I struggled also several times with this kind of problem. Somehow (I don't know why) you may have a non-ascii character in your fastq file. 

And for some reason (which I also don't know) bowtie2 explains that it has the ascii code "-126" which does not exist, as all ascii signs have to be positive. 

It is relatively likely that you have non-ascii character in your quality lines of your fastq file.

You can search for a line containing a non-ascii character by using the following commands. If the file is gziped use this:
<code>
zcat FILE.fastq.gz | perl -e '$line = 1; while (<>) {if(/[^[:ascii:]]/) {print "LINE: $line\n$_";} $line++;}'
</code>

Otherwise this:
<code>
perl -e '$line = 1; while (<>) {if(/[^[:ascii:]]/) {print "LINE: $line\n$_";} $line++;}' -f FILE.fastq
</code>

Let's say you received such an output: <br />
<code>
LINE: 21410096<br />
CCCCCGGGGGGGGGG�GGGG
</code>

You non-ascii sign will be depicted as this question-mark symbol.

After receiving the responsible line you can "enlarge" the "surrounding area" by using sed:
<code>
sed -n '21410093,21410096p' FILE.fastq
</code>

So we got something like this as an output:<br />
<code>
@sequence HEADER<br />
CTGGCTGGGAAGGGGCTGGCT<br />
+quality HEADER<br />
CCCCCGGGGGGGGGG�GGGG
</code>

Such an corrupted entry can easily be removed by using sed. In this case the corrupted read was located at the lines
21410093 to 21410096, so the following command will work:
<br />
<code>
sed -n '21410093,21410096d' Fasta.fastq > repaired.fastq
</code>

This would be problematic if you have paired-end reads. Either remove the read entry at the same position in the corresponding fastq file, or replace the corrupting character in you initial fastq file. I would prefer the latter:

This can be done by using sed:
<br \>
<code>
sed '21410096s/CCCCCGGGGGGGGGG�GGGG/CCCCCGGGGGGGGGGIGGGGG' FILE.fastq >FILE.repaired.fastq
</code>

(actually I'm surprised that this one worked). 

I hope this helps.