Download - Tap Workflows
-
8/14/2019 Tap Workflows
1/24
Tap Workflows
a b1
b c1
c2
c
?
x
x1
x2
y
y1 z
-
8/14/2019 Tap Workflows
2/24
Tap (Task Application)
Framework for command line apps
Configurations, Documentation, Distribution
Workflows: sequence, fork, merge, syncmerge, switch
-
8/14/2019 Tap Workflows
3/24
Workflows
a --: b --: c
Think of a, b, c as methods(literally they are)
-
8/14/2019 Tap Workflows
4/24
Sequence
a --: b --: c
result_a = a(input)result_b = b(result_a)result_c = c(result_b)
-
8/14/2019 Tap Workflows
5/24
Fork
--a[b, c]
result_a = a(input)result_b = b(result_a)result_c = c(result_a)
-
8/14/2019 Tap Workflows
6/24
Merge
--c{a,b}
result_a = a(input)result_b = b(input)result_c = c(result_a, result_b)
-
8/14/2019 Tap Workflows
7/24
Variations
a --:i b
a(input).each do |result_a| # ib(result_a)end
a --:s b
b(*a(input)) # s
-
8/14/2019 Tap Workflows
8/24
Variations
a --:i b --:a c
results_b = []a(input).each do |result_a| # i
results_b
-
8/14/2019 Tap Workflows
9/24
Tap Workflows
Build workflows from command line
Get behavior like in a script
-
8/14/2019 Tap Workflows
10/24
Think about |
Pipe is just a sequence
Serves us well... but its just a sequence
% git diff | mate
-
8/14/2019 Tap Workflows
11/24
Example
Digest: splits a protein sequence
Fragment: numerical transform on substrings
Format Mfg: formats results as .mgf
-
8/14/2019 Tap Workflows
12/24
Desired Workflow
(protein) - - [peptides...]
(peptide) - - [data, headers]
(data, headers) - - string
digest --:i fragment --:s mgf
-
8/14/2019 Tap Workflows
13/24
Fragment
-
8/14/2019 Tap Workflows
14/24
Fragment
-
8/14/2019 Tap Workflows
15/24
Fragment
-
8/14/2019 Tap Workflows
16/24
Demo
% tap run -- fragment --help% rap fragment --help
% rap fragment PEPTIDE% rap fragment PEPTIDE --: dump% rap digest PROTEIN --: dump% rap digest PROTEIN --:i fragment --: dump
% rap digest PROTEIN --:i fragment --:a dump% rap digest PROTEIN --:i fragment --:s format_mgf--:a dump
-
8/14/2019 Tap Workflows
17/24
Demo% rap digest PROTEIN --:i fragment --format_mgf -- format_mgf --mz-precision 2 --dump --no-audit --no-yaml --1[2,3]s --4{2,3}a
- [digest, PROTEIN]- [fragment]- [format_mgf]
- [format_mgf, --mz-precision, 2]- [dump, --no-audit, --no-yaml]- 0:1i- 1[2,3]s
- 4{2,3}a
-
8/14/2019 Tap Workflows
18/24
Why is this good?
Tasks are distributable as gems
Encapsulation/Reuse
Structured enough for novel interfaces
-
8/14/2019 Tap Workflows
19/24
Tap-Server
Alpha alpha alpha
Tasks and Workflows in the browser
Immediate, easy interface for new users(customers, friends)
Simple Distributable Controllers
-
8/14/2019 Tap Workflows
20/24
Demo
% tap server
http://localhost:8080/http://localhost:8080/schema
% tap run
http://localhost:8080/capture/tutorial
% rap load --: tap-http:submit
http://localhost:8080/schemahttp://localhost:8080/http://localhost:8080/schemahttp://localhost:8080/schemahttp://localhost:8080/http://localhost:8080/ -
8/14/2019 Tap Workflows
21/24
Demo Summary
All happens in tap-server
Install a gem, get local controllers... tutorials,gui, etc.
Potential for interaction with web data
Potential to use browser as task interface
-
8/14/2019 Tap Workflows
22/24
Goodies...
Rap - rakish syntax for declaring tasks
Lazydoc - pull comments into object space
Configurable - class-based configs mapping tocommand line
Rap.task :sample, :one, :key => value do |task, args|
task.key # => valueargs.one # => 1 (% rap sample 1)
end
-
8/14/2019 Tap Workflows
23/24
Gotchas
Discovering tasks
Task documentation must have ::manifesttap.yml - used in pwd to manually specifywhich gems to include; package with gemto allow autodiscovery of gem tasks
Rap tasks dont package, pass results, orappear in tap-server. Local tasks only.
-
8/14/2019 Tap Workflows
24/24
tap.rubyforge.org