Project

General

Profile

Bug #4726

Updated by Bryan Cosca over 9 years ago

A common convention I would do with run-command version 83a9390a05bbffc2e4ea95dd693af3ab3547fa12 from job qr1hi-8i9sb-fqbtg1lcocoefe0 is:  

 "command": [ 
          "$(outputname)" 
         ], 
         "outputname": { 
           "value": { 
             "list": "iterator", 
             "index": "0", 
             "command": "OUTPUT=$(basename $(basename $(iterator))).sam" 
           }, 
          "iterator": { 
           "value": { 
             "group": "input_dir", 
             "regex": "(.*)_[0-9]_.*.sam" 
           } 
         } 

 In "command" of output name, I use some sort of command to play with the name of iterator. Iterator is the name of a file from a collection where task.foreach is taking the name of each file. This convention worked perfectly fine. 

 Now, with run-command version ac21f0d45a76294aaca0c0c0fdf06eb72d03368d, I try the same convention in job qr1hi-8i9sb-i7vykyao0wg0f9a 
 "command": [ 
          "$(outputname)" 
         ], 
 "outputname": { 
     "list": "iterator", 
     "index": "0", 
     "command": "$(basename $(basename $(iterator)))" 
   }, 
 "iterator": { 
     "group": "input_dir", 
     "regex": "(.*).fastq.gz" 
   }, 


 But get the error: 

 run-command: caught exception 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 Traceback (most recent call last): 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 File "/tmp/crunch-src/crunch_scripts/run-command", line 291, in <module> 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 recursive_foreach(jobp, jobp["task.foreach"]) 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 File "/tmp/crunch-src/crunch_scripts/run-command", line 262, in recursive_foreach 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 recursive_foreach(params, fvars) 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 File "/tmp/crunch-src/crunch_scripts/run-command", line 255, in recursive_foreach 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 items = get_items(params, params[var]) 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 File "/tmp/crunch-src/crunch_scripts/run-command", line 235, in get_items 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 mode = os.stat(value).st_mode 
 12/5/2014 10:03:50 AM 	 compute29 	 1 	 task-print 	 0 	 OSError: [Errno 2] No such file or directory: 'SRR064287_1' 

 So maybe command is trying to look for iterator in the input collection now? 

 I've got a workaround by just doing the command within script_parameters, but I just wanted to note this behavior.

Back