Tap Workflows

  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Tap Workflows as PDF for free.

More details

  • Words: 465
  • Pages: 24
Tap Workflows c

x

x1

y

x2

y1

z

a

?

b

c1

b1

c2

Tap (Task Application) Framework for command line apps Configurations, Documentation, Distribution Workflows: sequence, fork, merge, sync merge, switch

Workflows a --: b --: c Think of a, b, c as methods (literally they are)

Sequence a --: b --: c result_a = a(input) result_b = b(result_a) result_c = c(result_b)

Fork --a[b, c] result_a = a(input) result_b = b(result_a) result_c = c(result_a)

Merge --c{a,b} result_a = a(input) result_b = b(input) result_c = c(result_a, result_b)

Variations a --:i b a(input).each do |result_a| # i b(result_a) end a --:s b b(*a(input))

# s

Variations a --:i b --:a c results_b = [] a(input).each do |result_a| # i results_b << b(result_a) # a end c(*results_b)

Tap Workflows

Build workflows from command line Get behavior like in a script

Think about | % git diff | mate Pipe is just a sequence Serves us well... but it’s just a sequence

Example

Digest: splits a protein sequence Fragment: numerical transform on substrings Format Mfg: formats results as .mgf

Desired Workflow

(protein) - - [peptides...] (peptide) - - [data, headers] (data, headers) - <mgf> - string

digest --:i fragment --:s mgf

Fragment

Fragment

Fragment

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

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

Why is this good?

Tasks are distributable as gems Encapsulation/Reuse Structured enough for novel interfaces

Tap-Server Alpha alpha alpha Tasks and Workflows in the browser Immediate, easy interface for new users (customers, friends) Simple Distributable Controllers

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

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

Goodies... Rap - rakish syntax for declaring tasks Rap.task :sample, :one, :key => ‘value’ do |task, args| task.key # => ‘value’ args.one # => 1 (% rap sample 1) end

Lazydoc - pull comments into object space Configurable - class-based configs mapping to command line

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.

tap.rubyforge.org

Related Documents

Tap Workflows
December 2019 13
Workflows
November 2019 9
Tap
April 2020 20
Quyen 5 Suu Tap Tap
November 2019 31