# Help passing a tuple with paths as input for a process without splitting the files (Invalid method invocation 'call' with arguments: ...)

**URL:** <https://community.seqera.io/t/help-passing-a-tuple-with-paths-as-input-for-a-process-without-splitting-the-files-invalid-method-invocation-call-with-arguments/2253>\
**Category:** Ask for help\
**Tags:** nextflow, nf-core\
**Created:** [July 1, 2025, 12:26pm UTC](https://community.seqera.io/t/help-passing-a-tuple-with-paths-as-input-for-a-process-without-splitting-the-files-invalid-method-invocation-call-with-arguments/2253 "2025-07-01T12:26:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liberentaizp](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/liberentaizp/32/1890_2.png) [@liberentaizp](https://community.seqera.io/u/liberentaizp)\
**Post date:** [July 1, 2025, 12:26pm UTC](https://community.seqera.io/t/help-passing-a-tuple-with-paths-as-input-for-a-process-without-splitting-the-files-invalid-method-invocation-call-with-arguments/2253/1 "2025-07-01T12:26:23Z")

</div>

Hi! 🙃

I’m quite new in nextflow, and I already saw some other similar topics here, but none seem to work for me.  
I am trying to run a process that takes the following tuple as input:

```auto
input:
tuple val(meta), path(samplesheet), path(run_dir)

```

For this, I defined two parameters, that I pass from the command line as:

`-- samplecsv <path to csv file> --bcldata <path to BCL tar.gz or folder>`

These parameters are passed from my main workflow to a subworkflow like this:

```auto
    bcl_dir = params.bcldata
    sample_sheet = params.samplecsv

workflow MYPIPELINE_MAIN {
    take:
    bcl_dir // path: BCL input
    sample_sheet // path: SampleSheet CSV

    main:
    MYPIPELINE_CORE(bcl_dir, sample_sheet)

    emit:
    demux_fastq = MYPIPELINE_CORE.out
}

```

Inside the subworkflow (`MYPIPELINE_CORE` ), I pass them into the process using a tuple:

```auto
workflow MYPIPELINE_CORE {

    take:
    bcl_dir // path to BCL tar.gz
    sample_sheet // path to samplesheet CSV

    main:
    Channel
        .of(tuple([id: 'run1'], file(sample_sheet), file(bcl_dir)))
        .set { ch_combinedTuple }

    ch_combinedTuple.view { "Combined tuple-channel content: $it" }

    BCL2FASTQ(ch_combinedTuple)
}

```

I verified via `println` statements that `sample_sheet` and `bcl_dir` are `java.lang.String` and correctly point to valid files.  
However, when the process has to be run i come across this error:

```auto
Combined tuple-channel content: [[id:run1], /beegfs/home/lrenteria/my_pipeline/data/Samplesheet.csv, /beegfs/home/lrenteria/my_pipeline/data/BCL_data.tar.gz]
ERROR ~ Invalid method invocation `call` with arguments: [<data row from samplesheet>] (java.util.ArrayList) on _closure6 type

```

Interestingly, when I run a minimal test with only the process and the same tuple construction, everything works fine:

```auto
include { BCL2FASTQ } from './modules/nf-core/bcl2fastq'
Channel
    .of( tuple([id: 'run1'], file(params.samplecsv), file(params.bcldata)) )
    .set { ch_test }

workflow {
    ch_test.view { "Test channel content: $it" } 
    BCL2FASTQ(ch_test)
}

```

Any idea what might be going wrong in the subworkflow context?

Thanks a lot in advance! 😁

---

<div class="post-metadata">

**Author:** ![yinshiyi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/yinshiyi/32/1091_2.png) [@yinshiyi](https://community.seqera.io/u/yinshiyi)\
**Post date:** [July 2, 2025, 6:33pm UTC](https://community.seqera.io/t/help-passing-a-tuple-with-paths-as-input-for-a-process-without-splitting-the-files-invalid-method-invocation-call-with-arguments/2253/2 "2025-07-02T18:33:15Z")

</div>

First, I think you are using **Nextflow DSL1 syntax** , not DSL2.  
Could you try it in DSL2? the error might be you are trying to use DSL2 syntax in combination of DSL1.

---

<div class="post-metadata">

**Author:** ![mahesh.binzerpanchal](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mahesh.binzerpanchal/32/253_2.png) [@mahesh.binzerpanchal](https://community.seqera.io/u/mahesh.binzerpanchal)\
**Post date:** [July 3, 2025, 11:48am UTC](https://community.seqera.io/t/help-passing-a-tuple-with-paths-as-input-for-a-process-without-splitting-the-files-invalid-method-invocation-call-with-arguments/2253/3 "2025-07-03T11:48:14Z")

</div>

The issue isn’t using DSL1 syntax.

```auto
    bcl_dir = params.bcldata
    sample_sheet = params.samplecsv

```

This part isn’t recognised inside the workflow.

Ideally the call to `MYPIPELINE_MAIN` should be like:

```nextflow
workflow {
    MYPIPELINE_MAIN (
        params.bcldata,
        params.samplecsv
    )
}

```

It’s also worth noting that `params.bcldata` and `params.samplecsv` are String objects that contain a path. The `file` function you’re using inside the `tuple` is what coverts the String into a `Path` object for the process to stage the file correctly.

---

<div class="post-metadata">

**Author:** ![yinshiyi](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/yinshiyi/32/1091_2.png) [@yinshiyi](https://community.seqera.io/u/yinshiyi)\
**Post date:** [July 7, 2025, 6:43pm UTC](https://community.seqera.io/t/help-passing-a-tuple-with-paths-as-input-for-a-process-without-splitting-the-files-invalid-method-invocation-call-with-arguments/2253/4 "2025-07-07T18:43:24Z")

</div>

@mahesh is right, I tested the following, it works. Thanks.  
The `MYPIPELINE_MAIN` and the `main` workflow serve the very similar wrapper purposes, probably redundant.

```auto
workflow MYPIPELINE_CORE {

    take:
    bcl_dir
    sample_sheet

    main:
    Channel
        .of(tuple([id: 'run1'], file(sample_sheet), file(bcl_dir)))
        .set { ch_combinedTuple }

    ch_combinedTuple.view { "Combined tuple-channel content: $it" }
    
    emit:
    ch_combinedTuple
}

workflow MYPIPELINE_MAIN {
    take:
    bcl_dir
    sample_sheet

    main:
    MYPIPELINE_CORE(bcl_dir, sample_sheet)

    emit:
    demux_fastq = MYPIPELINE_CORE.out
}
workflow {
    bcl_dir = params.bcldata
    sample_sheet = params.samplecsv
    MYPIPELINE_MAIN(bcl_dir, sample_sheet)
}

```
