This function analyzes a CIGAR string and extracts the start positions of insertions and deletions. It parses the CIGAR string, calculates the cumulative lengths of operations, and then identifies the start positions of the 'I' and 'D' segments.

get_indels_start_positions(cigar)

Arguments

cigar

A character string representing the CIGAR format.

Value

An integer vector containing the start positions of each insertion and deletion in the CIGAR string. Positions are 1-based.