Esempio n. 1
0
    def test_fc_plot(self):
        p1 = pd.read_pickle('MAmotif_test_input/h1hesc_peak_result.pkl')
        r1 = pd.read_pickle('MAmotif_test_input/h1hesc_rnd_result.pkl')
        e1 = pd.read_pickle('MAmotif_test_input/h1hesc_enrich_result.pkl')
        p2 = pd.read_pickle('MAmotif_test_input/k562_peak_result.pkl')
        r2 = pd.read_pickle('MAmotif_test_input/k562_rnd_result.pkl')
        e2 = pd.read_pickle('MAmotif_test_input/k562_enrich_result.pkl')
        p3 = pd.read_pickle('MAmotif_test_input/common_peak_result.pkl')
        r3 = pd.read_pickle('MAmotif_test_input/common_rnd_result.pkl')
        e3 = pd.read_pickle('MAmotif_test_input/common_enrich_result.pkl')

        [p,r,e] = motifscan_general.merge_two_results(p1,p2,r1,r2,e1)
        [p,r,e] = motifscan_general.merge_two_results(p,p3,r,r3,e3)

        core.fc_plot(p,r,'./test_fc_plot')
Esempio n. 2
0
    def test_peak_set_enrichemnt_analysis(self):
        # peak_table = pd.read_pickle('test_peak_table.pkl')
        p1 = pd.read_pickle('MAmotif_test_input/h1hesc_peak_result.pkl')
        r1 = pd.read_pickle('MAmotif_test_input/h1hesc_rnd_result.pkl')
        e1 = pd.read_pickle('MAmotif_test_input/h1hesc_enrich_result.pkl')
        p2 = pd.read_pickle('MAmotif_test_input/k562_peak_result.pkl')
        r2 = pd.read_pickle('MAmotif_test_input/k562_rnd_result.pkl')
        e2 = pd.read_pickle('MAmotif_test_input/k562_enrich_result.pkl')
        p3 = pd.read_pickle('MAmotif_test_input/common_peak_result.pkl')
        r3 = pd.read_pickle('MAmotif_test_input/common_rnd_result.pkl')
        e3 = pd.read_pickle('MAmotif_test_input/common_enrich_result.pkl')

        [p,r,e] = motifscan_general.merge_two_results(p1,p2,r1,r2,e1)
        [p,r,e] = motifscan_general.merge_two_results(p,p3,r,r3,e3)
        core.peak_set_enrichment_analysis(p,'test_fc_plot/')
Esempio n. 3
0
 def test_h_cluster(self):
     p1 = pd.read_pickle('MAmotif_test_input/h1hesc_peak_result.pkl')
     r1 = pd.read_pickle('MAmotif_test_input/h1hesc_rnd_result.pkl')
     e1 = pd.read_pickle('MAmotif_test_input/h1hesc_enrich_result.pkl')
     p2 = pd.read_pickle('MAmotif_test_input/k562_peak_result.pkl')
     r2 = pd.read_pickle('MAmotif_test_input/k562_rnd_result.pkl')
     e2 = pd.read_pickle('MAmotif_test_input/k562_enrich_result.pkl')
     [p,r,e] = motifscan_general.merge_two_results(p1,p2,r1,r2,e1)
     core.h_cluster(p,e,'./test_fc_plot',1.3,0.001)
Esempio n. 4
0
    def test_peak_test(self):
        common_motif_dir = '../MAmotif_H3K4me3_H1hesc_VS_K562/motifscan_on_common_peaks'
        a_motif_dir = '../MAmotif_H3K4me3_H1hesc_VS_K562/motifscan_on_H1hesc_H3k4me3_Broad_Rep1_P100_unique'

        print 'Loading motifscan results...'
        common_peak_result = pd.read_pickle("%s/peak_result.pkl"%common_motif_dir)
        common_rnd_result = pd.read_pickle("%s/rnd_result.pkl"%common_motif_dir)
        common_enrich_result = pd.read_pickle("%s/enrich_result.pkl"%common_motif_dir)
        a_peak_result = pd.read_pickle("%s/peak_result.pkl"%a_motif_dir)
        a_rnd_result = pd.read_pickle("%s/rnd_result.pkl"%a_motif_dir)
        
        print 'Merging peaks...'
        [positive_peak_result,positive_rnd_result,positive_enrich_result] = \
    motifscan_general.merge_two_results(common_peak_result,a_peak_result,common_rnd_result,a_rnd_result,common_enrich_result)

        core.peak_result_test(positive_peak_result, positive_rnd_result,plot_output_dir='enrichment_plot')