GuiLiner: A Configurable and Extensible Graphical User Interface for Scientific Analysis and Simulation Software

The computer programs most users interact with daily are driven by a graphical user interface (GUI). However, many scientific applications are used with a command line interface (CLI) for the ease of development and increased flexibility this mode pr…

Authors: N. C. Manoukis, E. C. Anderson

GuiLiner: A Configurable and Extensible Graphical User Interface for   Scientific Analysis and Simulation Software
GuiLiner: A Configurable and Extensible Graphical User Interface f or Scientific Analysis and Simulation Softwar e Nicholas C. Manoukis † Eric C. Anderson § † Section of V ector Biology , Laboratory of Malaria and V ector Research National Institute of Allergy and Infectious Diseases, National Institutes of Health 12735 T winbrook Parkw ay , Bethesda, M D 20892 USA § Fisheries Ecology Di visio n, S outhwest Fisheries Science Center National Oceanic and Atmospheric Adminis tration 110 Shaf fer Road, Santa Cruz, CA 95060 USA manoukis n@niaid.n ih.gov Eric.And erson@noa a.gov Abstract The computer prog r ams most users int era c t with daily are driven b y a gra phical user in ter- face (GUI). Ho wev er, many scientific applications are used with a co mmand line interface (CLI) for the eas e of developmen t and incr eased flexibilit y this mo de provides. Scient ific a pplication developers w ould b e nefit from being able to provide a GUI easily for their CLI programs, th us retaining the adv an tages of b oth mo des of interaction. GuiLiner is a generic, extensible and flexible front-end desig ne d to “host” a wide v ariety of data analysis or simulation pr ograms. Scient ific a pplication developers who pro duce a corre ctly formatted XML file des cribing their progra m’s options and s ome of its do cumentation can immediately use GuiLiner to pr o duce a carefully implemented GUI for their analysis or simulation progr ams. Key-Wor ds : Graphical u ser interface s, XML, C omp uter app lications, S oft w are in terfaces 1 Introduction Computer applications for scien tific r esearc h gener- ally receiv e user input th rough a command line in- terface (CL I ) or through a graph ical u ser in terface (GUI). Eac h h as adv anta ges and shortcomings. F or example, GUIs p ro vide immediate accessibilit y and a familiar mo de of interacti on for most users . On the ot her hand, the CLI allo ws f or batc h pr o cessing, inclusion of the program in shell s cr ip ts, and the re- ten tion of execution parameters. CLI programs also require less dev elopment time and are more p ortable across d ifferen t computer op erating systems. In this pap er we presen t guiLin er , an app licatio n designed to bridge the gap b et w een CLI an d GUI mo des for computer p rograms used in scien tific re- searc h. GuiLiner is a generic, extensible and fl exible fron t-end designed to “host” a wide v ariet y of d ata analysis or sim ulation applications. It is geared p ri- marily to w ard th e scien tific application develo pment comm unit y , w hic h can realize sev eral un iqu e b enefits from its use, b eginnin g with the eliminatio n of time sp ent writing code to generate a GUI. The task of creating a generic GUI for biologica l scien tific app licatio ns is made simpler b y the fact that most of them follo w a simple interac tion mo del: 1) the u s er provides data and parameters to the appli- cation 2) the alg orithm is executed on these and 3 ) 1 Figure 1 : Schematic diagram showing h o w GuiLiner, th e hosted analysis app lication and th e XML confiuration file are used together to present a single GUI- driven application to the user. the results of the analysis are return ed. Each of these steps is generally atomic. Since step 1) can inv olv e man y options, it is here that CLI based applications can b ecome cumb ersome to u s e or ma y b e in timidating to inexp erienced users. GuiLiner fo cuses on this step a nd on step 2). With- out mo difyin g the original CLI pr ogram, guiLiner pro vides a w a y for users to quic kly see the a v ail- able program options, read do cum entatio n and s et the v a lue of eac h option, and then execute the pro- gram, all from within a familiar “p oin t-and-clic k” en- vironmen t. 2 Implementation GuiLiner is wr itten in the Ja v a p rograming language, and virtual mac hines capable of executing it are a v a ilable for curren t v ersions of Microsoft Windo ws, Mac OS X and many t yp es of UNIX based op erating systems such as GNU/Lin ux (for a full list, please see h ttp://www.ja v a.co m:80/en/do wnload/man ual.jsp ). GuiLiner op erates b y parsing an XML configuration file whic h con tains information on the CLI-based application b eing h osted, its options, documentatio n and some details ab out how gu iLin er itself should displa y this information (Figure 1). This scheme allo ws almost un limited extensibility , so that the feature-set of guiLiner can b e in creased with later releases. The GUI p ro vided by guiLiner features a rapid vi- Figure 2 : GuiLiner h osting a sample program, in Editing mod e. sual summary of whic h options are required, set, or unset in a color-cod ed option tree; in tegrated disp la y of do cumenta tion sp ecific to eac h program op tion; fa- cilities for s aving the v alues of options used for a p ar- ticular execution of the hosted application; and the abilit y to view and sa v e to disk p rogram ru n-time output a nd /or err ors. In addition to the rapid displa y of selected and re- quired options, efficie nt option inform ation retriev al and runtime r esults, guiLiner’s la y out is designed to put commonly u sed functions with in ea sy eac h. Be- sides the usual menu bar (Figure 2 #1) con taining a custom help b ro wser and XML sav e-o p en options among other s ettings, there is also a button bar for functions commonly used durin g option setting (Fig- ure 2 #2). These include functions to preview the command line, rest all options, manipu late the op- tion tree and run the hosted program. Use of these is describ ed in more detail in the next section. W e ha v e found few other efforts to create a generic user in terface. Some of these are not fo cused on the scien tific computin g comm unit y , and so aim to ac- commo date a wider v a riet y of C LI programs. Th ese usually tak e the form of w idget sets that can b e con- figured to create a GUI. While this approac h is more 2 flexible it is usually also more time consuming and less extensible. Other generic GUI programs us e a “Wizard” interface , wh ic h is b oth flexible and easy to deploy , but lac k the visual summary and inte rac- tivit y that guiLiner offers. The adv a nta ge of guiLin er o v er either of th ese approac hes is that it is designed to represent a sin gle mo de of inte raction th at is com- mon in scien tific computing, wh ic h allo ws it to b e emplo y ed very quic kly and at the s ame time mak es it v ery effectiv e for hosting these t yp es of p r ograms. T o date we ha v e not found any other applications wh ich fill this exact n ic he. 3 Usage Overvi ew Most u ser interac tion w ith guiLiner inv olv es selecting options from the option tree (Figure 2 #4) by clic king on them. When selected, an in terface to manipulate that option is display ed in the options pane (Figure 2 #3). The exact in terface will v ary dep ending on whic h t yp e of optio n is b eing displa y ed: it ma y h a v e a text b o x where a v a lue can b e inpu t, a set of buttons that allo ws the user to set the option to one of sev eral giv en v alues, or a dialog b o x for na vigating the file directory to find an input fi le, etc. In all cases the user is able to get more inform ation on the option b y clic king the “Information” tab in the option pane. The colors in the option tree giv e a quic k visual guide to the run settings. Red = option is required, v a lue not y et sp ecified; Blac k = option not required, v a lue n ot y et s p ecified; Blue = a v alue for the op- tion has b een sp ecified and will b e used for program execution. Clic king the P r eview b utton (Figure. 2 #2) causes the command lin e to b e assem bled from the v a lues currentl y s p ecified by the user and prints it to the console p anel (Figure. 2 #5). This is p articularly useful for “transitional” users wh o are gaining famil- iarit y with th e command line en vironment, b ut are not y et fully comfortable w ith it. Usin g this fac ilit y then saving th e console con ten ts is an easy wa y to sa v e run settings. An alternativ e metho d it to sa v e the ent ire XML fi le with the selected options already set. Though this is more cumbersome to read, it do es allo w guiLiner to automatical ly load the settings u sed in th at particular exec ution. When the R UN PR OGRAM button (Figure. 2 #2) is clic k ed, guiLin er u s es a system call to exe- cute the CLI pr ogram with the options assembled by the us er in guiLiner. P r ogram output to stdout go es to the co nsole panel from w here it may b e view ed or sa v ed to disk as a text file. Program outpu t to stderr is directed to the Er rors panel a nd the user is noti- fied of err ors in the status bar (Figure. 2 #6). An y program outpu t directed to files go es to those files sp ecified either by an absolute path or by a path rel- ativ e to th e curren t w orking d irectory (exactly as if the program were ru n from the CLI). guiLiner is n ot designed for interact iv e display of program output , though fu tu re v ersions could allo w sim p le GUI-driv en output displa y using dev eloper pro vided scripts and, for example, the R statistical computing environmen t [1]. F or ease of distribu tion and ins tallati on to end - user mac hines guiLiner, the XML configuration file and the CLI executable can b e distributed as an installer. T here are sev eral excellen t installer p lat- forms a v ailable whic h could streamline th is pro cess, suc h as the platform indep enden t IzP ac k (a v ailable at http://iz pac k.org/ ). Details on the XML file sp ecificatio n, op- tion typ es, the application executable and source co de, and d iscussion forums are a v ailable at h ttp://guiliner.sourceforge.net . Also at this web site there are sample XML configuration files for a v ari- et y of bioinform atic and p opulation genetic analysis programs including Exonerate [2], IM [3], Mak esam- ples [4] and Spip [5]. A Do cumen t T yp e Definition (DTD) fi le is distributed with guiLiner to automate XML configuration file generation and to allo w err or c hec king. W e also distribu te there a small C libr ary f or C or C ++ pr ogrammers that simplifies command-line parsing and err or chec king, and allo ws th e do cumen- tation for eac h option to b e written and stored in the source code. This d o cument ation ma y b e prin ted by the p r ogram in short-help format, long-help f orm at, UNIX man page format, and g uiLiner XML format. The guiLiner XML format can b e read d irectly by guiLiner so that an y up d ates to the program can b e immediately translated to the guiLiner GUI. W e encour age con tributions to the sour ce co de or 3 commen ts on guiLiner. 4 Conclusions GuiLiner is an effectiv e “wrapp er” f or a wide v ariet y of biological analysis and sim ulation soft w are. Ap- plication develo p ers will b e able to offer a functional and carefully implemented GUI to their CLI-driven soft w are with little effort. A t the same time, guiLiner should make a wider v ariet y of applicatio ns immedi- ately a v ailable for the analyses of researchers who are not familiar with the CLI or are beginnin g to le arn ab out it. 5 Acknowledgement s This researc h was su p p orted in part by the Intra- m ural Researc h Program of the NIH, NIAID. The authors w ould lik e to thank J. Hey , R. Hudson and J Garza for graciously p ermitting us to present their programs bund led with guiLiner to serve as exam- ples. R efer enc es [1] R Dev elopmen t Core T eam, R: A L anguage and Envir onment for Statistic al Computing , R F oun- dation for S tatistica l C omputing, Vienna, Aus- tria, 2007, ISBN 3- 900051-0 7-0. [2] G. S. C. S later and E. Birn ey , “Automated gener- ation of heuristics for biologica l sequence compar- ison.” BM C Bioinformatics , v ol. 6, p. 31, 2005. [3] J. Hey and R. Nielsen, “Multilo cus metho ds for estimating p opulation size s, migration rates and div ergence time, with app lications to the diver- gence of Dr osophila pseudo obscur a and D. p er- similis .” Genetics , v ol. 167, n o. 2, pp . 747–7 60, Jun 2004. [4] R. R. Hudson, “G enerating samples und er a wrigh t-fisher neutral mo del of genetic v ariation.” Bioinformatics , v ol. 18, no. 2, p p. 337–3 38, F eb 2002. [5] E. Anderson and K. Du nham, “spip 1.0: a pro- gram for simulating p edigrees and genetic data in age-structured p opulations,” Mole cular Ec ol- o gy Notes , v ol. 5, no. 2, pp. 459–461 , 2005. 4

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment