Realign
will realign the raw signal to the reference genome using the basecalled read's cigar string and the reform
output.
In realign step cigar string and the reformed array is iterated from start to end in parallel. In this process the following processing is done to the reformed array.
- The corresponding moves for the soft clipped bases in the cigar string will be clipped from the reformed array.
- An insertion to the reference ('I' in CIGAR string) means a corresponding base is not present in the reference but a move is present in the reformed array (because the reformed array is from the basecalled read). Hence, we add an 'I' operator to the reformed array.
- A deletion to the reference ('D' in CIGAR string) means a corresponding move is not present in the reformed array (because the move array is from the basecalled read). Hence, we add a 'D' operator to the reformed array.