def exclude_taxa(self, taxa_list, update_stats=False):
        """
        Updates the excluded_taxa attribute and updates group statistics if
        update_stats is True. This does not change the Group object data
        permanently, only sets an attribute that will be taken into account
        when plotting and exporting data.
        :param taxa_list: list. List of taxa that should be excluded from
        downstream operations
        :param update_stats: boolean. If True, it will update the group
        statistics
        """

        # IF the taxa_list is the same as the excluded_taxa attribute,
        # there is nothing to do
        if sorted(taxa_list) == sorted(self.excluded_taxa):
            return

        self.species_list = [x for x in self.species_list + self.excluded_taxa
                             if x not in taxa_list]

        self.excluded_taxa = taxa_list

        if update_stats:
            self._reset_counter()
            for cl in self.iter_species_frequency():
                self._apply_filter(cl)