For SOLiD reads, BWA converts the reference genome to dinucleotide ‘color’ sequence and builds the BWT index for the color genome. Reads are mapped in the color space where the reverse complement of a sequence is the same as the reverse, because the complement of a color is itself. For SOLiD paired-end mapping, a read pair is said to be in the correct orientation if either of the two scenarios is true: (i) both ends mapped to the forward strand of the genome with the R3 read having smaller coordinate; and (ii) both ends mapped to the reverse strand of the genome with the F3 read having smaller coordinate. Smith–Waterman alignment is also done in the color space.
After the alignment, BWA decodes the color read sequences to the nucleotide sequences using dynamic programming. Given a nucleotide reference subsequence b1b2bl+1 and a color read sequence c1c2cl mapped to the subsequence, BWA infers a nucleotide sequence such that it minimizes the following objective function:

where q′ is the Phred-scaled probability of a mutation, qi is the Phred quality of color ci and function g(b, b′)=g(b′, b) gives the color corresponding to the two adjacent nucleotides b and b′. Essentially, we pay a penalty q′ if and a penalty qi if .
This optimization can be done by dynamic programming because the best decoding beyond position i only depends on the choice of . Let be the best decoding score up to i. The iteration equations are


BWA approximates base qualities as follows. Let . The i-th base quality , i=2…l, is calculated as:

BWA outputs the sequence and the quality as the final result for SOLiD mapping.