def consensus_pattern(patterns, missing="Ø"):
    """
    Return consensus pattern of multiple patterns.

    :param patterns: list of patterns
    :param missing: the character used to represent missing values

    .. note:: This consensus method raises an error if the patterns contain incompatible
       columns (non-identical values apart from the missing data character in the same
       column).
    """
    out = []
    for i in range(len(patterns[0])):
        col = [line[i] for line in patterns]
        no_gaps = [x for x in col if x != missing]
        if len(set(no_gaps)) > 1:
            raise ValueError("Your patterns are incompatible")
        out += [no_gaps[0] if no_gaps else missing]
    return tuple(out)