Conflict name using mothur

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.

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.

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.

Thank you, it solves my problem !

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

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)

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

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