This file contains 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
params.pipes = false //Alternative sytax for DSL2 workflows | |
params.nested = false //if not pipes, use the nested workflow syntax | |
workflow { | |
/* | |
For demonstration purposes we are comparing 3 different | |
syntax styles of workflow composition | |
These can also be mixed. | |
The 'pipes' work best when each process has only one input (which may be a tuple of multiple elements) | |
*/ |
This file contains 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
# 1.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
This file contains 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
feedback_ch = Channel.create() | |
input_ch = Channel.from([1,2,3,4,5,6,7]).merge( feedback_ch ) //.until{count++ > 10 } | |
feedback_ch << 1 | |
process build { | |
input: tuple val(v), val(u) from input_ch | |
output: val(y) into feedback_ch | |
exec: | |
y = v+u |
This file contains 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
# Ensure each new screen ends up with it's own history file bind c screen bash -ic 'HISTFILE=~/.bash_history.${WINDOW} bash' | |
bind c screen bash -ic 'HISTFILE=~/.bash_history.${WINDOW} bash -l' | |
bind ^C screen bash -ic 'HISTFILE=~/.bash_history.${WINDOW} bash -l' | |
# some default tabs | |
screen -t "bash" bash -l | |
#termcapinfo xterm ti@:te@ | |
# Bind F8 and F9 to previous and next screen window | |
bindkey -k k8 prev |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
channelsQ = (Channel.from('World', 'Mundo').into(2) as Queue) | |
process foo { | |
input: val x from ( channelsQ.poll() ) | |
exec: println "Foo says: Hello ${x}" | |
} | |
process bar { | |
input: val x from ( channelsQ.poll() ) | |
exec: println "Bar says: Hello ${x}" |
This file contains 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
flatMap { flag, files -> | |
files instanceof Collection ? {def ret = []; files.each {ret << [flag, it] }; ret}() : [[flag, files]] | |
} |
This file contains 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
task_id hash native_id name status exit submit duration realtime %cpu peak_rss peak_vmem rchar wchar | |
3 93/5be529 25680649 fetchRemoteDataFromEnsemblPlants ([species:Arabidopsis_thaliana, version:TAIR10, source:https://plants.ensembl.org/Arabidopsis_thaliana, release:39, shortName:TAIR]) CACHED 0 2019-05-13 22:16:05.866 34.5s 26.2s 1.1% 9.2 MB 199.7 MB 9.5 MB 41.5 MB | |
4 b6/e465bf 25680659 fetchRemoteDataFromEnsemblPlants ([species:Hordeum_vulgare, version:IBSC_v2, source:https://plants.ensembl.org/Hordeum_vulgare, release:43, shortName:Barley]) CACHED 0 2019-05-13 22:19:06.207 34.7s 31.3s 2.4% 9.3 MB 199.7 MB 18 MB 145.4 MB | |
6 16/ad4f35 25680648 fetchRemoteDataFromEnsemblPlants ([species:Oryza_sativa, version:IRGSP-1.0, source:https://plants.ensembl.org/Oryza_sativa, release:39, shortName:IRGSP]) CACHED 0 2019-05-13 22:16:05.777 34.5s 26.9s 1.1% 9.3 MB 199.7 MB 9.7 MB 34.6 MB | |
3 be/dde3f8 25680802 fetchRemoteDataFromEnsemblPlants ([species:Brachypodium_distachyon, version:Brachypodium_distachyon_v3.0, source:http |
This file contains 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
def args = ['-arg 1', '-arg 2', '-arg 3', '-arg 4'] | |
comb = [] | |
1.upto(args.size()) { | |
[args].multiply(it).eachCombination { list -> | |
if(list.size() == 1 || (1..<list.size()).every { list[it - 1] < list[it] }) { | |
comb << list | |
} | |
} | |
} |
This file contains 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
bars = ['bar1', 'bar2'] | |
process foo { | |
tag "${bar}" | |
label "${bar}" | |
input: | |
each bar from bars | |
exec: | |
println ("Current: "+bar) |