nf-test icon indicating copy to clipboard operation
nf-test copied to clipboard

Params dictionary being filled with null values instead of actual values

Open stkgo opened this issue 2 years ago • 2 comments

I have a basic test case that looks like the following (I apologize for the screenshot, GitHub's markdown editor gets confused by the Nextflow script block in the when block):

Screenshot 2023-11-20 at 5 30 49 PM

That param ends up being null when my Nextflow process executes. I am confused as to why this is happening. I have written other test cases where I update the params dictionary and haven't had any issues.

stkgo avatar Nov 20 '23 23:11 stkgo

Hi, You try to update the params dictionary in the process block. Please use the params block.

   when {
        params {
            // define parameters here. Example:
            // outdir = "tests/results"
        }
        process {
            """
            // define inputs of the process here. Example:
            // input[0] = file("test-file.txt")
            """
        }
    }

lukfor avatar Nov 21 '23 06:11 lukfor

Thank you for your help. What is strange though is that I have updated params in the process block in the past and it has worked as expected. Has something changed with nf-test?

stkgo avatar Nov 21 '23 21:11 stkgo