Scripts/softclip_graph.py
def softclip_regions(read_start, cigar):
    """ The softclip regions function iterates over the cigar string and returns the positions and if they are "normal"
    or a softclipped region.

    :param read_start: An integer representing the start of the read (including unmapped bases)
    :param cigar: a list containing tuples representing the cigar string.
    :return regions: a 2d list containing the regions of a read and specifying if they are "normal" or softclipped.
    """
    regions = []
    cursor = read_start
    for element in cigar:
        if element[0] == 4:
            regions.append([cursor, cursor+element[1], 'softclip'])
        else:
            regions.append([cursor, cursor+element[1], 'normal'])
        cursor += element[1]

    return regions
 The softclip regions function iterates over the cigar string and returns the positions and if they are "normal"
    or a softclipped region.

    :param read_start: An integer representing the start of the read (including unmapped bases)
    :param cigar: a list containing tuples representing the cigar string.
    :return regions: a 2d list containing the regions of a read and specifying if they are "normal" or softclipped.
    
The softclip regions function iterates over the cigar string and returns the positions and if they are "normal"
or a softclipped region.
The softclip regions function iterates over the cigar string and returns the positions and if they are " normal " or a softclipped region .
def softclip_regions(read_start, cigar):
    regions = []
    cursor = read_start
    for element in cigar:
        if element[0] == 4:
            regions.append([cursor, cursor+element[1], 'softclip'])
        else:
            regions.append([cursor, cursor+element[1], 'normal'])
        cursor += element[1]
    return regions
def softclip_regions ( read_start , cigar ) : regions = [ ] cursor = read_start for element in cigar : if element [ 0 ] == 4 : regions . append ( [ cursor , cursor + element [ 1 ] , 'softclip' ] ) else : regions . append ( [ cursor , cursor + element [ 1 ] , 'normal' ] ) cursor += element [ 1 ] return regions
The softclip regions function iterates over the cigar string and returns the positions and if they are "normal"
or a softclipped region.
The softclip regions function iterates over the cigar string and returns the positions and if they are " normal " or a softclipped region .
""" The softclip regions function iterates over the cigar string and returns the positions and if they are "normal"
    or a softclipped region.

    :param read_start: An integer representing the start of the read (including unmapped bases)
    :param cigar: a list containing tuples representing the cigar string.
    :return regions: a 2d list containing the regions of a read and specifying if they are "normal" or softclipped.
    """
a 2d list containing the regions of a read and specifying if they are "normal" or softclipped.
a 2d list containing the regions of a read and specifying if they are " normal " or softclipped .
regions
read_start
An integer representing the start of the read (including unmapped bases)
An integer representing the start of the read ( including unmapped bases )
cigar
a list containing tuples representing the cigar string.
a list containing tuples representing the cigar string .