[Iplant-api-dev] Example/docs for multiple file selection

Roger Barthelson rogerab at email.arizona.edu
Sun Feb 22 21:29:20 MST 2015


Hi Matt-

I have not yet used a multiple file input for Agave, so I can’t tell you how to describe the input in the json or what it looks like in the DE. Dennis may be able to help with that. My guess is that the files come in as an array. You may well know a better way, but I found that using grep helps count and  format an array of input files so that the files can be fed individually into a command line, and this approach may help in this application, too. If your application takes a variable number of files, then it may not need a lot formatting. I would assume that all the files would be moved at job submission. 

Up till now, I have been using directories to move groups of files for Agave applications. This works well, and if nothing else, you can use a Condor-based app with multi-file inputs to feed the Agave app in a workflow (but I haven’t tried a mixed Condor/Agave yet, either). It could be good for somebody to work out how to use the multifile input with Agave.

Roger
-- 
Roger A Barthelson, PhD
iPlant Collaborative
BIO5/University of Arizona
rogerab at email.arizona.edu
520-977-5249

Sent with Airmail

On February 22, 2015 at 5:56:36 PM, Matthew Vaughn (vaughn at tacc.utexas.edu) wrote:

I’m working on publishing an Agave app that expects multiple filenames passed as the value of a single parameter. In other words, the maxCardinality of this input is > 1. I have a few related questions:

1. For the input specified below, what does it look like to pass multiple values in at job submission time
2. How do I write in my template script the ability to unpack the multi-file submission and present it as a space-delimited list  
3. Will the Agave files service move all the files specified at job submission time?

==command-line

python3 script.py -miRNAfile FILE1 FILE2 FILE3  

==wrapper

I suspect its more complex that this, which is what I would do if this were a single file input  

python3 script.py ${miRNAfiles}

==input

{
"id": "miRNAFiles",
"value": {
"default": "",
"type": "string",
"validator": "",
"visible": true,
"required": true
},
"details": {
"label": "miRNA sequence files",
"description": "Contains one or more miRNA sequences in FASTA format",
"argument": "-miRNAFile ",
"showArgument": true
},
"semantics": {
"ontology": [
"http://sswapmeet.sswap.info/mime/application/X-fasta"
],
"minCardinality": 1,
"maxCardinality": 20,
"fileTypes": [
"fasta-0",
"text-0",
"raw-0"
]
}
}

_______________________________________________
Iplant-api-dev Mailing List: Iplant-api-dev at iplantcollaborative.org
List Info and Archives: http://mail.iplantcollaborative.org/mailman/listinfo/iplant-api-dev  
One-click Unsubscribe: http://mail.iplantcollaborative.org/mailman/options/iplant-api-dev/rogerab%40email.arizona.edu?unsub=1&unsubconfirm=1  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iplantcollaborative.org/pipermail/iplant-api-dev/attachments/20150222/93555791/attachment.html 


More information about the Iplant-api-dev mailing list