John Salamon
Aug 28, 2024
|
) is a special operator, and it
works just like a pipe in bash
# Piping
A | B | C
# Versus, more procedural style (same outcome)
ch_out = A()
ch_out_2 = B(ch_out)
C(ch_out_2)
// Use two forward slashes for single line comments
// Assign variables like this:
x = 2
// define Lists
myList = [1,2,3]
// and Maps
myMap = ["key": "value"]
// access object methods and attributes with a dot
myList.size() // returns 3
// parentheses can be omitted for single parameter functions
// e.g., the following two lines are equivalent:
println("hello world")
println "hello world"
Nextflow | Snakemake | |
---|---|---|
Language extends | Groovy | Python |
DAG is defined | Explicitly | Implicitly |
Root of graph is | Inputs | Outputs |
History | More commercial | More academic |
Snakemake - makefile style (start by naming outputs) - define multiple rules - naming a target then generates your DAG by combining rules - your workflow structure is implicit
Nextflow - dataflow programming (start by naming inputs) - define multiple processes - join them together in a workflow, explicity - You just provide inputs and everything runs
Let’s write a workflow!