def clusterAverage(file_list):

    # map replicate number on to dataframe as identifier
    # used to aggregate over replicates for each gene id
    # assumes filename is condition-reference-replicate

    df_dict = {}
    for fle in file_list:
        f = fle.split("/")[-1]
        rep = f.split("-")[2]
        _df = pd.read_table(fle, sep="\t",
                            header=0, index_col=0)
        df_dict[rep] = _df

    # group concatenated dataframes by gene_id
    concat_df = pd.concat(df_dict)
    group_df = concat_df.groupby(level=1)

    # aggregate/summarise distance metric over replicates for each gene_id
    agg_dict = {}
    for names, groups in group_df:
        agg_dict[names] = np.mean(groups, axis=0)

    agg_df = pd.DataFrame(agg_dict)
    return agg_df
Loads and returns the code object for the Enaml module and
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Timeseries/__init__.py/clusterAverage--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/core/import_hooks.py/EnamlImporter.get_code