Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the cleanup profile and use it for our Tower Sanger tests #79

Merged
merged 8 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Launch workflow via tower
uses: nf-core/tower-action@v2
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 }}
pipeline: ${{ github.repository }}
revision: ${{ github.sha }}
workdir: ${{ secrets.TOWER_WORKDIR_PARENT }}/work/${{ github.repository }}/work-${{ github.sha }}
parameters: |
{
"outdir": "${{ secrets.TOWER_WORKDIR_PARENT }}/results/${{ github.repository }}/results-${{ github.sha }}",
}
profiles: test,sanger,singularity
profiles: test,sanger,singularity,cleanup

- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
path: |
tower_action_*.log
tower_action_*.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@ jobs:
if: github.event_name == 'workflow_dispatch'

- name: Launch workflow via tower
uses: nf-core/tower-action@v2
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 }}
pipeline: ${{ github.repository }}
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
profiles: test_full,sanger,singularity,cleanup

- uses: actions/upload-artifact@v3
with:
name: Tower debug log file
path: |
tower_action_*.log
tower_action_*.json
4 changes: 2 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ process {

withName: SAMPLESHEET_CHECK {
publishDir = [
path: { "${params.outdir}/readmapping_info" },
path: { "${params.outdir}/pipeline_info/readmapping" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand Down Expand Up @@ -131,7 +131,7 @@ process {

withName: CUSTOM_DUMPSOFTWAREVERSIONS {
publishDir = [
path: { "${params.outdir}/readmapping_info" },
path: { "${params.outdir}/pipeline_info/readmapping" },
mode: params.publish_dir_mode,
pattern: '*_versions.yml'
]
Expand Down
2 changes: 1 addition & 1 deletion docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ A number of genome-specific files are generated by the pipeline because they are
<details markdown="1">
<summary>Output files</summary>

- `readmapping_info/`
- `pipeline_info/readmapping/`
- Reports generated by Nextflow: `execution_report.html`, `execution_timeline.html`, `execution_trace.txt` and `pipeline_dag.dot`/`pipeline_dag.svg`.
- Reports generated by the pipeline: `pipeline_report.html`, `pipeline_report.txt` and `software_versions.yml`. The `pipeline_report*` files will only be present if the `--email` / `--email_on_fail` parameter's are used when running the pipeline.
- Reformatted samplesheet files used as input to the pipeline: `samplesheet.valid.csv`.
Expand Down
2 changes: 1 addition & 1 deletion lib/NfcoreTemplate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class NfcoreTemplate {
}

// Write summary e-mail HTML to a file
def output_d = new File("${params.outdir}/readmapping_info/")
def output_d = new File("${params.outdir}/pipeline_info/readmapping/")
if (!output_d.exists()) {
output_d.mkdirs()
}
Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ params {

// Boilerplate options
outdir = "./results"
tracedir = "${params.outdir}/readmapping_info"
tracedir = "${params.outdir}/pipeline_info/readmapping"
publish_dir_mode = 'copy'
email = null
email_on_fail = null
Expand Down Expand Up @@ -69,6 +69,7 @@ try {


profiles {
cleanup { cleanup = true }
debug { process.beforeScript = 'echo $HOSTNAME' }
conda {
conda.enabled = true
Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
"tracedir": {
"type": "string",
"description": "Directory to keep pipeline Nextflow logs and reports.",
"default": "${params.outdir}/readmapping_info",
"default": "${params.outdir}/pipeline_info/readmapping",
"fa_icon": "fas fa-cogs",
"hidden": true
},
Expand Down