def coverage(index_seq, segment_list, qseqseq):
    """
    Coverage of an index_seq, which is just the ratio of the length of the concatenation to the
    length of the original string.
    """
    return (segment_list[index_seq[-1]][2] - segment_list[index_seq[0]][1]) / len(qseqseq)