Question: Galaxy Tool API - how to submit a non-specific file reference
0
gravatar for eric
2.5 years ago by
eric0
UC Berkeley
eric0 wrote:

I'm generally able to submit a Galaxy job through the API (POST /api/tools) where the input is a specific history reference to a file (in this case below, it's a FASTA file reference history element.)
But, how do I submit a non-specific reference, such that it would pickup the last available FASTA history element?

{
  "tool_id":"toolshed.g2.bx.psu.edu/repos/devteam/megablast_wrapper/megablast_wrapper/1.2.0",
  "tool_version":"1.2.0",
  "history_id": "f597429621d6eb2b", 
  "inputs":{
    "input_query":{
      "batch":false,
      "values":[
        {                       // history element of the file (this works)
          "hid": args.hid,  // ie "219"
          "id": args.id, // ie. "6000239ca29982"
          "name": args.name, // ie "myfile.fa"
          "src":"hda"
        }
      ]

    },
    "source_select":"13apr2014-htgs", // db select
    "word_size":"28",
    "iden_cutoff":"90",
    "evalue_cutoff":"0.001",
    "filter_query":"yes"
  }
};
tool galaxy api galaxy • 729 views
ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by eric0
0
gravatar for Dannon Baker
2.5 years ago by
Dannon Baker3.7k
United States
Dannon Baker3.7k wrote:

I'm not sure why you'd ever want to do that, just automatically using the last reference. Can you explain the use case here a bit more?

What you might be looking for is the build endpoint:

GET /api/tools/<tool_id>/ should provide options, which you would then specify in a later request.

Try (when logged in) something like https://usegalaxy.org/api/tools/random_lines1/build for concrete details.

ADD COMMENTlink written 2.5 years ago by Dannon Baker3.7k

Thanks for the response. Well, I suppose the way I wanted it to operate was the way I see it operate upon executing a tool from the GUI, where the default input is based on the defined input format, and last file generated entry of that format. However, I admit I'm rather new at the API and perhaps there are better ways of addressing it.
What I wanted to do is to queue up a series of tools that were whose inputs were dependent on some prior set of outputs, somewhat like a workflow, but not using workflows. And, these were queue by another application, namely JBrowse.

ADD REPLYlink written 2.5 years ago by eric0
0
gravatar for eric
2.5 years ago by
eric0
UC Berkeley
eric0 wrote:

Oh, I see how that works now. I can pass history references as inputs to tools and queue them up in advance. Each tool will not execute until the input from another history element's output is ready.

ADD COMMENTlink written 2.5 years ago by eric0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 172 users visited in the last hour