{"action":"created","issue":{"url":"https://api.github.com/repos/bpeng2000/SOS/issues/37","repository_url":"https://api.github.com/repos/bpeng2000/SOS","labels_url":"https://api.github.com/repos/bpeng2000/SOS/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/bpeng2000/SOS/issues/37/comments","events_url":"https://api.github.com/repos/bpeng2000/SOS/issues/37/events","html_url":"https://github.com/bpeng2000/SOS/issues/37","id":141557712,"number":37,"title":"Problem with output file names","user":{"login":"gaow","id":917985,"avatar_url":"https://avatars.githubusercontent.com/u/917985?v=3","gravatar_id":"","url":"https://api.github.com/users/gaow","html_url":"https://github.com/gaow","followers_url":"https://api.github.com/users/gaow/followers","following_url":"https://api.github.com/users/gaow/following{/other_user}","gists_url":"https://api.github.com/users/gaow/gists{/gist_id}","starred_url":"https://api.github.com/users/gaow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaow/subscriptions","organizations_url":"https://api.github.com/users/gaow/orgs","repos_url":"https://api.github.com/users/gaow/repos","events_url":"https://api.github.com/users/gaow/events{/privacy}","received_events_url":"https://api.github.com/users/gaow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2016-03-17T11:36:37Z","updated_at":"2016-03-18T06:22:56Z","closed_at":null,"body":"I'm guessing I should post some of my problems writing SoS scripts and, after we fix it, make it to the Example page. \r\n\r\nHere is one: \r\n[1.sos.txt](https://github.com/bpeng2000/SOS/files/177749/1.sos.txt)\r\n\r\nI have this mock pipeline attached where I try to automatically generate files based on the files generated from previous step. It is a test to match file names. I cannot get this pipeline to work because `output:` does not loop over input parameters. Rather it treats input parameters in list as a string. What is the proper syntax for this user case?"},"comment":{"url":"https://api.github.com/repos/bpeng2000/SOS/issues/comments/198225298","html_url":"https://github.com/bpeng2000/SOS/issues/37#issuecomment-198225298","issue_url":"https://api.github.com/repos/bpeng2000/SOS/issues/37","id":198225298,"user":{"login":"gaow","id":917985,"avatar_url":"https://avatars.githubusercontent.com/u/917985?v=3","gravatar_id":"","url":"https://api.github.com/users/gaow","html_url":"https://github.com/gaow","followers_url":"https://api.github.com/users/gaow/followers","following_url":"https://api.github.com/users/gaow/following{/other_user}","gists_url":"https://api.github.com/users/gaow/gists{/gist_id}","starred_url":"https://api.github.com/users/gaow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaow/subscriptions","organizations_url":"https://api.github.com/users/gaow/orgs","repos_url":"https://api.github.com/users/gaow/repos","events_url":"https://api.github.com/users/gaow/events{/privacy}","received_events_url":"https://api.github.com/users/gaow/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T06:22:56Z","updated_at":"2016-03-18T06:22:56Z","body":"Sorry my bad -- I did not exploit the syntax well. It works now: \r\n\r\n```\r\n[1]\r\nt = [0, 1]\r\nn = [1000]\r\noutput_prefix = 'rnorm'\r\noutput_suffix = 'rds'\r\ninput: for_each = ['n', 't']\r\noutput: pattern = ['${output_prefix}_${_n}_${_t}.${output_suffix}']\r\nrun('''touch ${_output}''')\r\n\r\n[2]\r\nm = [10, 20]\r\noutput_prefix = 'mean'\r\noutput_suffix = 'rds'\r\ninput: pattern = ['{base}.{ext}'], for_each = ['m']\r\noutput: pattern = ['${output_prefix}_${_m}_{base}.${output_suffix}']\r\nrun('''touch ${_output} ''')\r\n```\r\nResults in:\r\n```\r\n[GW] ls *.rds\r\nmean_10_rnorm_1000_0.rds  mean_20_rnorm_1000_0.rds  rnorm_1000_0.rds\r\nmean_10_rnorm_1000_1.rds  mean_20_rnorm_1000_1.rds  rnorm_1000_1.rds\r\n```\r\n\r\nI will update the documentation and examples. "}}