Ejemplo n.º 1
0
def test_load():
    G = NdexGraph()
    toolbox.load(G,
                 'loadexample.txt',
                 edge_attributes=['strength'],
                 header=True)
    print G.node
    print G.edge
Ejemplo n.º 2
0
def test_st_layout_full():
    G = NdexGraph()
    toolbox.load(G, 'st_layout_network2.txt', header=True)
    toolbox.annotate(G, 'st_layout_annotate2.txt')
    toolbox.apply_source_target_layout(G)
    template_id = 'd1856d17-4937-11e6-a5c7-06603eb7f303'
    toolbox.apply_template(G, template_id, 'http://public.ndexbio.org', 'scratch', 'scratch')
    G.set_name('test_st_layout_wtf1')
    # G.write_to('temp.cx')
    G.upload_to('http://dev2.ndexbio.org', 'scratch', 'scratch')
Ejemplo n.º 3
0
def test_st_layout_full():
    G = NdexGraph()
    toolbox.load(G, 'st_layout_network2.txt', header=True)
    toolbox.annotate(G, 'st_layout_annotate2.txt')
    toolbox.apply_source_target_layout(G)
    template_id = 'd1856d17-4937-11e6-a5c7-06603eb7f303'
    toolbox.apply_template(G, template_id, 'http://public.ndexbio.org',
                           'scratch', 'scratch')
    G.set_name('test_st_layout_wtf1')
    # G.write_to('temp.cx')
    G.upload_to('http://dev2.ndexbio.org', 'scratch', 'scratch')
Ejemplo n.º 4
0
def test_load():
    G = NdexGraph()
    toolbox.load(G, 'loadexample.txt', edge_attributes=['strength'], header=True)
    print(G.node)
    print(G.edge)
Ejemplo n.º 5
0
    #select regulators

    top_regulators=select_top_n_in_column_by_magnitude(trns_regs)

    #build edge networks

    fh_stem=opts.network_directory+'transition_network_'
    files=build_networks_from_dict_and_mat(top_regulators, connections_matrix,fh_stem=fh_stem)

    #push edge network to NDEx

    uuids={}

    for f in files:
        net=netn.NdexGraph()
        netb.load(net,f,edge_attributes=['strength'],header=True)
        net_name=f.replace(opts.network_directory,'')
        net.set_name(net_name)
        uuids[net_name]=net.upload_to('http://public.ndexbio.org','decarlin','perfect6')
    

    #retrieve edge networks uuids
    ndex=nc.Ndex(host='http://public.ndexbio.org', username='******', password='******')
    id_dict={}

    for nn in uuids.keys():
        ndex.make_network_public(uuids[nn])
    

        #assign uuids to development edges