def METHOD_NAME(self, inputs, outputs):
    """Run analysis."""
    if inputs.species != inputs.gaf.output.species:
        self.warning(
            "Selected genes Species must be the same as the Species field of the GAF file."
        )
        self.error(
            f"Selected genes are from {inputs.species}, "
            f"while GAF file has defined {inputs.gaf.output.species} under Species field."
        )
    org_features = self.feature.filter(
        source=inputs.source, species=inputs.species, feature_id__in=inputs.genes
    )
    if len(org_features) == 0:
        self.error("No genes were fetched from the knowledge base.")
    if inputs.source == inputs.gaf.output.source:
        target_ids = inputs.genes
    else:
        mapping_res = self.mapping.filter(
            source_db=inputs.source,
            source_species=inputs.species,
            target_db=inputs.gaf.output.source,
            target_species=inputs.gaf.output.species,
            source_id__in=inputs.genes,
        )
        if len(mapping_res) == 0:
            self.error("Failed to map features.")
        ids = defaultdict(list)
        target_ids = []
        for m in mapping_res:
            if m.source_id in inputs.genes:
                target_ids.append(m.target_id)
                if m.source_id in ids:
                    self.warning(f"Mapping {m.source_id} returned multiple times.")
                ids[m.source_id].append(m.target_id)
        if len(inputs.genes) > len(ids):
            self.warning("Not all features could be mapped.")
        if len(target_ids) > 0:
            with open("mapped_ids.txt", "w") as f:
                writer = csv.writer(f, delimiter="\t", lineterminator="\n")
                writer.writerow([inputs.source, inputs.gaf.output.source])
                for key, value in ids.items():
                    for v in value:
                        writer.writerow([key, v])
            outputs.ids = "mapped_ids.txt"
    with tempfile.NamedTemporaryFile() as input_genes:
        input_genes.write(" ".join(target_ids).encode("UTF-8"))
        input_genes.flush()
        args = [
            str(inputs.pval_threshold),
            str(inputs.min_genes),
            inputs.ontology.output.obo_obj.path,
            inputs.gaf.output.gaf_obj.path,
            input_genes.name,
        ]
        (Cmd["processor"][args] > "terms.json")()
    outputs.source = inputs.gaf.output.source
    outputs.species = inputs.gaf.output.species
    outputs.terms = "terms.json"