Baubles: Making the World a Better Place for Logfile Viewing CCP4 Newsletter 47 Winter 2007

Baubles: Making the World a Better Place for Logfile Viewing

Peter Briggs* and Kevin Cowtan**

*CCP4, CSE Department, STFC Daresbury Laboratory, Warrington WA4 4AD
Email: p.j.briggs@dl.ac.uk

**Structural Biology Laboratory, University of York, Heslington, York YO10 5YW
Email: cowtan at ysbl.york.ac.uk


Introduction

It is a perennial problem with running many CCP4 programs, that in order to understand the results of a program run it is often necessary to look at the log file from that program and this can sometimes be quite challenging. Traditional methods such as viewing the "raw" log file using the UNIX/Linux more command in a terminal window (see figure 1a) have given way to tools such as the file viewer and loggraph programs in CCP4i (figure 1b). However the log file can still be difficult to navigate, particularly if it consists of the output from many programs run in sequence - as is often the case for CCP4i tasks.

Figure 1a) Log file viewed using more in a Linux terminal window. Figure 1b) Log file displayed using CCP4i viewer, with graphs shown in separate loggraph window. Figure 1c) Log file reformatted by baubles and displayed in web browser with inline graphs in JLogGraph.

Baubles is an experimental program that attempts to make log file navigation and intepretation easier, by reformatting them into HTML so they can be viewed in a web browser (figure 1c).

It aims to work with the existing log file structure (for example, the standard program banners, warning and termination messages, and summary tags) so that it can work with the existing CCP4 programs without requiring substantial modifications. It uses a (substantially improved) version of the JLogGraph Java applet to show log graphs inline, and uses JavaScript to add interactivity (for example, the ability to toggle between "summary" and "full" logfile displays) using JavaScript.

Baubles is written in Python and uses the smartie module to do the work of interpreting log files (see the article in newsletter 46: http://www.ccp4.ac.uk/newsletters/newsletter46/articles/smartie.html). It runs on Linux and Windows systems and the generated output should be viewable using both Firefox and Internet Explorer.

Some examples of logfiles reformatted using baubles

The best way to get a feel for what baubles does is to look at a few examples:

The Scala and Buccaneer examples each include a "results" section, which is transformed by baubles and placed in a prominent position at the start of each program summary. Similarly the Truncate example includes some warning messages that have been extracted and displayed prominently by baubles.

Some other examples can also be found at http://www.ccp4.ac.uk/peter/logfiles/.

Limitations

Baubles is still very much an experiment and there are a number of limitations, for example:

Trying it out

You can give baubles a try now - a version of baubles is available for download from:

This file includes an installer script that will update CCP4 6.0.2 to make baubles available from CCP4i (sorry it only installs into Linux and UNIX-type systems at the moment - see the README file for instructions on how to manually install the update for Windows).

Once baubles has been installed, any new jobs that are run in CCP4i will also run baubles at the end to generate an "annotated" version of the log file which can then be accessed via a "View Annotated Log in Web Browser" option in the "View Files from Job" menu (see figure 2).


Figure 2) The "View Annotated Log..." option for accessing HTML versions of log files generated by baubles.

If you're a program developer

You can make your program output more "baubles-compatible" by following a few guidelines:

Information on the $TABLE and $TEXT markup formats can be found in the CCP4 documentation, for example at http://www.ccp4.ac.uk/dist/html/loggraphformat.html. In addition, the article on smartie in the previous newsletter has some information about the kind of log file features that baubles is able to recognise. You can also email us and we'll try to help make your program output more baubles-compliant and (hopefully) more user-friendly.

If you're a program user

Give baubles a try on your favourite programs, and send feedback to us about how we might improve it. Also send feedback to program developers suggesting which bits of program log file you would like to see in a summary.

The Future of Baubles

Baubles is still quite experimental, however we intend to incorporate it in some form in the next release of CCP4. Beyond that we hope to look at ways of improving baubles reformatting to make it more useful operating on "standard" logfiles, and at the same time to put pressure on program developers to make improvements to the "raw" log files output from their programs. Beyond that we would also like to investigate ways to link to other relevant resources and possibly include "commentaries" on the program output.


Credits

Baubles was originally written by Peter Briggs and is based on the "smartie" Python module. It has since undergone several iterations of development by both Peter Briggs and Kevin Cowtan. Kevin also produced the original changes to CCP4i to integrate baubles into it, along with the installer script. Both have subsequently been adapted by Peter.

The JLogGraph Java applet was written by Kevin Cowtan who has also made several recent substantial improvements.

Phil Evans has provided some invaluable feedback on both baubles and JLogGraph, for which PJB and KC are both very grateful.