This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bwa Alignment And Input Pair-End Format, Does Fastq Encoding Of The Input Matter?

Hi, I am curious about a question. I have pair-end reads here as T1.fq and T2.fq (fastq format) that are produced by illumina 1.8. When I do BWA alignment with galaxy, I need to convert T1 and T2 format to sangerfastq format for no doubt by Galaxy groomer. and I got good mapping result.

My question is that, when I do the same BWA alignment under Linux but not Galaxy, do I need to use T1 and T2 that have already been converted to sangerfastq format?

(When I did quality filtering and trimmer on T1 and T2 reads, I added -Q33 on the end of linux commands and they works good. can I add -Q 33 on BWA aln commands but not need go to galaxy groomer to convert format before I do BWA. you know, it already takes a long time to do galaxy groomer.

$ bwa aln mm10.fa  T1.fq -Q33 > T1.sai

$ bwa aln mm10.fa  T2.fq -Q33 > T2.sai
bwa alignment format

2 answers

You can perform quality encoding shifting with seqtk at extremely high speeds most likely thousands of times faster than the FastQ groomer:

seqtk seq -Q 33 input.fq > output.fq

Thanks Albert, that's so helpful!

ok wait, just tested this out to make sure - it does not seem to work,

I recalled this feature from memory it is named "quality shift" but does not seem to do anything, maybe I am misusing it

It will always be good to convert your read quality to phred+33 or sanger fastq format. The "-q" command and not the big "-Q" is used to trim low quality based from the end of the read in bwa. You should feed Sanger format fastq to BWA aligner.

thank you for the answer, Ashutoshmits

Log in to answer this question.