Hi Dannon,

Thanks for the response. Sorry to be pedantic, but just to make sure that I understand the interpretation of this field on the other side of the API, I would need to have something like the following:

data['filesystem_paths'] = "/home/me/file1.vcf \n /home/me/file2.vcf /n /home/me/file3.vcf"

I assume I should also increase the time.sleep() to reflect the uploading of extra files?

Cheers,

Rob


Rob Leclerc, PhD
P: (US) +1-(917)-873-3037
P: (Shanghai) +86-1-(861)-612-5469
Personal Email: rob.leclerc@aya.yale.edu


On Mon, Apr 29, 2013 at 9:15 AM, Dannon Baker <dannon.baker@gmail.com> wrote:
Hey Rob,

That example_watch_folder.py does just submit exactly one at a time, executes the workflow, and then does the next all in separate transactions.  If you wanted to upload multiple filepaths at once, you'd just append more to the ''filesystem_paths' field (newline separated paths).

-Dannon


On Fri, Apr 26, 2013 at 11:54 PM, Rob Leclerc <robert.leclerc@gmail.com> wrote:
I'm looking at example_watch_folder.py and it's not clear from the example how you submit multiple datasets to a library. In the example, the first submit returns a libset [] with only a single entry and then proceeds to iterate through each dataset in the libset in the following section:

data = {}

   data['folder_id'] = library_folder_id

   data['file_type'] = 'auto'

   data['dbkey'] = ''

   data['upload_option'] = 'upload_paths'

   

data['filesystem_paths'] = fullpath

   data['create_type'] = 'file'

   libset = submit(api_key, api_url + "libraries/%s/contents" % library_id, data, return_formatted = False)

   time.sleep(5)

   for ds in libset:

       if 'id' in ds:

                        wf_data = {}

                        wf_data['workflow_id'] = workflow['id']

                        wf_data['history'] = "%s - %s" % (fname, workflow['name'])

                        wf_data['ds_map'] = {}

                        for step_id, ds_in in workflow['inputs'].iteritems():

                            wf_data['ds_map'][step_id] = {'src':'ld', 'id':ds['id']}

                        res = submit( api_key, api_url + 'workflows', wf_data, return_formatted=False)




Rob Leclerc, PhD
P: (Shanghai) +86-1-(861)-612-5469
Personal Email: rob.leclerc@aya.yale.edu

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/