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

Function to get channel structure and files names #27

Open
LouisLeNezet opened this issue Nov 7, 2024 · 1 comment
Open

Function to get channel structure and files names #27

LouisLeNezet opened this issue Nov 7, 2024 · 1 comment

Comments

@LouisLeNezet
Copy link

Hi,

I would be interested into a function that would enable to snapshot a channel without testing the md5sum of the files in it.
The rational behind that is that in nf-core we often want to know what is inside a resulting channel of a module / subworkflow / function but due to timestamp some files cannot be checked.

The function getAllFilesFromDir would work well for workflow but it would be nice to have an equivalent for a channel.
For example, if I have a modules giving back the following:

output = Channel.of([[id:"id1", sample:"sample1"], [path/to/work/file1.bam, path/to/work/file2.bam], [path/to/work/file1.bai, path/to/work/file2.bai], path/to/work/genome.fa])

I would like the output of the function getAllFilesFromChannel(process.out) or getAllFilesFromChannel(function.result) to be :

[
    [id:"id1", sample:"sample1"],
    [file1.bam, file2.bam],
    [file1.bai, file2.bai],
    genome.fa
]

It might need to work recursively to ensure that all path to files has been removed in array or dictionnary.

@LouisLeNezet
Copy link
Author

Another solution would be to ask for nf-test to have a parameter to disable the md5sum check.

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

No branches or pull requests

1 participant