# How to access files/process from two different workflows to integrate?

**URL:** <https://community.seqera.io/t/how-to-access-files-process-from-two-different-workflows-to-integrate/651>\
**Category:** Ask for help\
**Created:** [April 8, 2024, 7:17pm UTC](https://community.seqera.io/t/how-to-access-files-process-from-two-different-workflows-to-integrate/651 "2024-04-08T19:17:22Z")\
**Posts on this page:** 2\
**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:** [April 8, 2024, 7:17pm UTC](https://community.seqera.io/t/how-to-access-files-process-from-two-different-workflows-to-integrate/651/1 "2024-04-08T19:17:22Z")

</div>

Hi there,

I’ve a main.nf where there are multiple workflows present. Each workflow is run based on user inputs.

```auto
workflow {

    if (params.analysis=="both"){
        wes()
        rna()
     }
    if (params.analysis=="wes"){
        wes()
    }
    
    if (params.analysis=="rna"){
        rna() 
    }
}

```

How do I integrate data under **both** condition from WES and RNA?

For instance, there’s a process in WES called parse\_CNV and in RNA it’s merge\_feature, I’d like to integrate their output.

How do I access output of these workflows to process together?

I’ve tried:  
1)

```auto
  wes:parse_cnv.out.view()

```

1. 

```auto
wes::parse_cnv.out.view()

```

1. 

```auto
wes:parse_cnv.out.parsed_cnv_file.view()

```

Error:  
ERROR ~ No such variable: parse\_cnv

Please help to proceed further.

---

<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:** [April 8, 2024, 7:28pm UTC](https://community.seqera.io/t/how-to-access-files-process-from-two-different-workflows-to-integrate/651/2 "2024-04-08T19:28:09Z")

</div>

You can use the `emit` keyword in the workflow block.

```auto
workflow FOO {
  ...
 
  emit:
  parsed_cnv = parse_cnv.out
}

```

Then you can access what you want with `FOO.out.parsed_cnv`.
