Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tap Workflows

Tap Workflows

Slides from a presentation to the Derailed group in Denver about building workflows using Tap (03/2009)

thinkerbot

October 10, 2011
Tweet

More Decks by thinkerbot

Other Decks in Programming

Transcript

  1. Tap (Task Application) Framework for command line apps Configurations, Documentation,

    Distribution Workflows: sequence, fork, merge, sync merge, switch
  2. Workflows a --: b --: c Think of a, b,

    c as methods (literally they are)
  3. Sequence a --: b --: c result_a = a(input) result_b

    = b(result_a) result_c = c(result_b)
  4. Variations a --:i b --:a c results_b = [] a(input).each

    do |result_a| # i<terate> results_b << b(result_a) # a<ggregate> end c(*results_b)
  5. Think about | Pipe is just a sequence Serves us

    well... but it’s just a sequence % git diff | mate
  6. Desired Workflow (protein) - <digest> - [peptides...] (peptide) - <fragment>

    - [data, headers] (data, headers) - <mgf> - string digest --:i fragment --:s mgf
  7. 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. 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” <workflow.yml> - [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
  9. Tap-Server Alpha alpha alpha Tasks and Workflows in the browser

    Immediate, easy interface for new users (customers, friends) Simple Distributable Controllers
  10. Demo % tap server http:/ /localhost:8080/ http:/ /localhost:8080/schema % tap

    run <schema> http:/ /localhost:8080/capture/tutorial % rap load <request.yml> --: tap-http:submit
  11. 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
  12. Goodies... Rap - rakish syntax for declaring tasks Lazydoc -

    pull comments into object space Configurable - class-based configs mapping to command line Rap.task :sample, :one, :key => ‘value’ do |task, args| task.key # => ‘value’ args.one # => 1 (% rap sample 1) end
  13. Gotchas Discovering tasks Task documentation must have ‘::manifest’ tap.yml -

    used in pwd to manually specify which gems to include; package with gem to allow autodiscovery of gem tasks Rap tasks don’t package, pass results, or appear in tap-server. Local tasks only.