Skip to content

Instantly share code, notes, and snippets.

@robsyme
Created November 26, 2020 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robsyme/7145f8ffc3c340855b0dc6281d7faeef to your computer and use it in GitHub Desktop.
Save robsyme/7145f8ffc3c340855b0dc6281d7faeef to your computer and use it in GitHub Desktop.
class Dog {
final String name
Dog(String name) {
this.name = name
}
@Override
public int hashCode() {
return name.hashCode()
}
}
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
import Dog
process Woof {
input:
val(dog)
"echo ${dog.name} says woof! > bark_book.txt"
}
workflow {
Channel.from( "Fido", "Spot", "Lassie", "Barky" ) | map { new Dog(it) } | Woof
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment