Exemple #1
0
def get_expression_from_run( run_id, pathway, by_rank ):
    res = RunGPUDiracModel.get( run_id, timestamp )
    config = json.loads(base64.b64decode( res.config ))
    net_table = config['network_config']['network_table']
    net_source_id = config['network_config']['network_source']
    source_dataframe = config['dest_data']['dataframe_file']
    metadata_file = config['dest_data']['meta_file']
    source_bucket = config['dest_data']['working_bucket']
    app_path = '/home/sgeadmin/.local/lib/python2.7/site-packages/tcdiracweb-0.1.0-py2.7.egg/tcdiracweb'
    data_path = 'static/data'
    args =  (net_table, net_source_id, source_dataframe, metadata_file, 
            app_path, source_bucket, data_path)
    tsv = TSVGen( * args )
    return t.genNetworkGeneExpTables( pathway, by_rank=by_rank )
Exemple #2
0
def dumpExpression():
    runs = {}
    ignore = ['black_6_go_wt_v_q111']
    for item in RunGPUDiracModel.scan():
        if item.run_id not in ignore:
            runs[item.run_id] =  json.loads(base64.b64decode( item.config ))
    for k in runs.keys():
        net_table = runs[k]['network_config']['network_table']
        net_source_id = runs[k]['network_config']['network_source']
        source_dataframe = runs[k]['dest_data']['dataframe_file']
        metadata_file = runs[k]['dest_data']['meta_file']
        source_bucket = runs[k]['dest_data']['working_bucket']
        app_path = '/home/sgeadmin/.local/lib/python2.7/site-packages/tcdiracweb-0.1.0-py2.7.egg/tcdiracweb'
        data_path = 'static/data'
        runs['tsvargs'] = (net_table, net_source_id, source_dataframe, metadata_file, app_path, source_bucket, data_path)
        runs['sig_nets'] = get_sig(k)
        t = TSVGen( *runs['tsvargs'] )
        for pw in runs['sig_nets']:
            for rank in [True,False]:
                for j in [True,False]:
                    print t.genNetworkGeneExpTables(pw,  by_rank=rank)
                    return
            print pw