def check_dup_contig_overlap(blast_start, blast_end, contig_len, threshold):
    """ Checks if the blast hit covers a certain amount of the contig length
    """
    overlap = 0
    blast_len = blast_end - blast_start

    if(contig_len != 0):
        overlap = float(blast_len) / float(contig_len) * 100
    # In case the conti haslength 0, technically, the overlap is 100%
    else:
        overlap = 100

    if(overlap > threshold):
        return True
    else:
        return False