# Collecting channel entries consisting of tuples and sending it to a process

**URL:** <https://community.seqera.io/t/collecting-channel-entries-consisting-of-tuples-and-sending-it-to-a-process/581>\
**Category:** Tips & Tricks\
**Tags:** nextflow\
**Created:** [March 21, 2024, 12:42pm UTC](https://community.seqera.io/t/collecting-channel-entries-consisting-of-tuples-and-sending-it-to-a-process/581 "2024-03-21T12:42:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Nater](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/alexander_nater/32/552_2.png) [@Alexander\_Nater](https://community.seqera.io/u/Alexander_Nater)\
**Post date:** [March 21, 2024, 12:42pm UTC](https://community.seqera.io/t/collecting-channel-entries-consisting-of-tuples-and-sending-it-to-a-process/581/1 "2024-03-21T12:42:57Z")

</div>

We often have channel entries in the form of tuples containing some meta data and one or more paths. For a process, we might want to collect all the entries with `collect(flat:false)` or `toList()` and send the resulting list of tuples to a process. However, if we specify the process input as `val(my_tuples)`, the files represented by the path objects in the tuples will not be staged properly, and `path(my_tuples)` doesn’t work either. Rather, the input needs to be of the form `val(metas), path(paths)`. The transformation of the channel entries of lists of tuples into tuples of lists can be done like this:

```auto
Channel.of(
    ["id1", file("my_file1.txt")],
    ["id2", file("my_file2.txt")],
    ["id3", file("my_file3.txt")],
).collect(flat: false)
 .map { it.transpose() }
 .view()

```
