# Cannot get dump to print variable

**URL:** <https://community.seqera.io/t/cannot-get-dump-to-print-variable/521>\
**Category:** Ask for help\
**Created:** [February 28, 2024, 8:35pm UTC](https://community.seqera.io/t/cannot-get-dump-to-print-variable/521 "2024-02-28T20:35:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![complexgenome](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/complexgenome/32/392_2.png) [@complexgenome](https://community.seqera.io/u/complexgenome)\
**Post date:** [February 28, 2024, 8:35pm UTC](https://community.seqera.io/t/cannot-get-dump-to-print-variable/521/1 "2024-02-28T20:35:04Z")

</div>

Hi developers,  
I’m interested to use dump to print variables.  
In the code below dump doesn’t do anything.

```auto
workflow {

Channel.fromPath("long_format_data.csv")
        .splitCsv(header: true).map { it ->
            [
                it.subMap("batch", "timepoint", "tissue", "sequencing_type"),
                [
                    file(it.fastq_1),
                    file(it.fastq_2)
                ]
            ]
        }
        .branch { meta, fastq ->
            rna: meta.tissue == "rna" && meta.sequencing_type == "rna"
            germline: meta.tissue == "normal" && meta.sequencing_type == "wes"
            tumor: meta.tissue == "tumor" && meta.sequencing_type == "wes"
            other: true
        }
        .set { input_ch }

input_ch.germline| dump{tag: 'analysis', pretty: true}

}

```

Let me know if any other details are needed.

Please see attached input file.  
[long\_format\_data.csv](https://community.seqera.io/uploads/short-url/wyvvoimoennM1EjqiVrslLrR9KY.csv) (11.8 KB)

---

<div class="post-metadata">

**Author:** ![mribeirodantas](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mribeirodantas/32/235_2.png) [@mribeirodantas](https://community.seqera.io/u/mribeirodantas)\
**Post date:** [February 29, 2024, 2:32am UTC](https://community.seqera.io/t/cannot-get-dump-to-print-variable/521/2 "2024-02-29T02:32:01Z")

</div>

Are you running with the `-dump-channels` option? Something like:

```console
nextflow run main.nf -dump-channels

```

---

<div class="post-metadata">

**Author:** ![complexgenome](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/complexgenome/32/392_2.png) [@complexgenome](https://community.seqera.io/u/complexgenome)\
**Post date:** [February 29, 2024, 11:43am UTC](https://community.seqera.io/t/cannot-get-dump-to-print-variable/521/3 "2024-02-29T11:43:29Z")

</div>

@mribeirodantas  
I wasn’t running with `-dump-channels`  
When I use it, still no output.

```auto
workflow {

Channel.fromPath("long_format_data.csv")
        .splitCsv(header: true).map { it ->
            [
                it.subMap("batch", "timepoint", "tissue", "sequencing_type"),
                [
                    file(it.fastq_1),
                    file(it.fastq_2)
                ]
            ]
        }
        .branch { meta, fastq ->
            rna: meta.tissue == "rna" && meta.sequencing_type == "rna"
            germline: meta.tissue == "normal" && meta.sequencing_type == "wes"
            tumor: meta.tissue == "tumor" && meta.sequencing_type == "wes"
            other: true
        }
        .set { input_ch }

input_ch.dump()
    
}

```

`/mnt/data1/software/nextflow run filter_branch.nf -dump-channels`

Thanks.

---

<div class="post-metadata">

**Author:** ![mribeirodantas](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mribeirodantas/32/235_2.png) [@mribeirodantas](https://community.seqera.io/u/mribeirodantas)\
**Post date:** [February 29, 2024, 12:07pm UTC](https://community.seqera.io/t/cannot-get-dump-to-print-variable/521/4 "2024-02-29T12:07:13Z")

</div>

You can’t dump a multi-channel variable. Your code works if you pick a channel inside `input_ch`, for example:

```groovy
  
  ...
  
  input_ch.germline.dump()
}

```

Output:

 ![Captura de Tela 2024-02-29 às 09.06.51](https://europe1.discourse-cdn.com/flex013/uploads/seqera/original/1X/e564374e4ca9231686a12eebef73981684e0ffd5.jpeg)

---

<div class="post-metadata">

**Author:** ![complexgenome](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/complexgenome/32/392_2.png) [@complexgenome](https://community.seqera.io/u/complexgenome)\
**Post date:** [February 29, 2024, 12:10pm UTC](https://community.seqera.io/t/cannot-get-dump-to-print-variable/521/5 "2024-02-29T12:10:42Z")

</div>

Thank you. It helps.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/system/32/2402_2.png) [@system](https://community.seqera.io/u/system)\
**Post date:** [March 7, 2024, 12:11pm UTC](https://community.seqera.io/t/cannot-get-dump-to-print-variable/521/6 "2024-03-07T12:11:11Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
