Added support for multiple samples in raw/ (#540) #516
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
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@v2 | |
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 |