Hi Rob, I do not really put the parameters from the prompt but using the run.set_input method.
What makes sense is passing just: "transmembrane proteins" AND amyloid No escaping should be necessary (as far as I can tell). However, that produces the error I included at the end of the email. Would it be possible to see how the workbench code escapes the double quotes? Or to see exactly why that beanshell script fails? Set of ErrorDocumentS to follow. ErrorDocument 1 Set of ErrorDocumentS to follow. ErrorDocument 1 Set of ErrorDocumentS to follow. ErrorDocument 1 Sourced file: inline evaluation of: ``import org.dom4j.Document; import org.dom4j.Node; import org.dom4j.io.SAXReader; . . . '' : Typed variable declaration : Method Invocation reader.read : at Line: 9 : in file: inline evaluation of: ``import org.dom4j.Document; import org.dom4j.Node; import org.dom4j.io.SAXReader; . . . '' : reader .read ( new StringReader ( xmltext ) ) Target exception: org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog. bsh.BSHMethodInvocation.eval(unknown file) bsh.BSHPrimaryExpression.eval(unknown file) bsh.BSHPrimaryExpression.eval(unknown file) bsh.BSHVariableDeclarator.eval(unknown file) bsh.BSHTypedVariableDeclaration.eval(unknown file) bsh.Interpreter.eval(unknown file) bsh.Interpreter.eval(unknown file) bsh.Interpreter.eval(unknown file) net.sf.taverna.t2.activities.beanshell.BeanshellActivity$1.run(BeanshellActivity.java:167) java.lang.Thread.run(Thread.java:636) ErrorDocument 2 Sourced file: inline evaluation of: ``import org.dom4j.Document; import org.dom4j.Node; import org.dom4j.io.SAXReader; . . . '' : Typed variable declaration : Method Invocation reader.read : at Line: 9 : in file: inline evaluation of: ``import org.dom4j.Document; import org.dom4j.Node; import org.dom4j.io.SAXReader; . . . '' : reader .read ( new StringReader ( xmltext ) ) Target exception: org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog. bsh.BSHMethodInvocation.eval(unknown file) bsh.BSHPrimaryExpression.eval(unknown file) bsh.BSHPrimaryExpression.eval(unknown file) bsh.BSHVariableDeclarator.eval(unknown file) bsh.BSHTypedVariableDeclaration.eval(unknown file) bsh.Interpreter.eval(unknown file) bsh.Interpreter.eval(unknown file) bsh.Interpreter.eval(unknown file) net.sf.taverna.t2.activities.beanshell.BeanshellActivity$1.run(BeanshellActivity.java:167) java.lang.Thread.run(Thread.java:636) Thanks! Kostas On 21 February 2011 16:24, Robert Haines <[email protected]> wrote: > Hi Kostas, > >> I remember. However, I revisited it because I am getting different >> results when I run it with the client from when I run it in the >> workbench. Since it doesn't happen with inputs without the quotes I >> assume that the escaping did not work exactly as we liked... actually >> it is treated the same as without the quotes: >> transmembrane proteins AND amyloid >> >> If you use the above in WB it will provide the same results as the client. >> >> You can check the validated protein output to see the differences >> between the results. > > Hmm, yes I see your point now! > > I tried quoting like this and I think I got the results you are looking for: > "\"\"transmembrane proteins\" AND amyloid\"" > > I have attached the results I got for you to have a look at - are they OK? > > The problem seems to be in trying to get ones head around where the escaping > should be done and, crucially, how to do it consistently. Clearly it would be > nice if the user could type "transmembrane proteins" AND amyloid and then > have the client library do the correct escaping to end up with > "\"\"transmembrane proteins\" AND amyloid\"" internally. But this is > impossible when the shell eats all of the unescaped quotes before the client > library even sees them! > > Cheers, > Rob > > > > > >> On 15 February 2011 17:54, Robert Haines <[email protected]> wrote: >>> Hi Kostas, >>> >>> Apologies for the delay in replying! >>> >>>> When I try to run the workflow below in the workbench >>>> >>>> http://www.myexperiment.org/workflows/74/download/bioaid_proteindiscovery_221429.xml?version=3 >>>> >>>> with inputs: >>>> >>>> "transmembrane proteins" AND amyloid >>>> 3 >>>> >>>> it works fine. >>>> >>>> When I try via the ruby client: >>>> >>>> $ t2-run-workflow -w 74.t2flow -i Query:"\"transmembrane proteins\" >>>> AND amyloid" -i maxHits_parameter:3 >>>> http://localhost:8980/taverna-server > tmptmptmp >>>> >>>> I get an error (see tmptmptmp). >>>> >>>> I tried escaping differently but I still get the same problem. >>>> >>>> Any ideas what is going wrong? >>> >>> If you remember, we saw this problem a while back (either just before or >>> just after Christmas I think) and we solved it with careful escaping. >>> Remember that the shell will consume an escape each time and that the >>> double quotes still need to be escaped after the shell has processed the >>> line, and slashes themselves must be escaped! So three slashes are needed >>> rather than one: >>> >>>> $ t2-run-workflow -w 74.t2flow -i Query:"\\\"transmembrane proteins\\\" >>>> AND amyloid" -i maxHits_parameter:3 >>>> http://localhost:8980/taverna-server > tmptmptmp >>> >>> >>> >>> Best wishes, >>> Rob >>> >>> -- >>> Robert Haines >>> myGrid Team >>> School of Computer Science >>> University of Manchester >>> >>> >>> ------------------------------------------------------------------------------ >>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >>> Pinpoint memory and threading errors before they happen. >>> Find and fix more than 250 security defects in the development cycle. >>> Locate bottlenecks in serial and parallel code that limit performance. >>> http://p.sf.net/sfu/intel-dev2devfeb >>> _______________________________________________ >>> taverna-users mailing list >>> [email protected] >>> [email protected] >>> Web site: http://www.taverna.org.uk >>> Mailing lists: http://www.taverna.org.uk/about/contact-us/ >>> >> >> ------------------------------------------------------------------------------ >> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: >> Pinpoint memory and threading errors before they happen. >> Find and fix more than 250 security defects in the development cycle. >> Locate bottlenecks in serial and parallel code that limit performance. >> http://p.sf.net/sfu/intel-dev2devfeb >> _______________________________________________ >> taverna-users mailing list >> [email protected] >> [email protected] >> Web site: http://www.taverna.org.uk >> Mailing lists: http://www.taverna.org.uk/about/contact-us/ > > -- > Robert Haines > myGrid Team > School of Computer Science > University of Manchester > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > taverna-users mailing list > [email protected] > [email protected] > Web site: http://www.taverna.org.uk > Mailing lists: http://www.taverna.org.uk/about/contact-us/ > > ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ taverna-users mailing list [email protected] [email protected] Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/about/contact-us/
