ChrisSuess / Project-Xbow

A computional chemistry cloud based project.
6 stars 2 forks source link

Added support for glob patterns in Subprocess kernel templates #41

Closed CharlieLaughton closed 4 years ago

CharlieLaughton commented 5 years ago

This update allows Subprocesskernel templates to feature wild card patterns, e.g.:

splitter = SubprocessKernel('split -l {n_lines} input') splitter.set_inputs(['input', 'n_lines']) splitter.set_outputs(['x*']) # note wildcard - matches xaa, xab, xac, etc. infile = xflowlib.load('many_lines_of_text.txt') bits = splitter.run(infile, 10) # will split the file into 10-line chunks

joiner = SubprocessKernel('cat x > output') joiner.set_inputs(['x']) # Note wildcard joiner.set.outputs(['output']) joined = joiner.run(bits)