We've moved!
For WDL questions, see the WDL specification and WDL docs.
For Cromwell questions, see the Cromwell docs and please post any issues on Github.

Is it possible that WDLTool accepts filenames that start with numbers and contain underscores?

YatrosYatros Seattle, WA, USAMember ✭✭


I'm starting to work with WDL scripts and I have realized that when I parse a file name or a string that starts with a numeric character that contains an underscore, the WDLTool validate/input command returns the error "Unrecognized token in line ... column ..." for the underscore position.

For example, the following code returns the error Unrecognized token on line 7, column 11: . Line 6 (Sample_001) is OK, because the String starts with a letter, but line 7 (001_TTAACGTC_L001_R1_001) fails because the File name starts with a number.

workflow Test {
  call bwa
  task bwa {
  File /Reference/hg19
  String Sample_001
  File 001_TTAACGTC_L001_R1_001
  File 001_TTAACGTC_L001_R2_001
  command {bwa mem -t 8 -M -R '@RG\tID:001.1\tSM:001\tPL:illumina\tLB:001\tPU:UN1' -p ${/Reference/hg19}.fasta ${001_TTAACGTC_L001_R1_001}.fastq.gz ${001_TTAACGTC_L001_R2_001}.fastq.gz >${Sample_001}.sam}
  output {File out ="${Sample_001}.sam"

Would it be possible to allow WDLTool handle file names / strings that start with a numeric value followed by an underscore or would I have to rename my input files in order to make it work? Most of the files that I receive from our sequencing core start with numeric values and contain "_" within the file names.

WDLTool 0.14
Cromwell 29

Thank you very much for your help,



Best Answer


  • YatrosYatros Seattle, WA, USAMember ✭✭

    This makes sense.

    Thank you for the clarification concerning generalizing the WDL scripts to make them reusable.



Sign In or Register to comment.