From: cmzmasek@gmail.com Date: Sat, 16 Apr 2011 03:14:01 +0000 (+0000) Subject: updated go things.. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b568d2173eb55795647a68afc370aba0cb1170f2;p=jalview.git updated go things.. --- diff --git a/forester/java/src/org/forester/go/BasicGoRelationship.java b/forester/java/src/org/forester/go/BasicGoRelationship.java index 69d612f..247e859 100644 --- a/forester/java/src/org/forester/go/BasicGoRelationship.java +++ b/forester/java/src/org/forester/go/BasicGoRelationship.java @@ -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() ); diff --git a/forester/java/src/org/forester/go/BasicGoSubset.java b/forester/java/src/org/forester/go/BasicGoSubset.java index de2f65f..dc63b52 100644 --- a/forester/java/src/org/forester/go/BasicGoSubset.java +++ b/forester/java/src/org/forester/go/BasicGoSubset.java @@ -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 ); } diff --git a/forester/java/src/org/forester/go/BasicGoXRef.java b/forester/java/src/org/forester/go/BasicGoXRef.java index 3ce65b3..99a0c9e 100644 --- a/forester/java/src/org/forester/go/BasicGoXRef.java +++ b/forester/java/src/org/forester/go/BasicGoXRef.java @@ -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 ); } diff --git a/forester/java/src/org/forester/go/GoRelationship.java b/forester/java/src/org/forester/go/GoRelationship.java index 2d308ba..47ef4e2 100644 --- a/forester/java/src/org/forester/go/GoRelationship.java +++ b/forester/java/src/org/forester/go/GoRelationship.java @@ -31,12 +31,13 @@ public interface GoRelationship extends Comparable { 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; } } diff --git a/forester/java/src/org/forester/go/GoSubset.java b/forester/java/src/org/forester/go/GoSubset.java index 620b15f..64773d0 100644 --- a/forester/java/src/org/forester/go/GoSubset.java +++ b/forester/java/src/org/forester/go/GoSubset.java @@ -27,18 +27,29 @@ package org.forester.go; public interface GoSubset extends Comparable { - 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; } } diff --git a/forester/java/src/org/forester/go/GoXRef.java b/forester/java/src/org/forester/go/GoXRef.java index adab829..41a9305 100644 --- a/forester/java/src/org/forester/go/GoXRef.java +++ b/forester/java/src/org/forester/go/GoXRef.java @@ -42,6 +42,11 @@ public interface GoXRef extends Comparable { 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 { IMG, GOC, WIKIPEDIA, - KEGG; + KEGG, + RHEA, + NIF_SUBCELLULAR, + CORUM, + UNIPATHWAY, + PO; } } diff --git a/forester/java/src/org/forester/phylogeny/Phylogeny.java b/forester/java/src/org/forester/phylogeny/Phylogeny.java index 4d0dae6..9560dfa 100644 --- a/forester/java/src/org/forester/phylogeny/Phylogeny.java +++ b/forester/java/src/org/forester/phylogeny/Phylogeny.java @@ -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;