@staticmethod
def gene_name(name):
    """
        Split the FASTA header string into its components, including gene name, allele, and accession
        :param name: FASTA header
        :return: gname, genename, accession, allele: name of gene. Often the same as genename, but for certain entries
        it is longer, full gene name, accession, and allele extracted from the FASTA header
        """
    if ('Van' in name or 'mcr' in name or 'aph' in name or 'ddlA' in name or
        'ant' in name or 'aadE_Cc' in name):
        try:
            if name == "ant(3'')_Ih_aac(6')_IId_1_AF453998":
                gene1, version1, gene2, version2, allele, accession = (name
                    .split('_'))
                gname = '{g1}-{v1}-{g2}-{v2}'.format(g1=gene1, v1=version1,
                    g2=gene2, v2=version2)
                genename = gname
            elif name == 'ant(3)_Ia_1_X02340':
                gene, version, allele, accession = name.split('_')
                gname = '{g}-{v}'.format(g=gene, v=version)
                genename = gname
            elif 'mcr_3' in name or 'mcr_2' in name or 'mcr_1.10' in name:
                gene, combinedversion, allele, accession = name.split('_')
                version = combinedversion.split('.')[0]
                gname = '{gene}-{version}'.format(gene=gene, version=version)
                genename = gname
            else:
                try:
                    pregene, postgene, allele, accession = name.split('_')
                    gname = '{pre}-{post}'.format(pre=pregene, post=postgene)
                    genename = gname
                except ValueError:
                    (pregene, postgene, allele, preaccession, postaccession
                        ) = name.split('_')
                    genename = '{pre}-{post}'.format(pre=pregene, post=postgene
                        )
                    accession = '{pre}_{post}'.format(pre=preaccession,
                        post=postaccession)
                    gname = pregene
        except ValueError:
            genename, allele, accession = name.split('_')
            gname = genename
    elif 'bla' in name or 'aac' in name or 'ARR' in name or 'POM' in name:
        if 'OKP' in name or 'CTX' in name or 'OXY' in name:
            gene, version1, version2, allele, accession = name.split('_')
            gname = '{g}-{v1}-{v2}'.format(g=gene, v1=version1, v2=version2)
            genename = gname
        elif 'CMY' in name:
            try:
                gname, allele, version, accession = name.split('_')
            except ValueError:
                gname, allele, version, pre_accession, post_accession = (name
                    .split('_'))
                accession = '{pre}_{post}'.format(pre=pre_accession, post=
                    post_accession)
            genename = gname
        elif name == "aac(3)_Ib_aac(6')_Ib_1_AF355189":
            gene1, version1, gene2, version2, allele, accession = name.split(
                '_')
            gname = '{g1}-{v1}-{g2}-{v2}'.format(g1=gene1, v1=version1, g2=
                gene2, v2=version2)
            genename = gname
        elif 'alias' in name:
            gene1, version1, alias, gene2, version2, allele, accession = (name
                .split('_'))
            gname = '{g1}-{v1}'.format(g1=gene1, v1=version1)
            genename = gname
        else:
            try:
                genename, allele, accession = name.split('_')
                gname = genename
            except ValueError:
                try:
                    genename, version, allele, accession = name.split('_')
                    gname = '{g}-{v}'.format(g=genename, v=version)
                except ValueError:
                    (genename, version, allele, preaccession, postaccession
                        ) = name.split('_')
                    gname = '{g}-{v}'.format(g=genename, v=version)
                    genename = gname
                    accession = '{preaccess}_{postaccess}'.format(preaccess
                        =preaccession, postaccess=postaccession)
    else:
        try:
            genename, allele, accession = name.split('_')
            gname = genename
        except ValueError:
            genename, allele, preaccession, postaccession = name.split('_')
            accession = '{preaccess}_{postaccess}'.format(preaccess=
                preaccession, postaccess=postaccession)
            gname = genename
    return gname, genename, accession, allele
