Automatically Set Report to be Within the Working Directory

How can I make my Nextflow Tower (user launchpad) nf-core/rnaseq pipeline (added to the nf-core repo to the workflow repository field) generate the ./results within the scratch directory as is done on the community workspace? I’ve followed the steps in making my own pipeline and setting up my own user compute environment based on the docs but all of my report files look like the attached image where the reports are being lost as the head compute completes. I want to have the ./results outdir value be like how the community workspace is set up. For example: s3://nf-tower-bucket/scratch/1wEmeKPruuaLAf/results/salmon/deseq2_qc/deseq2.plots.pdf where it is dynamically placed in the unique id beneath the scratch folder for the bucket (in my instance it would be my own s3 bucket). I took a look at editing the NXF_FILE_ROOT env variable in my compute env but it doesn’t place the results within the unique id below the bucket ( 1wEmeKPruuaLAf ), only in BUCKET/scratch/results if I set the NXF_FILE_ROOT variable to s3://BUCKET


`

Welcome to the community forum, @Merritt-Brian! :partying_face:

As you guessed, the secret sauce for this behavior is related to the NXF_FILE_ROOT environment variable. When adding a new pipeline to your launchpad on Seqera Platform, there’s a field in advanced options named Pre-run script under Advanced options.

For the nf-core/rnaseq pipeline in the community/showcase workspace, the following is added:

export NXF_FILE_ROOT=s3://nf-tower-bucket/scratch/$TOWER_WORKFLOW_ID

You should be able to replicate this behavior by adding something similar to your pipeline :wink: