# Dependent inputs in a workflow

**URL:** <https://cwl.discourse.group/t/dependent-inputs-in-a-workflow/26>\
**Category:** CWL Questions\
**Created:** [August 26, 2019, 3:05pm UTC](https://cwl.discourse.group/t/dependent-inputs-in-a-workflow/26 "2019-08-26T15:05:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DiDeoxy](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/dideoxy/32/19_2.png) [@DiDeoxy](https://cwl.discourse.group/u/DiDeoxy)\
**Post date:** [August 26, 2019, 3:05pm UTC](https://cwl.discourse.group/t/dependent-inputs-in-a-workflow/26/1 "2019-08-26T15:05:19Z")

</div>

Alright, so I have a set of dependent inputs for a command line tool:

```
dependentForward:
type:
  type: record
  name: dependentForward
  fields:
    forwardInFastq:
      type: File
      inputBinding:
        position: 16
      doc: |
        Single end or forward reads of paired reads
    forwardAdapter:
      type: string
      inputBinding:
        position: 1
        prefix: "--adapter"
      doc: |
        Sequence of an adapter ligated to the 3' end (paired
        data: of the first read). The adapter and subsequent
        bases are trimmed. If a '$' character is appended
        ('anchoring'), the adapter is only found if it is a
        suffix of the read.
    forwardOutFastq:
      type: File
      inputBinding:
        position: 12
        prefix: "--output"
      doc: |
        Write trimmed reads to FILE. FASTQ or FASTA format is
        chosen depending on input. Summary report is sent to
        standard output. Use '{name}' for demultiplexing (see
        docs). Default: write to standard output

```

I am trying to figure out what the syntax for filling the fields of this record is in a workflow.

What I have so far:

```
cutadapt:
run: ../commandLineTools/cutadapt.cwl
in:
  dependentForward:
    forwardInFastq:
      source: pairedEndFastqsIn
      valueFrom: $(self.forwardFastq)
    forwardAdapter:
      source: forwardAdapter
    forwardOutFastq:
      source: pairedEndFastqsIn
      valueFrom: $(self.forwardFastq.nameroot)_trimmed.fastq

```

The benten language server doesn’t think this is correct.

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![kaushik-work](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/kaushik-work/32/11_2.png) [@kaushik-work](https://cwl.discourse.group/u/kaushik-work)\
**Post date:** [September 3, 2019, 7:01pm UTC](https://cwl.discourse.group/t/dependent-inputs-in-a-workflow/26/2 "2019-09-03T19:01:24Z")

</div>

Hi @DiDeoxy, could you please try with the latest `master` for Benten? I put in a fix for a problem that looks a bit like this. Thanks!
