Last active
April 24, 2019 01:42
-
-
Save samuell/f3dfeb997a7078f06b9a98ee440f7f3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
sp "github.com/scipipe/scipipe" | |
spc "github.com/scipipe/scipipe/components" | |
) | |
func main() { | |
wf := sp.NewWorkflow("example_workflow", 4) | |
// Note that this command does not run in a task-specific sub-folder, since it is not creating any output files directly. | |
// ... which means files should not prepended with '../' | |
targetExtractor := spc.NewCommandToParams(wf, "cmdtoparam", `awk -f"\t" '{ print $1 }' database | sort | uniq`) | |
createDataset := wf.NewProc("create_dataset", `grep "{p:target}" ../database > {o:dataset}`) | |
createDataset.SetOut("dataset", "dataset_{p:target}.tsv") | |
createDataset.InParam("target").From(targetExtractor.OutParam()) | |
wf.Run() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment