User defined classes
HALO provides some easy extendable packages so that you can adapt it to best fit your purposes. You can integrate
new half-life calculation methods, new alpha functions, filtering methods and novel normalization methods.
For most of the user defined extensions you have to write a new Java class that extends or implements a given
class or interface. For details on these principles see the following sections:
Writing your own alpha functions
For the calculation of half-lives you need to use an alpha function. In HALO two different methods are implemented
for this function: The constant function always returning 1, and the function that models the cell division. However,
you might like to expand this set of alpha functions. You can do this very easily by following the descriptions below.
You can find the current alpha functions (the classes
in the package
halo.halflife.alpha. If you would like to extend these you have to create a new class
in this package that implements the interface
Alpha. You will have to implement the function
alpha(t), but otherwise you can add functions as you like to.
Writing your own filtering methods
HALO currently provides a set of five different filtering methods: Filtering according to a threshold, according to
present/absent calls, according to a calculated correction bias or probeset quality control filtering with a
threshold or for the optimal probeset. You can find these methods in the class
you want to implement your own filtering method you can do this directly in the same class or extend this class.
Your method has to take a
Data object as an argument and return the filtered
Writing your own normalization methods
Normalization of your data is an important step in the half-life calculation pipeline. In HALO linear regression is
implemented as the standard normalization method, and additionally you can perform normalization based on the
median half-life. This second method is handled in a different way than the standard method and should not serve as
an example for your own normalization methods. You can find the
Normalization class that contains
all methods that are required for a new normalization method in the package
If you want to implement your own method, you simply have to extend this class. Methods for the calculation of
quality control and the generation of a normalization plot are inherited. The most important method is the
calculateCorrectionFactors() method, which has to be implemented with your own method.
Writing your own half-life calculation methods
Currently three different methods for half-life calculation are implemented in HALO: The methods are based on
the ratio of newly transcribed RNA to total RNA, pre-existing RNA to total RNA and newly transcribed RNA to pre-existing RNA, respectively.
You can find these three classes (
in the package
halo.halflife. They are subclasses of
HalfLife, which contains every
necessary method for half-life calculation. If you want to implement your own method you simply have to create
a new class which extends
You will have to implement the following methods:
The first two methods serve as initialization where important variables can be set and the ratios can be calculated
according to your method. For an example of this you can see
initialize(Data data, int replicate)
calculateCorrectionFactors(double medianHWZ, double t)
you can implement your half-life calculation method and perform the calculation for every given probeset and a
given labeling time
calculateCorrectionFactors calculates the correction factors based on the median half-life and
a given labeling time
t. If you do not need such a method you can simply leave the body empty.
calculateMedianOverReplicates() you have to define how the median over all replicates will be
Making your methods available for the user interface
The two different types of user interfaces, command line and GUI, are currently implemented in such a way that
they provide easy access to the calculations and methods that come with HALO. If you have extended HALO with your
own methods and want those to appear in the GUI and command line, you will have to perform some direct changes
in the code.
Command line tools
You will find those tools implemented in the package
halo.userinterface.cmdline. If you have implemented
your own filtering method, you have to adapt the method
prepareData(String input) in the class
CmdFilterData. This method takes a set of command line arguments for data loading and handling
and performs the requested operations. You can add your filtering method here.
CmdNormalization implements the normalization interface for the command line. Here you can simply add
your method to the
prepareNormalization(Data data) function.
If you have implemented more half-life calculation methods, you have to adapt the
main(String args) method
in the class
The GUI is handled in the classes
GuiNormal in the package
halo.userinterface.gui. If you want your own methods to
appear as well you will have to change two parts: first, you will have to change the implementation in the
corresponding interface class, so that your method can be used; second, you will have to change the corresponding
choosing dialogs in the GUI itself, so that the user has the possibility to use your method.
For a new alpha function you have to change only the GUI, through simply adding a new RadioButton to the dialog
actionChooseAlpha() (you will find this in the class
Gui and the method
generateMenuListeners()) with a corresponding action listener that sets the alpha function.
If you have implemented a new filtering method, you have to extend the subpanel Filtering. You can add a
new RadioButton or CheckBox to the method
Gui and set the new method
in the corresponding action listener for the object
guiData. This is an object of the class
GuiFilterData, where you have to adapt
prepareData() similarly to the command line.
When you have implemented a new method for normalization, you will have to add a new RadioButton to the
dialog in the method
Gui and a corresponding actionlistener that
transfers the decision to the object
guiNorm. The class
GuiNormal, of which this
object is an instance, provides the method
calcNormalization that you also have to adapt.
If you have implemented a new half-life calculation method, you have to add a RadioButton in the method
Gui and add the method to the
guiHL object with an
actionlistener. This object is an instance of
GuiHalfLife, where you also have to adapt the
generateHL so that it uses your method if told so.