Skip to content

Add rclone copy#12337

Open
antoniasaracco wants to merge 26 commits into
nf-core:masterfrom
antoniasaracco:create_Rclone
Open

Add rclone copy#12337
antoniasaracco wants to merge 26 commits into
nf-core:masterfrom
antoniasaracco:create_Rclone

Conversation

@antoniasaracco

Copy link
Copy Markdown
Contributor

I added a new module for the RCLONE suite: rclone copy.

This module uses rclone copy to transfer files from the source path to the destination path, while allowing extra arguments to be passed through task.ext.args. This makes it possible to configure options such as logging, stats, certificate handling, chunk size, HTTP URL support and dry-run behavior from the pipeline config.

Notes:

For the nf-test, I am using the same input and output location together with --dry-run. The module would not have write permissions to perform the actual copy in the test environment, so running it this way allows us to mock how the command would be executed without requiring remote write access.

This is related to nf-core/datasync#45

@antoniasaracco antoniasaracco marked this pull request as draft July 9, 2026 15:03
@antoniasaracco antoniasaracco marked this pull request as ready for review July 9, 2026 16:05
Comment thread modules/nf-core/rclone/copy/tests/main.nf.test
Comment thread modules/nf-core/rclone/copy/tests/main.nf.test
Comment thread modules/nf-core/rclone/copy/main.nf Outdated
Comment thread modules/nf-core/rclone/copy/main.nf Outdated
Comment on lines +24 to +25
def transfers = task.cpus
def checkers = task.cpus

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these supposed to both be the same?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are correct. I've modified now to respect the ratio between transfers and checkers set by default in the tool.
image
https://rclone.org/flags/

Comment thread modules/nf-core/rclone/copy/main.nf Outdated

input[0] = [
[ id:'test' ],
':http:' + test_file_path,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little ugly, can it not directly take the https: path?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment! This is what I have found to make it work with https but please let me know if you have any other solution.

image https://rclone.org/http/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine.
One thought would be whether you could add the http: inside the module...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I thought it would be best for each pipeline to handle this outside but makes sense. What do you think now?

@antoniasaracco antoniasaracco requested a review from SPPearce July 13, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants