def determine_mapping_type(gene_table, pathways_to_genes, pathways_to_ecs):
    """
    Determine if the input file is of gene families or EC abundance type
    """
    all_genes = set()
    all_ecs = set()
    for pathway, genes in pathways_to_genes.items():
        all_genes.update(genes)
        all_ecs.update(pathways_to_ecs[pathway])
    for gene in gene_table:
        if gene in all_genes:
            return pathways_to_genes
        elif gene in all_ecs:
            return pathways_to_ecs
