def is_soft_clipped(read):
    """Function that checks the CIGAR string of the sam file and returns true if the read is soft-clipped"""
    match = 0
    for cigar in read.cigar:
        if cigar[0] == 4:
            match += 1
        else:
            pass
    if match > 0:
        return True
    else:
        return False
