def make_cluster_input(outdir, c): source = [str(c['make_graph']['edges']), str(c['make_graph']['nodes'])] target = appconfig.prepend_paths(outdir, config['cluster']['input']) action = exec_env.resolve_action({ 'pbs': 'bin/pbsrun_MKMCL.sh {0[ctg_minlen]} $SOURCES.abspath $TARGET.abspath'.format(config), 'sge': 'bin/sgerun_MKMCL.sh {0[ctg_minlen]} $SOURCES.abspath $TARGET.abspath'.format(config), 'local': 'bin/makeMCLinput.py {0[ctg_minlen]} $SOURCES.abspath $TARGET.abspath'.format(config) }) return 'output', env.Command(target, source, action)
def do_cluster(outdir, c): # TODO run over both weighted/unweighted? source = c['make_cluster_input']['output'] target = appconfig.prepend_paths(outdir, config['cluster']['output']) action = exec_env.resolve_action({ 'pbs': 'bin/pbsrun_MCL.sh {0[mcl_inflation]} $SOURCE.abspath $TARGET.abspath'.format(c), 'sge': 'bin/sgerun_MCL.sh {0[mcl_inflation]} $SOURCE.abspath $TARGET.abspath'.format(c), 'local': 'bin/mcl $SOURCE.abspath --abc -I {0[mcl_inflation]} -o $TARGET.abspath'.format(c) }) return 'output', env.Command(target, source, action)
def do_cluster(outdir, c): # TODO run over both weighted/unweighted? sources = [c['make_cluster_input']['nodemap'], c['do_cluster']['output']] target = appconfig.prepend_paths(outdir, config['cluster']['output']) action = exec_env.resolve_action({ 'pbs': 'bin/metisClToMCL.py $SOURCES.abspath $TARGET.abspath'.format(c), 'sge': 'bin/metisClToMCL.py $SOURCES.abspath $TARGET.abspath'.format(c), 'local': 'bin/metisClToMCL.py $SOURCES.abspath $TARGET.abspath'.format(c) }) return 'output', env.Command(target, sources, action)
def do_cluster(outdir, c): # TODO run over both weighted/unweighted? source = c['make_cluster_input']['output'] target = appconfig.prepend_paths(outdir, config['cluster']['output']) action = exec_env.resolve_action({ 'pbs': 'bin/pbsrun_OCLUSTR.sh -i $SOURCE.abspath $TARGET.abspath', 'sge': 'bin/sgerun_OCLUSTR.sh -i $SOURCE.abspath $TARGET.abspath', 'local': 'bin/oclustr.py $SOURCE.abspath $TARGET.abspath' }) return 'output', env.Command(target, source, action)
def make_cluster_input(outdir, c): sources = [str(c['make_graph']['edges']), str(c['make_graph']['nodes'])] base_out = appconfig.prepend_paths(outdir, config['cluster']['input'])[0] targets = [base_out, base_out + '.nodemap'] action = exec_env.resolve_action({ 'pbs': 'bin/pbsrun_MKMETIS.sh {0[ctg_minlen]} $SOURCES.abspath $TARGETS.abspath'.format(config), 'sge': 'bin/sgerun_MKMETIS.sh {0[ctg_minlen]} $SOURCES.abspath $TARGETS.abspath'.format(config), 'local': 'bin/edgeToMetis.py --fmt metis -m {0[ctg_minlen]} $SOURCES.abspath $TARGETS.abspath'.format(config) }) return 'output', 'nodemap', env.Command(targets, sources, action)
def make_graph(outdir, c): # add the root back in because we need to refer to the file ref_path = os.path.join(config['map_folder'], c['hic_path']) hic_bam = str(os.path.join(ref_path, config['hic2ctg'])) source = hic_bam targets = appconfig.prepend_paths(outdir, ['edges.csv', 'nodes.csv']) action = exec_env.resolve_action({ 'pbs': 'bin/pbsrun_GRAPH.sh $SOURCE.abspath $TARGETS.abspath', 'sge': 'bin/sgerun_GRAPH.sh $SOURCE.abspath $TARGETS.abspath', 'local': 'bin/bamToEdges.py $SOURCE.abspath $TARGETS.abspath' }) return 'edges', 'nodes', env.Command(targets, source, action)
def do_cluster(outdir, c): # TODO run over both weighted/unweighted? source = c['make_cluster_input']['output'] target = appconfig.prepend_paths(outdir, config['cluster']['output']) action = exec_env.resolve_action({ 'pbs': 'bin/pbsrun_LOUVAIN.sh {0[otype]} $SOURCE.abspath $TARGET.abspath'. format(c), 'sge': 'bin/sgerun_LOUVAIN.sh {0[otype]} $SOURCE.abspath $TARGET.abspath'. format(c), 'local': 'bin/louvain.py --otype {0[otype]} $SOURCE.abspath $TARGET.abspath'. format(c) }) return 'output', env.Command(target, source, action)
def make_cluster_input(outdir, c): sources = [str(c['make_graph']['edges']), str(c['make_graph']['nodes'])] base_out = appconfig.prepend_paths(outdir, config['cluster']['input'])[0] targets = [base_out, base_out + '.nodemap'] action = exec_env.resolve_action({ 'pbs': 'bin/pbsrun_MKMETIS.sh {0[ctg_minlen]} $SOURCES.abspath $TARGETS.abspath' .format(config), 'sge': 'bin/sgerun_MKMETIS.sh {0[ctg_minlen]} $SOURCES.abspath $TARGETS.abspath' .format(config), 'local': 'bin/edgeToMetis.py --fmt metis -m {0[ctg_minlen]} $SOURCES.abspath $TARGETS.abspath' .format(config) }) return 'output', 'nodemap', env.Command(targets, sources, action)