예제 #1
0
def do_job(i):  # , method='clarna'):
    """Run ClaRNA & Compare, add 1 to the counter, write output
    to csv file (keeping it locked)"""
    #if method == 'clarna':
    # run clarna & compare
    i_cl_fn = clarna_app.clarna_run(i, args.force, args.stacking)
    output = clarna_app.clarna_compare(target_cl_fn, i_cl_fn, DEBUG)
    if args.verbose:
        print(output)
    ## else:
    ##     rmsd, DI_ALL, INF_ALL, INF_WC, INF_NWC,INF_STACK = InteractionNetworkFidelity(os.path.abspath(target_fn),
    ##                                                                                   '/tmp/empty-index',
    ##                                                                                   os.path.abspath(i),
    ##                                                                                   '/tmp/empty-index')
    ##     if args.debug:
    ##         print(rmsd)

    # counter and bar
    global counter
    counter.value += 1
    bar.update(counter.value)

    # write csv
    lock.acquire()
    # take only filename of target
    cells = output.split()
    cells[0] = os.path.basename(cells[0])

    csv_writer.writerow(cells)
    csv_file.flush()
    lock.release()
예제 #2
0
def do_job(i):  # , method='clarna'):
    """Run ClaRNA & Compare, add 1 to the counter, write output
    to csv file (keeping it locked)"""
    #if method == 'clarna':
        # run clarna & compare
    i_cl_fn = clarna_app.clarna_run(i, args.force, args.stacking)
    output = clarna_app.clarna_compare(target_cl_fn,i_cl_fn, DEBUG)
    if args.verbose:
        print(output)
    ## else:
    ##     rmsd, DI_ALL, INF_ALL, INF_WC, INF_NWC,INF_STACK = InteractionNetworkFidelity(os.path.abspath(target_fn),
    ##                                                                                   '/tmp/empty-index',
    ##                                                                                   os.path.abspath(i),
    ##                                                                                   '/tmp/empty-index')
    ##     if args.debug:
    ##         print(rmsd)

    # counter and bar
    global counter
    counter.value += 1
    bar.update(counter.value)

    # write csv
    lock.acquire()
    # take only filename of target
    cells = output.split()
    cells[0] = os.path.basename(cells[0])

    csv_writer.writerow(cells)
    csv_file.flush()
    lock.release()
예제 #3
0
from rna_tools.tools.clarna_app import clarna_app

if __name__ == '__main__':
    ss = '((((.[[[[[[.))))........((((.....]]]]]]...(((((....)))))..))))'
    fnCRref = clarna_app.get_ClaRNA_output_from_dot_bracket(ss)
    f = '../rna_calc_rmsd/test_data/pistol/5k7c_clean_onechain_renumber_as_puzzle_srr.pdb'
    fnCR = clarna_app.clarna_run(f, force=False)
    results = clarna_app.clarna_compare(fnCRref, fnCR)
    print(results) #
    #tmp_Z42i_..pdb.outCR     5k7c_clean_onechain_renumber_as_puzzle_srr.pdb.outCR      0.706      NA         0.865      NA         0.842      0.889      NA         0.000
예제 #4
0
from rna_tools.tools.clarna_app import clarna_app

if __name__ == '__main__':
    ss = '((((.[[[[[[.))))........((((.....]]]]]]...(((((....)))))..))))'
    fnCRref = clarna_app.get_ClaRNA_output_from_dot_bracket(ss)
    f = '../rna_calc_rmsd/test_data/pistol/5k7c_clean_onechain_renumber_as_puzzle_srr.pdb'
    fnCR = clarna_app.clarna_run(f, force=False)
    results = clarna_app.clarna_compare(fnCRref, fnCR)
    print(results)  #
    #tmp_Z42i_..pdb.outCR     5k7c_clean_onechain_renumber_as_puzzle_srr.pdb.outCR      0.706      NA         0.865      NA         0.842      0.889      NA         0.000