def export_filtered_group(self, output_file_name="filtered_groups",
                              dest="./", get_stats=False,
                              shared_namespace=None):
        """
        Export the filtered groups into a new file.
        :param output_file_name: string, name of the filtered groups file
        :param dest: string, path to directory where the filtered groups file
        will be created
        :param get_stats: Boolean, whether to return the basic count stats or
        not
        :param shared_namespace: Namespace object, for communicating with
        main process.
        """

        if self.filtered_groups:

            if shared_namespace:
                shared_namespace.act = "Exporting filtered orthologs"

            output_handle = open(os.path.join(dest, output_file_name), "w")

            if get_stats:
                all_orthologs = len(self.groups)
                sp_compliant = 0
                gene_compliant = 0
                final_orthologs = 0

            for cluster in self.filtered_groups:

                if shared_namespace:
                    shared_namespace.progress = \
                        self.filtered_groups.index(cluster)

                if cluster.species_compliant and cluster.gene_compliant:
                    output_handle.write("%s: %s\n" % (
                                    cluster.name, " ".join(cluster.iter_sequences)))
                    if get_stats:
                        final_orthologs += 1
                if get_stats:
                    if cluster.species_compliant:
                        sp_compliant += 1
                    if cluster.gene_compliant:
                        gene_compliant += 1

            output_handle.close()

            if get_stats:
                return all_orthologs, sp_compliant, gene_compliant,\
                           final_orthologs

        else:
            raise OrthoGroupException("The groups object must be filtered "
                                      "before using the export_filtered_group"
                                      "method")