updated go things..
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sat, 16 Apr 2011 03:14:01 +0000 (03:14 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sat, 16 Apr 2011 03:14:01 +0000 (03:14 +0000)
forester/java/src/org/forester/go/BasicGoRelationship.java
forester/java/src/org/forester/go/BasicGoSubset.java
forester/java/src/org/forester/go/BasicGoXRef.java
forester/java/src/org/forester/go/GoRelationship.java
forester/java/src/org/forester/go/GoSubset.java
forester/java/src/org/forester/go/GoXRef.java
forester/java/src/org/forester/phylogeny/Phylogeny.java

index 69d612f..247e859 100644 (file)
@@ -49,6 +49,9 @@ public class BasicGoRelationship implements GoRelationship {
         else if ( type.toLowerCase().equals( POSITIVELY_REGULATES_STR ) ) {
             _type = Type.POSITIVELY_REGULATES;
         }
+        else if ( type.toLowerCase().equals( HAS_PART_STR ) ) {
+            _type = Type.HAS_PART;
+        }
         else {
             throw new IllegalArgumentException( "unknown GO relationship type: " + type );
         }
@@ -124,8 +127,11 @@ public class BasicGoRelationship implements GoRelationship {
             case REGULATES:
                 sb.append( REGULATES_STR );
                 break;
+            case HAS_PART:
+                sb.append( HAS_PART_STR );
+                break;
             default:
-                new AssertionError( "unknown type: " + getType() );
+                new IllegalStateException( "unknown type: " + getType() );
         }
         sb.append( ": " );
         sb.append( getGoId().toString() );
index de2f65f..dc63b52 100644 (file)
@@ -55,6 +55,12 @@ public class BasicGoSubset implements GoSubset {
         else if ( my_s.equals( GOSLIM_POMBE_STR ) ) {
             _type = Type.GOSLIM_POMBE;
         }
+        else if ( my_s.equals( HIGH_LEVEL_ANNOTATION_QC_STR ) ) {
+            _type = Type.HIGH_LEVEL_ANNOTATION_QC;
+        }
+        else if ( my_s.equals( UNVETTED_STR ) ) {
+            _type = Type.UNVETTED;
+        }
         else {
             throw new IllegalArgumentException( "unknown GO subset type: " + my_s );
         }
index 3ce65b3..99a0c9e 100644 (file)
@@ -81,6 +81,21 @@ public class BasicGoXRef implements GoXRef {
         else if ( type.equals( WIKIPEDIA_STR ) ) {
             _type = Type.WIKIPEDIA;
         }
+        else if ( type.equals( RHEA_STR ) ) {
+            _type = Type.RHEA;
+        }
+        else if ( type.equals( NIF_SUBCELLULAR_STR ) ) {
+            _type = Type.NIF_SUBCELLULAR;
+        }
+        else if ( type.equals( CORUM_STR ) ) {
+            _type = Type.CORUM;
+        }
+        else if ( type.equals( UNIPATHWAY_STR ) ) {
+            _type = Type.UNIPATHWAY;
+        }
+        else if ( type.equals( PO_STR ) ) {
+            _type = Type.PO;
+        }
         else {
             throw new IllegalArgumentException( "unknown GO xref type: " + type );
         }
index 2d308ba..47ef4e2 100644 (file)
@@ -31,12 +31,13 @@ public interface GoRelationship extends Comparable<GoRelationship> {
     public static final String REGULATES_STR            = "regulates";
     public static final String NEGATIVELY_REGULATES_STR = "negatively_regulates";
     public static final String POSITIVELY_REGULATES_STR = "positively_regulates";
+    public static final String HAS_PART_STR             = "has_part";
 
     public GoId getGoId();
 
     public Type getType();
 
     public static enum Type {
-        PART_OF, REGULATES, NEGATIVELY_REGULATES, POSITIVELY_REGULATES;
+        PART_OF, REGULATES, NEGATIVELY_REGULATES, POSITIVELY_REGULATES, HAS_PART;
     }
 }
index 620b15f..64773d0 100644 (file)
@@ -27,18 +27,29 @@ package org.forester.go;
 
 public interface GoSubset extends Comparable<GoSubset> {
 
-    public static final String GOSLIM_GENERIC_STR = "goslim_generic";
-    public static final String GOSLIM_GOA_STR     = "goslim_goa";
-    public static final String GOSLIM_PIR_STR     = "goslim_pir";
-    public static final String GOSUBSET_PROK_STR  = "gosubset_prok";
-    public static final String GOSLIM_CANDIDA_STR = "goslim_candida";
-    public static final String GOSLIM_PLANT_STR   = "goslim_plant";
-    public static final String GOSLIM_YEAST_STR   = "goslim_yeast";
-    public static final String GOSLIM_POMBE_STR   = "goslim_pombe";
+    public static final String GOSLIM_GENERIC_STR           = "goslim_generic";
+    public static final String GOSLIM_GOA_STR               = "goslim_goa";
+    public static final String GOSLIM_PIR_STR               = "goslim_pir";
+    public static final String GOSUBSET_PROK_STR            = "gosubset_prok";
+    public static final String GOSLIM_CANDIDA_STR           = "goslim_candida";
+    public static final String GOSLIM_PLANT_STR             = "goslim_plant";
+    public static final String GOSLIM_YEAST_STR             = "goslim_yeast";
+    public static final String GOSLIM_POMBE_STR             = "goslim_pombe";
+    public static final String HIGH_LEVEL_ANNOTATION_QC_STR = "high_level_annotation_qc";
+    public static final String UNVETTED_STR                 = "unvetted";
 
     public Type getType();
 
     public static enum Type {
-        GOSLIM_GENERIC, GOSLIM_GOA, GOSLIM_PIR, GOSUBSET_PROK, GOSLIM_CANDIDA, GOSLIM_PLANT, GOSLIM_YEAST, GOSLIM_POMBE;
+        GOSLIM_GENERIC,
+        GOSLIM_GOA,
+        GOSLIM_PIR,
+        GOSUBSET_PROK,
+        GOSLIM_CANDIDA,
+        GOSLIM_PLANT,
+        GOSLIM_YEAST,
+        GOSLIM_POMBE,
+        HIGH_LEVEL_ANNOTATION_QC,
+        UNVETTED;
     }
 }
index adab829..41a9305 100644 (file)
@@ -42,6 +42,11 @@ public interface GoXRef extends Comparable<GoXRef> {
     public static final String GOC_STR               = "GOC";
     public static final String WIKIPEDIA_STR         = "Wikipedia";
     public static final String KEGG_STR              = "KEGG";
+    public static final String RHEA_STR              = "RHEA";
+    public static final String NIF_SUBCELLULAR_STR   = "NIF_Subcellular";
+    public static final String CORUM_STR             = "CORUM";
+    public static final String UNIPATHWAY_STR        = "UniPathway";
+    public static final String PO_STR                = "PO";
 
     public Type getType();
 
@@ -62,6 +67,11 @@ public interface GoXRef extends Comparable<GoXRef> {
         IMG,
         GOC,
         WIKIPEDIA,
-        KEGG;
+        KEGG,
+        RHEA,
+        NIF_SUBCELLULAR,
+        CORUM,
+        UNIPATHWAY,
+        PO;
     }
 }
index 4d0dae6..9560dfa 100644 (file)
@@ -572,7 +572,7 @@ public class Phylogeny {
             return 0;
         }
         int c = 0;
-        for( PhylogenyNodeIterator it = iteratorPreorder(); it.hasNext(); it.next() ) {
+        for( final PhylogenyNodeIterator it = iteratorPreorder(); it.hasNext(); it.next() ) {
             ++c;
         }
         return c;