def get_map():
    maps = rc.get_items('map')
    map_dict = {}
    for i in range(len(maps)):
        map_dict[maps[i][0]] = maps[i][1]

    compares = rc.get_items('compare')
    compare_groups = []
    for i in range(len(compares)):
        aa = compares[i][1].replace(' ', '').split(',')
        compare_groups.append([aa[0], aa[1]])

    return map_dict, compare_groups
Esempio n. 2
0
def get_config_info():
    paths = rc.get_items('path')

    maps = rc.get_items('map')
    map_dict = {}
    for i in range(len(maps)):
        map_dict[maps[i][0]] = maps[i][1]

    compares = rc.get_items('compare')
    compare_groups = []
    for i in range(len(compares)):
        aa = compares[i][1].replace(' ', '').split(',')
        compare_groups.append(aa)

    return paths[0][1], paths[1][1], map_dict, compare_groups
def main():
    paths = rc.get_items('path')
    df = pd.read_csv(os.path.join(paths[1][1],
                                  'combined_otu_table_m3_std.txt'),
                     sep='\t',
                     index_col='OTU ID').drop('taxonomy', axis=1)
    get_top10(df, paths[1][1])
def main():
    paths = rc.get_items('path')
    map_dict, compare_groups = get_map()
    df = get_df(map_dict, 'ln')
    alpha_stats_kruskal(df, compare_groups, paths[1][1])
    alpha_stats_ranksums(df, compare_groups, paths[1][1])
    alpha_stats_f_oneway(df, compare_groups, paths[1][1])
    alpha_stats_mannwhitneyu(df, compare_groups, paths[1][1])
    alpha_stats_levene(df, compare_groups, paths[1][1])
    alpha_stats_ttest_ind(df, compare_groups, paths[1][1])
Esempio n. 5
0
def get_df(pre='ln', file='combined_alpha_m1.txt'):
    paths = rc.get_items('path')
    df = pd.read_csv(os.path.join(paths[1][1], file),
                     sep='\t',
                     index_col='OTU ID').drop('taxonomy', axis=1).T
    if pre == 'ln':
        df = np.log(df + 0.00001)
    elif pre == 'log10':
        df = np.log10(df + 0.00001)

    return df
Esempio n. 6
0
def get_df(map_dict, pre='ln', file='combined_alpha_m1.txt'):
    paths = rc.get_items('path')
    df = pd.read_csv(os.path.join(paths[1][1], file),
                     sep='\t',
                     index_col='Sample')
    if pre == 'ln':
        df = np.log(df + 0.00001)
    elif pre == 'log10':
        df = np.log10(df + 0.00001)

    df = df.reset_index()
    df['Type'] = df['Sample'].map(map_dict)
    return df
Esempio n. 7
0
def main():
    paths = rc.get_items('path')
    sort_sample, sort_dict_kegg, tax_kegg, sort_dict_cog, tax_cog = glob_all_otu(
        paths[0][1])
    combined_otu(sort_sample, sort_dict_kegg, tax_kegg, sort_dict_cog, tax_cog,
                 paths[1][1])
def main():
    paths = rc.get_items('path')
    map_dict, _ = get_map()
    df = get_df(paths[1][1])
    get_top50(df, map_dict, paths[1][1])
def main():
    paths = rc.get_items('path')
    sort_sample, sort_dict = glob_all_otu(paths[0][1])
    combined_otu(sort_sample, sort_dict, paths[1][1])
def main():
    paths = rc.get_items('path')
    glob_all_otu(paths[0][1], paths[1][1])
def main():
    paths = rc.get_items('path')
    rank_abundance(paths[0][1], paths[1][1])
Esempio n. 12
0
def main():
    paths = rc.get_items('path')
    get_tax_num(paths[1][1])
def main():
    paths = rc.get_items('path')
    compute_length_ratio(paths[0][1], paths[1][1])
def main():
    paths = rc.get_items('path')
    plot_data = rarefaction_curve(paths[0][1])
    draw_plot(plot_data, paths[1][1])
Esempio n. 15
0
def main():
    paths = rc.get_items('path')
    map_dict, compare_groups = get_map()
    df = get_df('ln', 'combined_otu_table_m2_std.txt')
    anosim(df, map_dict, compare_groups, paths[1][1])