Skip to end of metadata
Go to start of metadata

When you read in a file by clicking Add file location(s) (in Taverna 2.x) button from the Run workflow dialogue it will be loaded as one single input, even if it contains multiple lines, i.e. the workflow input will be a single string with many lines. You can actually select several files to add several inputs, each containing one or more lines.

Most services expects one input at a time, but your file contains several input values, one for each line. One way to get a list of inputs instead of a string with multiple lines is to add as a “shim” between the input to the workflow and where ever the input is destined, a little service/processor called Split string into string list by regular expression, found under Available Services > Local Services > text .

Connect the workflow input in question to the service’s string input, and for the regex input, right click and set default value to \n (that is backslash n) – which means “new line”. You could try \r\n instead if your files are Windows-based and \n is causing you problems. If your file consists of lines of columns you can try to add a second splitter and split by space, \t tabulator or similar.

Connect the split output to the rest of the workflow instead of the original workflow input and remove the old connection.

Labels
  • None