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

Small inconsistency in the workflow output definitions preview #5476

Open
nvnieuwk opened this issue Nov 6, 2024 · 0 comments · May be fixed by #5502
Open

Small inconsistency in the workflow output definitions preview #5476

nvnieuwk opened this issue Nov 6, 2024 · 0 comments · May be fixed by #5502
Labels

Comments

@nvnieuwk
Copy link

nvnieuwk commented Nov 6, 2024

Bug report

Expected behavior and actual behavior

While trying out the workflow output definitions, I noticed some small inconsistencies on how the actual publishing happens between the different methods.

This will publish to the $launchDir or $projectDir (not sure which one it is in this case) location instead of publishing relative to the output directory:

'test' { 
    path { txt -> "dir/${txt.name}" }
}

While this will publish relative to the output directory:

'test2' { 
    path { _txt -> { file -> "dir/${file}" } }
}

So when I executed both at the same time, the result was this:

.
├── dir
│   └── test.txt
│       └── test.txt -> /home/nvnieuwk/Documents/nextflow/issues/workflow-output-inconsistency/work/26/f7361be58d416641ec7e2226210613/test.txt
├── main.nf
├── results
│   └── dir
│       └── test2.txt -> /home/nvnieuwk/Documents/nextflow/issues/workflow-output-inconsistency/work/26/f7361be58d416641ec7e2226210613/test2.txt
└── work
    └── 26
        └── f7361be58d416641ec7e2226210613
            ├── test2.txt
            └── test.txt

I think it would be better if this behaviour would be consistent between both methods. Where all relative paths are published relative to the output directory and all absolute paths will be published to the absolute path instead.

Steps to reproduce the problem

Execute the MRE in the dropdown menu below

MRE
nextflow.preview.output = true

process TEST {
    output:
    path("test.txt"), emit: test
    path("test2.txt"), emit: test2

    script:
    """
    touch test.txt
    touch test2.txt
    """
}

workflow {
    main:
    TEST()

    publish:
    TEST.out.test >> 'test'
    TEST.out.test2 >> 'test2'
}

output {
    'test' { 
        path { txt -> "dir/${txt.name}" }
    }
    'test2' { 
        path { _txt -> { file -> "dir/${file}" } }
    }
}

Environment

  • Nextflow version: 24.10.0
  • Java version: 17.0.3
  • Operating system: Ubuntu
@bentsherman bentsherman linked a pull request Nov 13, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants