Last active
May 7, 2020 14:26
-
-
Save elowy01/b2e83f6d1517bfdf47fb3159563a0230 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env nextflow | |
params.samplel = false | |
process test_sample { | |
when: | |
params.sample | |
script: | |
""" | |
echo "sample" | |
""" | |
} | |
process test_sample_list { | |
when: | |
params.samplel | |
script: | |
""" | |
echo "sample list" | |
""" | |
} | |
//Other example: | |
// There is the option of running the script with a single sample passed | |
// in command line or passing a file with sample ids | |
params.sample = false | |
params.samplel = false | |
process test_sample { | |
when: | |
params.sample | |
script: | |
""" | |
echo "sample" | |
""" | |
} | |
if (params.samplel) { | |
Channel.fromPath(params.samplel) | |
.splitText() | |
.set { sample_list } | |
process test_sample_list { | |
input: | |
val s from sample_list | |
when: | |
params.samplel | |
script: | |
""" | |
echo "sample list: $s" | |
""" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment