Created
September 30, 2016 13:57
-
-
Save dtrudg/7f1104d77bcd86335272b7f4892c26eb to your computer and use it in GitHub Desktop.
SLURM requeue test
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
// Path to an input file, or a pattern for multiple inputs | |
// Note - $baseDir is the location of this workflow file main.nf | |
params.story = "$baseDir/../test_data/mobydick.txt" | |
stories = Channel.fromPath( params.story ) | |
process uppercase { | |
cpus 1 | |
input: | |
file story from stories | |
output: | |
file "${story.name}.uppercase" into uppercased | |
""" | |
cat "$story" | tr "[a-z]" "[A-Z]" > "${story.name}.uppercase" | |
""" | |
} | |
process tolines { | |
cpus 1 | |
input: | |
file uppercase from uppercased | |
output: | |
file "${uppercase.name}.tolines" into tolines | |
""" | |
cat "$uppercase" | tr -cs "A-Z'" "\012" > "${uppercase.name}.tolines" | |
sleep 3600 | |
""" | |
} | |
process wordcounts { | |
// Publish the outputs we create here into the workflow output directory | |
publishDir "$baseDir/output", mode: 'copy' | |
input: | |
file wordlines from tolines | |
output: | |
file "${wordlines.name}.wordcount" | |
""" | |
cat "$wordlines" | sort | uniq -c | sort -n -r > "${wordlines.name}.wordcount" | |
""" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment