Java-for-beginners

E-mail Print PDF
Article Index
Java-for-beginners
first code
code 1 explanation
Executing the Program
Fetch Data from NCBI
NCBI fetch reference
All Pages

How to Write a Java Program for Bioinformatics Applications: - A Manual

How to Write a Java Program for Bioinformatics Applications: - A Manual

By Jitesh B Dundas

This manual is a self-help guide for doing programming, especially in Java.

 

 

I learnt this way of looking at programming from my MCA Java guest faculty Prof. Lele, so my thanks to him.

It is recommended that you read the following sources for the Java language before or while reading this manual.

Java: Complete Reference by Herbert Schildt

The Sun Java Tutorial (online at www.java.sun.com)

JavaScript / HTML tutorial (online at www.w3schools.com )

Inside Servlets by Justin Callaway

Java Server Faces Technology at www.java.sun.com

In order to do write a Java Program, we need to do take care of the following:-

1) A blueprint of the actual requirements with the expected input and the expected output

2) A series of steps that explain the logic to be used to implement the requirements of Step-1.

3) Set of function calls using the Java language API to set the language

A Java Program is nothing but a set of function calls to the Java language API. It is all about calling the right functions of Java that will satisfy our logic for getting our results.

So let us assume that you need to write a Java Program to fetch data from EMBL String database. How do we go about getting this desired result?

The first thing to do is to get the requirements very clearly. Here, our requirement is to get data from EMBL String database. Thus, we need to understand:-

1) What are the methods or ways available in the database source to fulfill the requirements?

Well, we know that the EMBL String database (referred to as db in future here) has a programmable API that allows us to fetch data from the database in real-time. Thus, if we just make use of the correct function calls to the correct URL (with correct parameters and input values); we should be able to get the desired results from the database.

On visiting the String EMBL API, we find that it has an API in the Help/Info section on the website. There is a documentation available explaining how to use the database for fetching data from your Java program. Thus, we first get the URL and the parameters to send the request to the database.

Thus, we read for the URL and reach to the paragraph where they have mentioned the URL parameters.

Try to make the URL using the parameters presented for the use by the API. This can be done in our program by adding parameters as needed. You could add the input values based on the normal use of database and see if you get the same results programmatically as well.

For e.g. we need to find the list of protein interactors for the p53 protein. On the basis of the URL presented, besides the keywords

http://string-db.org/api/psi-mi-tab/interactionsList?identifiers=p53&required_score=900

In the above e.g., the search term is p53 protein with a required score of 900. Look up the API of the String db and check which all parameters you can add.

2) How do we actually do this using the methods available?

Ok, now we have the parameters and the URL to be used. So how do we use all this for our program. Well, first we need:-

2.1) The logic for the program

2.2) The function calls and statements in Java for implementing each line of the logic

2.3.) The correct and validated set of inputs from the user as well as the correct format of the total input for the String db.

Right, now we have the steps in place. Let us proceed towards writing the program.



You are here: Tutorials Languages Java