08.02.2013 Views

New Statistical Algorithms for the Analysis of Mass - FU Berlin, FB MI ...

New Statistical Algorithms for the Analysis of Mass - FU Berlin, FB MI ...

New Statistical Algorithms for the Analysis of Mass - FU Berlin, FB MI ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.2. CASE STUDIES 161<br />

first entry in “params” contains <strong>the</strong> filename <strong>of</strong> <strong>the</strong> user-defined script, <strong>the</strong><br />

remaining array entries contain <strong>the</strong> parameters. Line 10-16 show how <strong>the</strong><br />

calling string “c” is built and that <strong>the</strong> first two parameters mentioned above<br />

are <strong>the</strong> “MCP” string and <strong>the</strong> object reference (line 10). Line 18 shows how <strong>the</strong><br />

QAD Grid worker object can be used to communicate directly with <strong>the</strong> QAD<br />

Grid: here, <strong>the</strong> state string <strong>of</strong> <strong>the</strong> worker is changed, which will automatically<br />

be updated in <strong>the</strong> QAD Grid database. The Matlab built-in function “eval”<br />

is <strong>the</strong>n used with <strong>the</strong> start string “c” as parameter to start <strong>the</strong> actual userdefined<br />

Matlab script.<br />

Binaries The QAD Grid worker concept <strong>of</strong>fers ano<strong>the</strong>r far more general<br />

approach to enable non-Grid applications in <strong>the</strong> case where no source code is<br />

available. Using a wrapper worker almost any binary application can use <strong>the</strong><br />

power <strong>of</strong> distributed computing. To achieve this, a standard base worker is<br />

available that <strong>of</strong>fers <strong>the</strong> following:<br />

� Au<strong>the</strong>nticate at and integrate into <strong>the</strong> proteomics.net plat<strong>for</strong>m<br />

� Request new tasks (and respective parameters) <strong>for</strong> <strong>the</strong> configured purpose<br />

� Per<strong>for</strong>m any system call or run any binary application<br />

� Process results and transmit <strong>the</strong>m to <strong>the</strong> proteomics.net plat<strong>for</strong>m<br />

To give a concrete example listing 6.3 shows how we use a wrapper worker<br />

to start a binary (“tophat”, line 47-51), and process <strong>the</strong> results (copy to some<br />

destination, line 57).<br />

Listing 6.3: Core <strong>of</strong> wrapper worker to start tophat filter binary.<br />

1 public s t a t i c void main ( S t r i n g [ ] a r g s ) throws Exception {<br />

2<br />

3 . . .<br />

4<br />

5 % i n i t i a l i z e o b j e c t<br />

6<br />

7 PROTEO<strong>MI</strong>CSWORKER apply tophat<br />

8 myPROTEO<strong>MI</strong>CSWORKER apply tophat =<br />

9 new PROTEO<strong>MI</strong>CSWORKER apply tophat(<br />

10 ”PROTEO<strong>MI</strong>CSWORKER apply tophat . java ” , ” a p p l i c a t i o n t o p h a t ” ,<br />

11 ”” , false , ”” , ”” , a r g s [ 0 ] ) ;<br />

12<br />

13 % run main method<br />

14<br />

15 myPROTEO<strong>MI</strong>CSWORKER apply tophat . do work ( ) ;<br />

16 }<br />

17<br />

18 . . .<br />

19<br />

20 // −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−<br />

21 public void do work ( ) {<br />

22<br />

23 . . .<br />

24<br />

25 params = g e t n e x t t a s k ( ) ;<br />

26<br />

27 i f ( ( params != null ) && ( ! params . e q u a l s ( ( ”” ) ) ) ) {<br />

28 t a sk h a n d l e d = true ;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!