Hello, I have been working on running a workflow programmatically on my local galaxy instance using library datasets. It took me a few hours to figure out the problem I was having so I thought I would document it here in case it helps anyone. Also, I have a question regarding 'ldda' IDs (see below). After looking at this post: http://gmod.827538.n3.nabble.com/Running-a-workflow-programatically-td2572556.htmland the comments in workflow_execute.py I was trying to run a workflow in the following way:
1) get the dataset ID's from the library ./display.py <api_key> http://localhost:8080/api/libraries/ebfb8f50c6abde6d/contents Collection Members ------------------ #1: /api/libraries/ebfb8f50c6abde6d/contents/c6ca0ddb55be603a016bf252082cbf1f name: / type: folder id: c6ca0ddb55be603a016bf252082cbf1f #2: /api/libraries/ebfb8f50c6abde6d/contents/a0e1686ccf7a028a name: /http://smane.vbi.vt.edu/SRR014335.fastq type: file id: a0e1686ccf7a028a #3: /api/libraries/ebfb8f50c6abde6d/contents/98a64dc1a6526c8e name: /http://smane.vbi.vt.edu/SRR014339.fastq type: file id: 98a64dc1a6526c8e #4: /api/libraries/ebfb8f50c6abde6d/contents/2764e29c8c7b7454 name: /http://smane.vbi.vt.edu/Yeast.gtf type: file id: 2764e29c8c7b7454 2) get input IDs for the workflow ./display.py <api_key> http://localhost:8080/api/workflows/f2db41e1fa331b3e Member Information ------------------ url: /api/workflows/f2db41e1fa331b3e inputs: {'102': {'value': '', 'label': 'Illumina2'}, '104': {'value': '', 'label': 'ReferenceAnnotation'}, '96': {'value': '', 'label': 'Illumina1'}} id: f2db41e1fa331b3e Then I ran: python /opt/galaxy_server/galaxy-dist/scripts/api/workflow_execute.py <api_key> http://localhost:8080/api/workflows f2db41e1fa331b3e 'Test API' '102=ldda=a0e1686ccf7a028a' '104=ldda=2764e29c8c7b7454' '96=ldda=98a64dc1a6526c8e' This gives the following error at the end of the stack trace for HTTP Error 500: *ValueError: invalid literal for int() with base 10: 'file.37'* * * After looking through the code for a while I saw that when the "src id type" is given as "ld" then the decoded name is split and the number is used to retrieve the ldda or "library_dataset_dataset_association" So instead I ran the above command with: '102=ld=a0e1686ccf7a028a' '104=ld=2764e29c8c7b7454' '96=ld=98a64dc1a6526c8e' And everything worked, woo! This brings me to my question: Where can I find ldda ID's ? I imagine I could find them in my database and there looks like some functions in lib/galaxy/web/api/workflows.py for handling them but I am having trouble locating them via an API script or on the library management interface. Note: I am assuming that the ID's returned by display.py are in fact "ld" ID's since this is the ID type I used to avoid the error listed above. Thanks, Andrew
___________________________________________________________ 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/