-
Notifications
You must be signed in to change notification settings - Fork 58
171 lines (162 loc) · 6.25 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths-ignore:
- README.md
- CHANGES.md
- .gitpod.yml
- 'docs/**'
- 'setup/**'
- 'env/*'
pull_request:
branches: [ master ]
paths-ignore:
- README.md
- CHANGES.md
- .gitpod.yml
- 'docs/**'
- 'setup/**'
- 'env/*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Downloads exemplar data from S3 as needed
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Nextflow
run: curl -fsSL get.nextflow.io | bash
# Exemplars will be cached
- name: Exemplar-001 cache
uses: actions/cache@v3
id: cache-ex001
with:
path: ~/data/exemplar-001
key: ex001-2022-02-24
- name: Exemplar-001 (w/ autofluorescence) cache
uses: actions/cache@v3
id: cache-ex001-af
with:
path: ~/data/af/exemplar-001
key: ex001-af-2023-01-14
- name: Exemplar-002 cache
uses: actions/cache@v3
id: cache-ex002
with:
path: ~/data/exemplar-002
key: ex002-2022-02-24
# Download data only if no cache is available
- name: Exemplar-001 download
if: steps.cache-ex001.outputs.cache-hit != 'true'
run: ./nextflow exemplar.nf --name exemplar-001 --path ~/data
- name: Exemplar-001 (w/ autofluorescence) download
if: steps.cache-ex001-af.outputs.cache-hit != 'true'
run: ./nextflow exemplar.nf --name exemplar-001 --path ~/data/af --from-cycle 1 --to-cycle 3
- name: Exemplar-002 download
if: steps.cache-ex002.outputs.cache-hit != 'true'
run: ./nextflow exemplar.nf --name exemplar-002 --path ~/data --from-cycle 6 --to-cycle 7
# Test exemplar-001
ex001:
strategy:
matrix:
params:
- --viz
- --start-at illumination --stop-at registration
- --background
- --background --background-method imagej-rolling-ball
- --segmentation cypository --cypository-opts '--channel 10 --scalingFactor 2' --s3seg-opts '--logSigma 45 300'
- --segmentation ilastik,mesmer
- --segmentation cellpose --mcquant-opts '--masks *masks.tif'
- --viz --segmentation ilastik -profile singularity
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Singularity
uses: eWaterCycle/setup-singularity@v7
if: ${{ contains(matrix.params, 'singularity') }}
with:
singularity-version: 3.8.3
- name: Install Nextflow
run: curl -fsSL get.nextflow.io | bash
- name: Restore exemplar-001 cache
uses: actions/cache@v3
if: ${{ !contains(matrix.params, 'background') }}
with:
path: ~/data/exemplar-001
key: ex001-2022-02-24
- name: Restore exemplar-001 (w/ autofluorescence) cache
uses: actions/cache@v3
if: ${{ contains(matrix.params, 'background') }}
with:
path: ~/data/af/exemplar-001
key: ex001-af-2023-01-14
- name: Adjust data location for the autofluorescence exemplar
if: ${{ contains(matrix.params, 'background') }}
run: mv ~/data/af/exemplar-001 ~/data
- name: Test exemplar-001 with additional parameters
run: |
docker rmi -f $(docker images -a -q)
./nextflow main.nf --in ~/data/exemplar-001 ${{ matrix.params }}
ls -R ~/data/exemplar-001
- name: Upload processed result
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'push' && contains(matrix.params, 'viz') }}
with:
name: exemplar-001
path: |
~/data/exemplar-001
!~/data/exemplar-001/raw
!~/data/exemplar-001/illumination
# Step-by-step test of exemplar-001
ex001-by-step:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Nextflow
run: curl -fsSL get.nextflow.io | bash
- name: Restore exemplar-001 cache
uses: actions/cache@v3
with:
path: ~/data/exemplar-001
key: ex001-2022-02-24
- name: Test exemplar-001 step-by-step
run: |
docker rmi -f $(docker images -a -q)
./nextflow main.nf --in ~/data/exemplar-001 --start-at registration --stop-at registration
./nextflow clean -f last
./nextflow main.nf --in ~/data/exemplar-001 --start-at segmentation --stop-at segmentation
./nextflow main.nf --in ~/data/exemplar-001 --start-at watershed --stop-at watershed
./nextflow main.nf --in ~/data/exemplar-001 --start-at quantification --stop-at quantification
docker rmi -f $(docker images -a -q)
./nextflow main.nf --in ~/data/exemplar-001 --start-at downstream --stop-at downstream --downstream scimap
./nextflow main.nf --in ~/data/exemplar-001 --start-at downstream --stop-at downstream --downstream naivestates
./nextflow main.nf --in ~/data/exemplar-001 --start-at downstream --stop-at downstream --downstream fastpg
./nextflow main.nf --in ~/data/exemplar-001 --start-at downstream --stop-at downstream --downstream scanpy
./nextflow main.nf --in ~/data/exemplar-001 --start-at downstream --stop-at downstream --downstream flowsom
ls -R ~/data/exemplar-001
# One-shot test of exemplar-002
ex002:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Nextflow
run: curl -fsSL get.nextflow.io | bash
- name: Restore exemplar-002 cache
uses: actions/cache@v3
with:
path: ~/data/exemplar-002
key: ex002-2022-02-24
- name: Test exemplar-002
run: |
docker rmi -f $(docker images -a -q)
./nextflow main.nf --in ~/data/exemplar-002 --tma --start-at registration --stop-at segmentation
docker rmi -f $(docker images -a -q)
./nextflow main.nf --in ~/data/exemplar-002 --tma --start-at quantification
ls -R ~/data/exemplar-002