Why do you want to remove anything from the .sai file? Why not convert it to .sam and then do your filtering?
.sai files are not a standardized file format and how bwa interprets/generates the files changes between versions of bwa.
I would convert it to .sam and not use the .sai files.
The .sai file is an intermediate file containing the suffix array indexes. Such file is afterwards translated into a SAM file.
The BWA paper may help you to understand how the mapping is done:
http://bioinformatics.oxfordjournals.org/content/25/14/1754.full
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.