User Interface application was built using a Java framework called, JavaFx and
automation of bio edit were done by the pywinauto library in python as it has
the ability to automate desktop applications. As a framework Javafx was good in
constructing user interface application forms. Initially the title, scene, and
visibility of the stage were set.
labels and, text areas were generated next in the application form by javafx
framework while the styling part of the application form was done by Cascading
Style Sheets (CSS). Two labels, 2 text areas and two buttons were there in the
user interface application. The title of the application was named as Primer
Designer in text scene title. Two labels were named as First sequence and the
second sequence respectively. Two text areas were designed to input the two
sequences which were needed to identify internal variations. Two buttons were named
as Run and cancel. These two buttons were embedded in the Hbox1.
The progress of the program was shown in progress bar as a status view.
Styling of the Form by Application.css
background image of the user interface window was added with “.root” selector.
Size, colour and the effect properties of the buttons were added to the
Figure 3.4. Representation of class selectors in CSS
Size, style and the effect of the scene title
was added to the “#welcome text” id selector. Effect of the progress status was
added in “#statusview” id selector.
Figure 3.5. Representation of id selectors in CSS
introduced two sequences in the text areas, the Trim method was used to remove
the spaces before and after the sequences. Try and catch were introduced for
Input-output exception handling in java. A file was created to write the given
sequences as sequence 1 and sequence 2 in the text area of the application
form. The resultant file was named as a text file with simple date format to
avoid having identical file names.
Generation of resultant files by py
resultant file name which is in simple date format was export to bioEdit tool
through “py bio_edit_ui_actions.py” code. Python code was generated by
importing application tool from the pywinauto library. All the steps were
indicated after giving the bio edit path. Resultant files of the bioEdit have
“-XML” extension. The “txt” was replaced with –XML extension. Finally, python
“sequence_generator.py” code was called by “py bio_edit_ui_actions.py”code with
XML file to identify internal variations and design primer fragments.
Generate primers by sequence_generator.py
reverse compliment function was built to call where it should be worked. The
function was skipped in the code until it called later. The module “RE” which
stands for regular expression was imported to get the pattern of the sequence
in the XML file. There the line consists of the matching pattern was identified
by readlines of the XML file. Split keyword was used to separate out the
correct sequence part from the matching line. By comparing the two sequences
indexes of the non-matching bases were appended to a list. At last, using
different indexes forward and reverse primers were extracted and append to
another list. The function of the reverse complement was called as the reverse
primer has to be reverse complemented. Physiochemical properties were calculated
to obtain directly with the primer pair.