/*
 * Project: GenView
 * 
 * Author: Marc Streit
 * 
 *  creation date: 03-07-2006
 *  
 */
package cerberus.application.kegg.test;

import keggapi.KEGGLocator;
import keggapi.KEGGPortType;
import keggapi.SSDBRelation;

class KEGG_Test {
        public static void main(String[] args) throws Exception {
                KEGGLocator    locator  = new KEGGLocator();
                KEGGPortType   serv     = locator.getKEGGPort();

                String         query    = args[0];
                SSDBRelation[] results  = null;

                results = serv.get_best_neighbors_by_gene(query, 1, 50);

                for (int i = 0; i < results.length; i++) {
                        String gene1  = results[i].getGenes_id1();
                        String gene2  = results[i].getGenes_id2();
                        int    score  = results[i].getSw_score();
                        System.out.println(gene1 + "\t" + gene2 + "\t" + score);
                }
        }
}

/*import keggapi.*;

class KEGG_Test {
        public static void main(String[] args) throws Exception {
                KEGGLocator  locator = new KEGGLocator();
                KEGGPortType serv = locator.getKEGGPort();

                String   query   = "eco:b1002";
                String[] results = serv.get_genes_by_pathway(query);
                
                System.out.println("here we go...");
                for (int i = 0; i < results.length; i++) {
                        System.out.println(results[i]);
                }
        }
}*/

@@ -187,37 +187,8 @@
 ype;
-%0Aimport keggapi.SSDBRelation;
 %0A%0Acl
@@ -199,32 +199,26 @@
 KEGG_Test %7B%0A
-        
+%0A%09
 public stati
@@ -263,32 +263,19 @@
 ption %7B%0A
-                
+%0A%09%09
 KEGGLoca
@@ -282,19 +282,16 @@
 tor 
-   
 locator 
  = n
@@ -286,17 +286,16 @@
 locator 
- 
 = new KE
@@ -307,32 +307,18 @@
 ator();%0A
-                
+%09%09
 KEGGPort
@@ -326,19 +326,13 @@
 ype 
-  
 serv 
-    
 = lo
@@ -357,198 +357,201 @@
 );%0A%0A
-                String         query    = args%5B0%5D;%0A                SSDBRelation%5B%5D results  = null;%0A%0A                results = serv.get_best_neighbor
+%09%09String%5B%5D res = new String%5B50%5D;%0A%09%09%0A%09%09// Returns all the GENES entry IDs in E.coli genome which are assigned%0A%09%09// EC number ec:1.2.1.1%0A%09%09res = serv.get_gene
 s_by_
-g
 en
-e(query, 1, 50);%0A%0A                
+zyme(%22ec:3.3.1.1%22, %22hsa%22);%0A%0A%09%09
 for 
@@ -561,36 +561,32 @@
 t i = 0; i %3C res
-ults
 .length; i++) %7B%0A
@@ -586,325 +586,118 @@
 i++)
- %7B%0A                        String gene1  = results%5Bi%5D.getGenes_id1();%0A                        String gene2  = results%5Bi%5D.getGenes_id2();%0A                        int    score  = results%5Bi%5D.getSw_score();%0A                        System.out.println(gene1 + %22%5Ct%22 + gene2 + %22%5Ct%22 + score);%0A                %7D%0A        
+%0A%09%09%7B%0A%09%09%09System.out.println(%22Enzyme 3.3.1.1 is activated by gene with geneID: %22%0A%09%09%09%09%09+res%5Bi%5D);%0A%09%09%7D%0A%09
 %7D%0A%7D%0A%0A/*
+%0A * 
 impo
@@ -710,17 +710,23 @@
 gapi.*;%0A
-%0A
+ * %0A * 
 class KE
@@ -734,24 +734,16 @@
 G_Test %7B
-%0A       
  public 
@@ -794,30 +794,17 @@
 tion %7B%0A 
-              
+*
  KEGGLoc
@@ -808,17 +808,16 @@
 Locator 
- 
 locator 
@@ -836,32 +836,16 @@
 cator();
-%0A               
  KEGGPor
@@ -848,32 +848,35 @@
 GPortType serv =
+%0A *
  locator.getKEGG
@@ -887,32 +887,22 @@
 ();%0A
-%0A               
+ * %0A *
  String 
   qu
@@ -901,18 +901,14 @@
 ing 
-  
 query 
-  
 = %22e
@@ -917,32 +917,16 @@
 :b1002%22;
-%0A               
  String%5B
@@ -936,16 +936,19 @@
 esults =
+%0A *
  serv.ge
@@ -979,39 +979,13 @@
 );%0A 
-               %0A               
+* %0A *
  Sys
@@ -1017,32 +1017,16 @@
 go...%22);
-%0A               
  for (in
@@ -1062,38 +1062,17 @@
 i++) %7B%0A 
-                      
+*
  System.
@@ -1099,37 +1099,15 @@
 i%5D);
-%0A                %7D%0A        %7D%0A%7D
+ %7D %7D %7D%0A 
 */%0A

Simple KEGG Database test program that retrieves a list of genes for a specific enzyme.