Ejemplo n.º 1
0
# -*- coding: utf-8 -*-
from anadama2 import Workflow

workflow = Workflow(remove_options=["input", "output"])
workflow.do("ls /usr/bin/ | sort > [t:global_exe.txt]")
workflow.do("ls $HOME/.local/bin/ | sort > [t:local_exe.txt]")
workflow.do("join [d:global_exe.txt] [d:local_exe.txt] > [t:match_exe.txt]")
workflow.go()
Ejemplo n.º 2
0
# -*- coding: utf-8 -*-
from anadama2 import Workflow

ctx = Workflow(remove_options=["input", "output"])
ctx.do("wget -qO- checkip.dyndns.com > [t:my_ip.txt]")
ctx.do(r"sed 's|.*Address: \(.*[0-9]\)<.*|\1|' [d:my_ip.txt] > [t:ip.txt]")
ctx.do("whois $(cat [d:ip.txt]) > [t:whois.txt]")
ctx.go()
Ejemplo n.º 3
0
                      desc="Number of lines to trim [default: 10]",
                      default="10")

workflow.add_argument(
    name="metadata",
    desc="Metadata for performing analysis [default: input/metadata.tsv]",
    default="input/metadata.tsv")

# Parsing the workflow arguments
args = workflow.parse_args()

#Loading the config setting
args.config = 'etc/config.ini'

# AnADAMA2 example workflow.do
workflow.do("ls /usr/bin/ | sort > [t:output/global_exe.txt]")  #Command
workflow.do("ls $HOME/.local/bin/ | sort > [t:output/local_exe.txt]")  #Command

# Task0 sample python analysis module  - src/trim.py
workflow.add_task(
    "src/trim.py --lines [args[0]] --output [targets[0]] --input " +
    args.input,  #Command 
    depends=[TrackedExecutable("src/trim.py")
             ],  #Tracking executable dependencies
    targets=args.output,  #Output target directory
    args=[args.lines])  #Additional arguments

# Task1 sample python visualization module - src/plot.py
workflow.add_task(
    "src/plot.py --output [targets[0]] --input " + args.input,  #Command 
    depends=[TrackedExecutable("src/plot.py")