def update_filters(self, gn_filter, sp_filter, group_names=None,
                       default=False):
        """
        This will not change the Group object themselves, only the filter
        mapping. The filter is only applied when the Group object is retrieved
        to reduce computations
        :param gn_filter: int, filter for max gene copies
        :param sp_filter: int, filter for min species
        :param group_names: list, with names of group objects
        """

        if group_names:
            for group_name in group_names:
                # Get group object
                group_obj = self.multiple_groups[group_name]
                # Define filters
                gn_filter = gn_filter if not default else 1
                sp_filter = sp_filter if not default else \
                    len(group_obj.species_list)
                # Update Group object with new filters
                group_obj.update_filters(gn_filter, sp_filter)
                # Update filter map
                self.filters[group_name] = (gn_filter, sp_filter)

            for group_name, group_obj in self.multiple_groups.items():
                # Define filters
                gn_filter = gn_filter if not default else 1
                sp_filter = sp_filter if not default else \
                    len(group_obj.species_list)
                # Update Group object with new filters
                group_obj.update_filters(gn_filter, sp_filter)
                # Update filter map
                self.filters[group_name] = (gn_filter, sp_filter)