# Conflict name using mothur

**URL:** https://cwl.discourse.group/t/conflict-name-using-mothur/81
**Category:** CWL Questions
**Created:** [February 25, 2020, 4:36pm UTC](https://cwl.discourse.group/t/conflict-name-using-mothur/81 "2020-02-25T16:36:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![cjuigne](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@cjuigne](https://cwl.discourse.group/u/cjuigne)
#### Post date: [February 25, 2020, 4:36pm UTC](https://cwl.discourse.group/t/conflict-name-using-mothur/81/1 "2020-02-25T16:36:55Z")

</div>

Hi,

Many mothur functions use ‘-’ to separate input files, for example merge.files (merge.files(fileA-fileB-fileC, fileABC)) or Make.group.  
But when using a mothur docker container, input files are placed in volume named like “tga8d84dd0-1775-47fa-8bb8-0f5eeeb936bc” which contains ‘-’, so executions fail.  
How can I do ?

I think I can create symbolic links in a .sh, but I would like to do it more properly.

Error:  
mothur \> merge.files(input=/var/lib/cwl/stga8d84dd0-1775-47fa-8bb8-0f5eeeb936bc/35CMK6KO\_S246\_L001\_R1\_001.trim.contigs.fasta-/var/lib/cwl/stg25e1aa1c-3bde-40d9-9500-7c4b436429e6/36CMK6WT\_S258\_L001\_R1\_001.trim.contigs.fasta, output = result.fasta )  
Unable to open /var/lib/cwl/stga8d84dd0. Trying output directory /lVLMZx/outputFilesMergeFiles/stga8d84dd0.  
Unable to open /lVLMZx/outputFilesMergeFiles/stga8d84dd0. Trying default /usr/local/bin/stga8d84dd0.  
Unable to open /usr/local/bin/stga8d84dd0. Trying mothur’s executable location /usr/local/bin/stga8d84dd0.  
Unable to open /usr/local/bin/stga8d84dd0.

---

<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: [February 26, 2020, 8:56pm UTC](https://cwl.discourse.group/t/conflict-name-using-mothur/81/2 "2020-02-26T20:56:55Z")

</div>

Yet another case of bad practices in bioinformatics. I take it that the name can not be enclosed in quotes? CWL does allow you to stage the files in the working directory.

```auto
cwlVersion: v1.0
class: CommandLineTool
inputs:
  files: File[]
outputs:
  out:
    type: stdout
stdout: output.txt
baseCommand: ["ls", "-al"]
requirements:
  InitialWorkDirRequirement:
    listing: $(inputs.files)

```

of note is that links are made to the original files and these links are located in the working directory, so if the dashes are in the path, they do not appear.

---

<div class="post-metadata">

### Author: ![cjuigne](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@cjuigne](https://cwl.discourse.group/u/cjuigne)
#### Post date: [March 3, 2020, 9:08am UTC](https://cwl.discourse.group/t/conflict-name-using-mothur/81/3 "2020-03-03T09:08:37Z")

</div>

Thank you, it solves my problem !

---

<div class="post-metadata">

### Author: ![cjuigne](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@cjuigne](https://cwl.discourse.group/u/cjuigne)
#### Post date: [March 3, 2020, 3:43pm UTC](https://cwl.discourse.group/t/conflict-name-using-mothur/81/4 "2020-03-03T15:43:05Z")

</div>

If I want to use an array of records, how should I write

> [@kaushik-work](#):
>
> InitialWorkDirRequirement: listing: $(inputs.files)

in order to have files of the file field in the working directory ?

(inputs:

- id: togroup  
type:  
type: array  
items:  
type: record  
name: rec  
fields:  
- name: file  
type: File  
- name: group  
type: string)

---

<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: [March 3, 2020, 6:01pm UTC](https://cwl.discourse.group/t/conflict-name-using-mothur/81/5 "2020-03-03T18:01:43Z")

</div>

Interesting! The thing that comes to mind is to use a javascript expression to return a `Dirent` object. This might be worth a separate question as it is an interesting enough case on its own.

The idea would be to return a JSON object from the javascript expression that has all the required fields of a `Dirent` [https://www.commonwl.org/v1.1/CommandLineTool.html#Dirent](https://www.commonwl.org/v1.1/CommandLineTool.html#Dirent)

---

<div class="post-metadata">

### Author: ![cjuigne](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@cjuigne](https://cwl.discourse.group/u/cjuigne)
#### Post date: [March 9, 2020, 1:54pm UTC](https://cwl.discourse.group/t/conflict-name-using-mothur/81/6 "2020-03-09T13:54:32Z")

</div>

Yes, thank you, it works ! 🙂  
It could be interesting to access directly the list of content of one field
