Skip to content

Commit

Permalink
Merge pull request #142 from sanger-tol/tower
Browse files Browse the repository at this point in the history
Tower
  • Loading branch information
DLBPointon authored Sep 21, 2023
2 parents d68fea5 + 718acec commit 7fc4137
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 104 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ jobs:
- name: Download test data
# Download A fungal test data set that is full enough to show some real output.
run: |
curl https://dp24.cog.sanger.ac.uk/TreeValTinyData.tar.gz | tar xzf -
curl https://tolit.cog.sanger.ac.uk/test-data/resources/treeval/TreeValTinyData.tar.gz | tar xzf -
- name: Run RAPID pipeline with test data
# Remember that you can parallelise this by using strategy.matrix
run: |
nextflow run ${GITHUB_WORKSPACE} -entry RAPID -profile github_test,docker --outdir ./results-rapid
nextflow run ${GITHUB_WORKSPACE} -entry RAPID -profile test,docker --outdir ./results-rapid
- name: Run FULL pipeline with test data
# Remember that you can parallelise this by using strategy.matrix
run: |
nextflow run ${GITHUB_WORKSPACE} -entry FULL -profile github_test,docker --outdir ./results-full
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results-full
43 changes: 43 additions & 0 deletions .github/workflows/sanger_test_full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: sanger-tol LSF full size tests

on:
push:
branches:
- main
- dev
workflow_dispatch:
jobs:
run-tower:
name: Run LSF full size tests
runs-on: ubuntu-latest
steps:
- name: Sets env vars for push
run: |
echo "REVISION=${{ github.sha }}" >> $GITHUB_ENV
if: github.event_name == 'push'

- name: Sets env vars for workflow_dispatch
run: |
echo "REVISION=${{ github.sha }}" >> $GITHUB_ENV
if: github.event_name == 'workflow_dispatch'

- name: Launch workflow via tower
uses: seqeralabs/action-tower-launch@v2
with:
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
compute_env: ${{ secrets.TOWER_COMPUTE_ENV }}
revision: ${{ env.REVISION }}
workdir: ${{ secrets.TOWER_WORKDIR_PARENT }}/work/${{ github.repository }}/work-${{ env.REVISION }}
parameters: |
{
"outdir": "${{ secrets.TOWER_WORKDIR_PARENT }}/results/${{ github.repository }}/results-${{ env.REVISION }}",
}
profiles: test_full,sanger,singularity,cleanup

- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
path: |
tower_action_*.log
tower_action_*.json
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ Currently, it is advised to run the pipeline with docker or singularity as a sma
Now, you can run the pipeline using:

```bash
nextflow run main.nf -profile singularity --input treeval.yaml -entry {FULL|RAPID} --outdir {OUTDIR}
# For the FULL pipeline
nextflow run main.nf -profile singularity --input treeval.yaml --outdir {OUTDIR}

# For the RAPID subset
nextflow run main.nf -profile singularity --input treeval.yaml -entry RAPID --outdir {OUTDIR}
```

An example treeval.yaml can be found [here](assets/local_testing/nxOscDF5033.yaml).
Expand All @@ -58,7 +62,7 @@ sanger-tol/treeval has been written by Damon-Lee Pointon (@DLBPointon), Yumi Sim
We thank the following people for their extensive assistance in the development of this pipeline:

<ul>
<li>@gq1 - For building the infrastructure around TreeVal</li>
<li>@gq1 - For building the infrastructure around TreeVal and helping with code review</li>
<li>@ksenia-krasheninnikova - For help with C code implementation and YAML parsing</li>
<li>@mcshane - For guidance on algorithms </li>
<li>@muffato - For code reviews and code support</li>
Expand Down
31 changes: 0 additions & 31 deletions assets/github_testing/TreeValTinyTest-Local.yaml

This file was deleted.

7 changes: 3 additions & 4 deletions assets/local_testing/nxOscDF5033.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ assembly:
classT: nematode
asmVersion: 1
gevalType: DTOL
reference_file: /lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_DF5033/assembly/draft/DF5033.hifiasm.noTelos.20211120/DF5033.noTelos.hifiasm.purged.noCont.noMito.fasta
#/lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_DF5033/assembly/draft/DF5033.hifiasm.noTelos.20211120/DF5033.noTelos.hifiasm.purged.noCont.noMito.fasta
reference_file: /lustre/scratch123/tol/resources/treeval/treeval-testdata/TreeValSmallData/Oscheius_DF5033/assembly/draft/DF5033.hifiasm.noTelos.20211120/DF5033.noTelos.hifiasm.purged.noCont.noMito.fasta
assem_reads:
pacbio: /lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_DF5033/genomic_data/nxOscSpes1/pacbio/fasta/
hic: /lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_DF5033/genomic_data/nxOscSpes1/hic-arima2/full/
pacbio: /lustre/scratch123/tol/resources/treeval/treeval-testdata/TreeValSmallData/Oscheius_DF5033/genomic_data/nxOscSpes1/pacbio/fasta/
hic: /lustre/scratch123/tol/resources/treeval/treeval-testdata/TreeValSmallData/Oscheius_DF5033/genomic_data/nxOscSpes1/hic-arima2/full/
supplementary: path
alignment:
data_dir: /lustre/scratch123/tol/resources/treeval/gene_alignment_data/
Expand Down
8 changes: 4 additions & 4 deletions assets/local_testing/nxOscSUBSET.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ assembly:
classT: nematode
asmVersion: 1
gevalType: DTOL
reference_file: /lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_SUBSET/assembly/draft/SUBSET_genome/Oscheius_SUBSET.fasta
reference_file: /lustre/scratch123/tol/resources/treeval/treeval-testdata/TreeValSmallData/Oscheius_SUBSET/assembly/draft/SUBSET_genome/Oscheius_SUBSET.fasta
#/lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_DF5033/assembly/draft/DF5033.hifiasm.noTelos.20211120/DF5033.noTelos.hifiasm.purged.noCont.noMito.fasta
assem_reads:
pacbio: /lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_SUBSET/genomic_data/pacbio/
hic: /lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_DF5033/genomic_data/nxOscSpes1/hic-arima2/subset/
pacbio: /lustre/scratch123/tol/resources/treeval/treeval-testdata/TreeValSmallData/Oscheius_SUBSET/genomic_data/pacbio/
hic: /lustre/scratch123/tol/resources/treeval/treeval-testdata/TreeValSmallData/Oscheius_DF5033/genomic_data/nxOscSpes1/hic-arima2/subset/
supplementary: path
alignment:
data_dir: /lustre/scratch123/tol/resources/treeval/nextflow_test_data/Oscheius_SUBSET/gene_set/
data_dir: /lustre/scratch123/tol/resources/treeval/treeval-testdata/TreeValSmallData/Oscheius_SUBSET/gene_set/
common_name: "" # For future implementation (adding bee, wasp, ant etc)
geneset: "Gae_host.Gae"
#Path should end up looking like "{data_dir}{classT}/{common_name}/csv_data/{geneset}-data.csv"
Expand Down
25 changes: 0 additions & 25 deletions conf/github_test.config

This file was deleted.

25 changes: 0 additions & 25 deletions conf/local_github_test.config

This file was deleted.

12 changes: 7 additions & 5 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
*/

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'
config_profile_name = 'GitHub FULL test'
config_profile_description = 'FULL Test Data for GitHub Actions test'

// Limit resources so that this can run on GitHub Actions
max_cpus = 6
max_memory = '12.GB'
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'

input = 'assets/local_testing/nxOscSUBSET.yaml'
// Input data
input = "${projectDir}/assets/github_testing/TreeValTinyTest.yaml"
outdir = "TinyTest"
}
2 changes: 1 addition & 1 deletion conf/farm_test.config → conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ params {
config_profile_description = "FULL test dataset to check pipeline function, using a current full local dataset"

input = "${projectDir}/assets/local_testing/nxOscDF5033.yaml"
output = nxOscDF5033
outdir = "SmallTest"
}
2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ workflow SANGERTOL_TREEVAL_RAPID {
//
// WORKFLOWS: Execute named workflow for the pipeline
//
workflow FULL {
workflow {
SANGERTOL_TREEVAL ()
}

Expand Down
6 changes: 3 additions & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ try {


profiles {
cleanup { cleanup = true }
debug {
dumpHashes = true
process.beforeScript = 'echo $HOSTNAME'
Expand Down Expand Up @@ -151,9 +152,8 @@ profiles {
executor.memory = 60.GB
}

farm_test { includeConfig 'conf/farm_test.config' }
github_test { includeConfig 'conf/github_test.config' }
local_github_test { includeConfig 'conf/local_github_test.config' }
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
}


Expand Down

0 comments on commit 7fc4137

Please sign in to comment.