@staticmethod
def _set_gene(gene):
    """Private function for setting the gene identifier value in the class.

        Parameters
        ----------
        gene : str
            A gene identifier, either V or J, specifying the alignment's origin gene.

        Returns
        -------
        str
            The input gene character value after passing the validation test.

        Raises
        ------
        ValueError
            When the given gene character does not equal 'V' or 'J'.

        """
    gene = gene.upper()
    if gene not in ['V', 'J']:
        raise ValueError("Gene identifier should be either 'V' or 'J'", gene)
    return gene
