def dumpFA(FA):
    """Dumps output of slalom.CSparseFA object in a dictionary

    Args:
        FA                 (:class:`slalom.CSparseFA`): Factor analysis object, ususally generated using `initFA` function
                                                                      

    Returns:
        dictionary with results
    """
    out_file = {}
    out_file['relevance'] = FA.getRelevance()
    out_file['W'] = FA.getW()
    out_file['X'] = FA.getX()
    out_file['Z'] = FA.getZ()
    out_file['I'] = FA.getAnnotations()
    out_file['terms'] = FA.getTerms()
    out_file['idx_genes'] = FA.idx_genes
    if not FA.gene_ids is None:
        out_file['gene_ids'] = FA.gene_ids
    return out_file
