def hgnc_gene(self, hgnc_identifier, build='<STR_LIT>'):
if not build in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>build = '<STR_LIT>'<EOL><DEDENT>query = {}<EOL>try:<EOL><INDENT>hgnc_identifier = int(hgnc_identifier)<EOL>query['<STR_LIT>'] = hgnc_identifier<EOL><DEDENT>except ValueError:<EOL><INDENT>query['<STR_LIT>'] = hgnc_identifier<EOL><DEDENT>query['<STR_LIT>'] = build<EOL>LOG.debug("<STR_LIT>" % hgnc_identifier)<EOL>gene_obj = self.hgnc_collection.find_one(query)<EOL>if not gene_obj:<EOL><INDENT>return None<EOL><DEDENT>transcripts = []<EOL>tx_objs = self.transcripts(build=build, hgnc_id=gene_obj['<STR_LIT>'])<EOL>if tx_objs.count() > <NUM_LIT:0>:<EOL><INDENT>for tx in tx_objs:<EOL><INDENT>transcripts.append(tx)<EOL><DEDENT><DEDENT>gene_obj['<STR_LIT>'] = transcripts<EOL>return gene_obj<EOL>
Fetch a hgnc gene

            Args:
                hgnc_identifier(int)

            Returns:
                gene_obj(HgncGene)