def combinealleles(self, alleles):
        """
        Creates a large multi-fasta file from all core genes in the analysis
        :param alleles: .fasta file for each core gene
        """
        printtime('Creating combined core allele file', self.start)
        if not os.path.isfile(os.path.join(self.coregenelocation, 'core_combined.tfa')):
            with open(os.path.join(self.coregenelocation, 'core_combined.tfa'), 'w') as combinedfile:
                # Open each allele file
                for allele in sorted(alleles):
                    for record in SeqIO.parse(open(allele, "rU"), "fasta"):
                        # Extract the sequence record from each entry in the multifasta
                        # Remove and dashes or 'N's from the sequence data - makeblastdb can't handle sequences
                        # with gaps
                        # noinspection PyProtectedMember
                        record.seq._data = record.seq._data.replace('-', '').replace('N', '')
                        # Clear the name and description attributes of the record
                        record.name = ''
                        record.description = ''
                        # Write each record to the combined file
                        SeqIO.write(record, combinedfile, 'fasta')