Skip to content

Conversation

@ejseqera
Copy link
Member

This PR adds support for reading file content from stdin using the - convention for file-based options in pipeline launch commands.

What's Changed

Users can now pass - as the value for any file option to read content from stdin instead of a file path:

  • --params-file - - Read pipeline parameters from stdin
  • --config - - Read Nextflow config from stdin
  • --pre-run - - Read pre-run script from stdin
  • --post-run - - Read post-run script from stdin

For example:

# Pass parameters via pipe
echo '{"genome": "GRCh38"}' | tw launch my-pipeline --params-file -

# Pass config via heredoc
tw launch my-pipeline --config - <<EOF
process {
    executor = 'awsbatch'
    queue = 'my-queue'
}
EOF

# Pass pre-run script from stdin
cat setup.sh | tw launch my-pipeline --pre-run -

# Chain with other commands
curl https://example.com/params.json | tw launch my-pipeline --params-file -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant