_go=tmp_go, outputdir=s_out2, outputfile="CircosOverlapByGO", S_color=S_color, s_symbol=s_symbol)
        self.sw.check("Circos GO Overlap")

    def plot_GPEC_go(self):
        #if l_WEB_MODE:
        #    if self.session['t_gene_mem'] is None: self.load_session('genelists_overlap.pickle')
        #    if self.session['golists'] is None: self.load_session('golists.pickle')
        #    if self.session['gpec_golist'] is None: self.load_session('gpec_go.pickle')
        l_WEB_MODE=self.get('l_WEB_MODE')
        s_out=self.get('s_out')
        s_out2=self.get_subfolder("Enrichment_GO")
        #golist=self.get('gpec_golist')
        #if golist is None: return
        s_xgmml=self.get('gpec_gonet_fn')
        if s_xgmml is None: return
        t_go_mem=self.get('t_go_mem')
        #t_gene_mem=self.get('t_gene_mem')
        n_list=self.get('n_list')
        S_name=self.get('S_name')
        S_color=self.get('S_color')
        #max_clusters=self.get('max_clusters')
        #max_member_per_go_cluster=self.get('max_member_per_go_cluster')
        #max_nodes_in_go_network=self.get('max_nodes_in_go_network')
        #l_go_selective=self.get('l_go_selective')
        #golist.summary_plot(s_out+'/HeatmapSelectedGO', t_go_mem, max_clusters=max_clusters)
        self.sw.check('Start Plot GO')
        cp=bl.CytoPlot(host=self.get('CYTOSCAPE_HOST'), port=self.get('CYTOSCAPE_PORT'), on_windows=self.get('CYTOSCAPE_ON_WINDOWS'), add_logo=self.get('ADD_LOGO'))

        n_node=self.get('gpec_gonet_nnode')
        n_cluster=self.get('gpec_gonet_ncluster')
        s_session=os.path.abspath(s_xgmml+".cys")
        if self.get('CYTOSCAPE_ON_WINDOWS'):
            s_session=util.format_path(s_session, OS="win")

        S_idx=bl.get_color_label(t_go_mem, S_name)
        S_color2=[ S_color[i] for i in S_idx if i>=0]
        S_label2=[ S_name[i] for i in S_idx if i>=0]
        #print S_color2, S_label2
        cp.plot_go_network(s_xgmml+".xgmml", n_list, n_cluster, s_out_dir=s_out2, S_fmt=["png","pdf"], s_session=s_session, S_label=S_label2, S_color=S_color2, n_node=n_node)
        print("Save session file: "+s_session)
        self.sw.check("CytoPlot")

    def plot_GPEC_ppi(self):
        #if l_WEB_MODE:
        #    if self.session['t_gene_mem'] is None: self.load_session('genelists_overlap.pickle')
        #    if self.session['full_nets'] is None: self.load_session('ppi.pickle')
        #    if self.session['gpec_net'] is None: self.load_session('gpec_ppi.pickle')
        l_WEB_MODE=self.get('l_WEB_MODE')
        max_ppi_size_for_plot=self.get('max_ppi_size_for_plot')
        s_out=self.get('s_out')
        s_out2=self.get_subfolder('Enrichment_PPI')
        s_out3=self.get_subfolder("Enrichment_PPI/xgmml")
        full_nets=self.get('full_nets') or {}
        full_nets=list(full_nets.values())
        mcode_nets=self.get('mcode_nets') or []
        gpec_net=self.get('gpec_net')
        if gpec_net is not None and not gpec_net.is_empty():
            full_nets.append(gpec_net)
        gpec_mcode_net=self.get('gpec_mcode_net')
        if gpec_mcode_net is not None and not gpec_mcode_net.is_empty():
            mcode_nets.append(gpec_mcode_net)

        if len(full_nets)==0: return

        lists=self.get('lists')
        n_list=self.get('n_list')
        S_name=self.get('S_name')
        S_color=self.get('S_color')

        s_merge_name="_FINAL"

        S_xgmml=[]
        S_node=[]
        c_legend_prefix={}

        cp=bl.CytoPlot(host=self.get('CYTOSCAPE_HOST'), port=self.get('CYTOSCAPE_PORT'), on_windows=self.get('CYTOSCAPE_ON_WINDOWS'), add_logo=self.get('ADD_LOGO'))

        for x in mcode_nets:
            s_name=re.sub('_MCODE_ALL', '', x.name)
            S_xgmml.append(s_out3+"/"+x.name+".xgmml")
            S_node.append(x.nof_nodes())
            n_cluster=int(max(x.T_node.MCODE_CLUSTER_ID))
            c_legend_prefix[x.name]=["MCODE%d" % (i+1) for i in range(n_cluster)]
            c_legend_prefix[s_name]=c_legend_prefix[x.name]
        n_mcode_cluster=1
        max_mcode_cluster=20
        t_mcode=pd.DataFrame() if self.get('t_mcode') is None else self.get('t_mcode')
        t_gpec_mcode=self.get('t_gpec_mcode')
        if t_gpec_mcode is not None and len(t_gpec_mcode)>0:
            t_mcode=pd.concat([t_mcode, t_gpec_mcode], ignore_index=True)
        if len(t_mcode):
            n_mcode_cluster=max(t_mcode.Cluster)

        S_full_network=[]
        S_node_full=[]
        for x in full_nets:
            if x.nof_nodes()<=max_ppi_size_for_plot:
                S_full_network.append(s_out3+"/"+x.name+".xgmml")
                S_node_full.append(x.nof_nodes())
        S_by_count=[]
        # just in case there were bugs
        S_xgmml=util.unique(S_xgmml)
        #S_full_network=util.unique(S_full_network)
        if len(S_xgmml+S_full_network)>0:
            #S_node=[ x.nof_nodes() for x in best_out if x.name.endswith('_MCODE_ALL') ]
            if n_list>1:
                S_by_count=[x for x in S_xgmml if x.startswith(s_out3+"/"+s_merge_name+'_')]
            if len(S_full_network):
                S_xgmml+=S_full_network
                S_node+=S_node_full
                if n_list>1:
                    S_by_count+=[x for x in S_full_network if