This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Aligning Colorspace Reads Using Bwa

I have about 100 million reads from a SOLiD run. I am trying to align them using bwa and I got 0 alignments. What am I doing wrong here? Here are the commands that I am using

~/software/bwa-0.5.9/bwa aln -n 6 -t 6 -o 2 -c ~/genomes/hsap/hg19.fa sampleTF5.fastq.gz    
~/software/bwa-0.5.9/bwa samse ~/genomes/hsap/hg19.fa sampleTF5.sai sampleTF5.fastq.gz |samtools view -bS -|samtools sort - sampleTF5

About 40% of the reads align using Bioscope so I know that at least some reads should align. The index was created using -c so it is a colorspace index.

ETA: Couple of reads from the fastq file

@853_2_23
T10201001101112312122022330313023.22201032232203002
+
.06%8+23,-/,740&+2,&(*+&26%&%'';!%'(&)':2((,,-'%(.
@853_2_76
T00221112202322220011002232000222000212301132232001
+
&<*(%'?'&'&5)*'%%%&('-'(()-')&)&%)*'/%%&%'%(%&&'&%
bwa alignment solid

what do your reads look like? did you use solid2fastq.pl?

Yes, I used solid2fastq.pl. The reads are 50 bp long colorspace reads. The quality statistics looked okay with FASTQC.

@853_2_23 T10201001101112312122022330313023.22201032232203002 + .06%8+23,-/,740&+2,&(+&26%&%'';!%'(&)':2((,,-'%(. @853_2_76 T00221112202322220011002232000222000212301132232001 + &<(%'?'&'&5)'%%%&('-'(()-')&)&%)'/%%&%'%(%&&'&%

@853_2_23 T10201001101112312122022330313023.22201032232203002 + .06%8+23,-/,740&+2,&(+&26%&%'';!%'(&)':2((,,-'%(. @853_2_76 T00221112202322220011002232000222000212301132232001 + &<(%'?'&'&5)'%%%&('-'(()-')&)&%)'/%%&%'%(%&&'&%

2 answers

I found the solution to this and Alastair's link helped. Apparently bwa needs the fastq files to be 'double encoded'. Thus, you have to rewrite the colorspace fastq with tr/0123./ACGTN/ to get bwa to work. I am adding the solution here just in case others run into this issue too.

You may need the -a bwtsw option. Check out this thread on SeqAnswers for further information

EDIT: 2016

bwa does not seems to support colorspace from version 0.6 onwards. The last version I am aware of that worked was 0.5.1.

I would suggest looking at BFAST, shrimp or novoalignCS but I have not needed to use colorspace reads now for many years.

@Alastair: I am trying this command to index the genome in color space: bwa index -a bwtsw -c GRCh38.r76.fa but I get the following error: index: invalid option -- 'c' . Can you guide me if this -c option is deprecated or what is wrong here. Thanks

Log in to answer this question.