@classmethod<EOL><INDENT>def from_dict(cls, data: Dict[str, Union[str, int]]):<DEDENT>
assert isinstance(data, dict)<EOL>if '<STR_LIT>' not in data:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>data = dict(data)<EOL>for attr in ['<STR_LIT:name>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT:type>', '<STR_LIT:source>']:<EOL><INDENT>if attr in data and data[attr] == '<STR_LIT>':<EOL><INDENT>data[attr] = None            <EOL><DEDENT><DEDENT>data['<STR_LIT>'] = data['<STR_LIT:type>']<EOL>del data['<STR_LIT:type>']<EOL>return cls(**data)<EOL>
Generate an `ExpGene` object from a dictionary.

        Parameters
        ----------
        data : dict
            A dictionary with keys corresponding to attribute names.
            Attributes with missing keys will be assigned `None`.

        Returns
        -------
        `ExpGene`
            The gene.