|
| 1 | +#!/usr/bin/env nextflow |
| 2 | +// hash:sha256:e60c74eb0db9870da170bd3833dbe435cba6b383333fc48223204b0a17b1e6f0 |
| 3 | + |
| 4 | +// capsule - MOSuite-create |
| 5 | +process capsule_mosuite_create_2 { |
| 6 | + tag 'capsule-6541445' |
| 7 | + container "$REGISTRY_HOST/published/5ce5f88d-980d-4e61-b3a4-ef4a0ce48030:v2" |
| 8 | + |
| 9 | + cpus 1 |
| 10 | + memory '7.5 GB' |
| 11 | + |
| 12 | + output: |
| 13 | + path 'capsule/results/*', emit: to_capsule_mosuite_clean_1_1 |
| 14 | + |
| 15 | + script: |
| 16 | + """ |
| 17 | + #!/usr/bin/env bash |
| 18 | + set -e |
| 19 | +
|
| 20 | + export CO_CAPSULE_ID=5ce5f88d-980d-4e61-b3a4-ef4a0ce48030 |
| 21 | + export CO_CPUS=1 |
| 22 | + export CO_MEMORY=8053063680 |
| 23 | +
|
| 24 | + mkdir -p capsule |
| 25 | + mkdir -p capsule/data && ln -s \$PWD/capsule/data /data |
| 26 | + mkdir -p capsule/results && ln -s \$PWD/capsule/results /results |
| 27 | + mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch |
| 28 | +
|
| 29 | + echo "[${task.tag}] cloning git repo..." |
| 30 | + if [[ "\$(printf '%s\n' "2.20.0" "\$(git version | awk '{print \$3}')" | sort -V | head -n1)" = "2.20.0" ]]; then |
| 31 | + git clone --filter=tree:0 --branch v2.0 "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-6541445.git" capsule-repo |
| 32 | + else |
| 33 | + git clone --branch v2.0 "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-6541445.git" capsule-repo |
| 34 | + fi |
| 35 | + mv capsule-repo/code capsule/code && ln -s \$PWD/capsule/code /code |
| 36 | + rm -rf capsule-repo |
| 37 | +
|
| 38 | + echo "[${task.tag}] running capsule..." |
| 39 | + cd capsule/code |
| 40 | + chmod +x run |
| 41 | + ./run ${params.capsule_mosuite_create_2_args} |
| 42 | +
|
| 43 | + echo "[${task.tag}] completed!" |
| 44 | + """ |
| 45 | +} |
| 46 | + |
| 47 | +// capsule - MOSuite-clean |
| 48 | +process capsule_mosuite_clean_1 { |
| 49 | + tag 'capsule-5801113' |
| 50 | + container "$REGISTRY_HOST/published/ab07963e-d9e0-489e-b776-70f6ef2ef73b:v1" |
| 51 | + |
| 52 | + cpus 1 |
| 53 | + memory '7.5 GB' |
| 54 | + |
| 55 | + input: |
| 56 | + path 'capsule/data/' |
| 57 | + |
| 58 | + script: |
| 59 | + """ |
| 60 | + #!/usr/bin/env bash |
| 61 | + set -e |
| 62 | +
|
| 63 | + export CO_CAPSULE_ID=ab07963e-d9e0-489e-b776-70f6ef2ef73b |
| 64 | + export CO_CPUS=1 |
| 65 | + export CO_MEMORY=8053063680 |
| 66 | +
|
| 67 | + mkdir -p capsule |
| 68 | + mkdir -p capsule/data && ln -s \$PWD/capsule/data /data |
| 69 | + mkdir -p capsule/results && ln -s \$PWD/capsule/results /results |
| 70 | + mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch |
| 71 | +
|
| 72 | + echo "[${task.tag}] cloning git repo..." |
| 73 | + if [[ "\$(printf '%s\n' "2.20.0" "\$(git version | awk '{print \$3}')" | sort -V | head -n1)" = "2.20.0" ]]; then |
| 74 | + git clone --filter=tree:0 --branch v1.0 "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-5801113.git" capsule-repo |
| 75 | + else |
| 76 | + git clone --branch v1.0 "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-5801113.git" capsule-repo |
| 77 | + fi |
| 78 | + mv capsule-repo/code capsule/code && ln -s \$PWD/capsule/code /code |
| 79 | + rm -rf capsule-repo |
| 80 | +
|
| 81 | + echo "[${task.tag}] running capsule..." |
| 82 | + cd capsule/code |
| 83 | + chmod +x run |
| 84 | + ./run ${params.capsule_mosuite_clean_1_args} |
| 85 | +
|
| 86 | + echo "[${task.tag}] completed!" |
| 87 | + """ |
| 88 | +} |
| 89 | + |
| 90 | +workflow { |
| 91 | + // run processes |
| 92 | + capsule_mosuite_create_2() |
| 93 | + capsule_mosuite_clean_1(capsule_mosuite_create_2.out.to_capsule_mosuite_clean_1_1) |
| 94 | +} |
0 commit comments