This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Escape character usage in YML file - running tool in CWL

I am trying to run the tool STAR for alignment

cwl-runner star.cwl star.yml
  /cwl-runner 1.0.20180521150620
Resolved 'star.cwl' to 'file:///cwl_tests/scripts/star.cwl'
Tool definition failed initialization:
while scanning a double-quoted scalar
  in "file:///cwl_tests/scripts/star.yml", line 34, column 17
found unknown escape character '@'
  in "file:///ccwl_tests/scripts/star.yml", line 34, column 19

The given below syntax is given in star.yml file at line 34

outSAMheaderHD: "\@HD VN:1.4"

What is the best way to escape '@' character ?

cwl yml yaml

1 answer

The issue was I had to define outSAMheaderHD as an array in CWL file

Lines from star.cwl

 outSAMheaderHD:
  type: string[]
  inputBinding:
   position: 22
   prefix: --outSAMheaderHD

Lines from star.yml

outSAMheaderHD: ["@HD", "VN:1.4"]

Log in to answer this question.