本文整理匯總了Python中ruffus.Pipeline.follows方法的典型用法代碼示例。如果您正苦於以下問題:Python Pipeline.follows方法的具體用法?Python Pipeline.follows怎麽用?Python Pipeline.follows使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ruffus.Pipeline
的用法示例。
在下文中一共展示了Pipeline.follows方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_newstyle_mkdir
# 需要導入模塊: from ruffus import Pipeline [as 別名]
# 或者: from ruffus.Pipeline import follows [as 別名]
def test_newstyle_mkdir (self):
test_pipeline = Pipeline("test")
test_pipeline.follows(task_which_makes_directories, mkdir(directories), mkdir(tempdir + 'c'), mkdir(tempdir + 'd', tempdir + 'e'), mkdir(tempdir + 'e'))
test_pipeline.run(multiprocess = 10, verbose = 0)
for d in 'abcde':
fullpath = os.path.join(os.path.dirname(__file__), tempdir, d)
self.assertTrue(os.path.exists(fullpath))
示例2: test_newstyle_mkdir
# 需要導入模塊: from ruffus import Pipeline [as 別名]
# 或者: from ruffus.Pipeline import follows [as 別名]
def test_newstyle_mkdir (self):
test_pipeline = Pipeline("test")
test_pipeline.follows(task_which_makes_directories,
mkdir(directories),
mkdir(unicode(tempdir + "c")),
mkdir(unicode(tempdir + "d"),
unicode(tempdir + "e")),
mkdir(unicode(tempdir + "e")))\
.posttask(touch_file(unicode(tempdir + "f")))
test_pipeline.originate(task_which_makes_files, [tempdir + "g", tempdir + "h"])
test_pipeline.run(multiprocess = 10, verbose = 0)
for d in 'abcdefgh':
fullpath = os.path.join(os.path.dirname(__file__), tempdir, d)
self.assertTrue(os.path.exists(fullpath))
示例3: test_newstyle_ruffus
# 需要導入模塊: from ruffus import Pipeline [as 別名]
# 或者: from ruffus.Pipeline import follows [as 別名]
def test_newstyle_ruffus (self):
test_pipeline = Pipeline("test")
test_pipeline.follows(setup_simulation_data, mkdir(gene_data_dir, simulation_data_dir))
test_pipeline.files(gwas_simulation, generate_simulation_params)\
.follows(setup_simulation_data)\
.follows(mkdir(working_dir, os.path.join(working_dir, "simulation_results")))
test_pipeline.collate(statistical_summary, gwas_simulation, regex(r"simulation_results/(\d+).\d+.simulation_res"), r"\1.mean")\
.posttask(lambda : sys.stdout.write("\nOK\n"))
test_pipeline.run(multiprocess = 50, verbose = 0)
for oo in "000.mean", "001.mean":
results_file_name = os.path.join(working_dir, oo)
if not os.path.exists(results_file_name):
raise Exception("Missing %s" % results_file_name)
示例4: test_newstyle_graphviz_dot
# 需要導入模塊: from ruffus import Pipeline [as 別名]
# 或者: from ruffus.Pipeline import follows [as 別名]
def test_newstyle_graphviz_dot(self):
test_pipeline = Pipeline("test")
test_pipeline.check_if_uptodate (Up_to_date_task1, lambda : (False, ""))
test_pipeline.follows(Up_to_date_task2, Up_to_date_task1)\
.check_if_uptodate (lambda : (False, ""))\
.graphviz(URL='"http://cnn.com"', fillcolor = '"#FFCCCC"',
color = '"#FF0000"', pencolor='"#FF0000"', fontcolor='"#4B6000"',
label_suffix = "???", label_prefix = "What is this?<BR/> ",
label = "<What <FONT COLOR=\"red\">is</FONT>this>",
shape= "component", height = 1.5, peripheries = 5,
style="dashed")
test_pipeline.follows(Up_to_date_task3, Up_to_date_task2)\
.check_if_uptodate (lambda : (False, ""))
test_pipeline.follows(Up_to_date_final_target, Up_to_date_task3)\
.check_if_uptodate (lambda : (False, ""))
test_pipeline.follows(Explicitly_specified_task, Up_to_date_task1)\
.check_if_uptodate (lambda : (False, ""))
test_pipeline.follows(Task_to_run1, Explicitly_specified_task)
test_pipeline.follows(Task_to_run2, Task_to_run1)
test_pipeline.follows(Task_to_run3, Task_to_run2)
test_pipeline.follows(Up_to_date_task_forced_to_rerun, Task_to_run2)\
.check_if_uptodate (lambda : (False, ""))
test_pipeline.follows(Final_target, Up_to_date_task_forced_to_rerun, Task_to_run3)
test_pipeline.follows(Downstream_task1_ignored, Final_target)
test_pipeline.follows(Downstream_task2_ignored, Final_target)
if sys.hexversion >= 0x03000000:
# everything is unicode in python3
s = BytesIO()
else:
s = StringIO()
test_pipeline.printout_graph (
s,
# use flowchart file name extension to decide flowchart format
# e.g. svg, jpg etc.
"dot",
[Final_target, Up_to_date_final_target])
self.assertTrue('[URL="http://cnn.com", color="#FF0000", fillcolor="#FFCCCC", fontcolor="#4B6000", height=1.5, label=<What is this?<BR/> What <FONT COLOR="red">is</FONT>this???>, pencolor="#FF0000", peripheries=5, shape=component, style=dashed]' in s.getvalue().decode())