org.strbio.util.db
Class CATHInfo

java.lang.Object
  extended by org.strbio.util.db.Info
      extended by org.strbio.util.db.ProteinInfo
          extended by org.strbio.util.db.ProteinStructureInfo
              extended by org.strbio.util.db.CATHInfo

public class CATHInfo
extends ProteinStructureInfo

This is a class containing info that is found in CATH.

  Version 1.0, 7/21/99 - original version.
  

Version:
1.0, 7/21/99
Author:
JMC

Field Summary
 java.lang.String domainCode
          CATH code for the domain; i.e. 1abcA1
 int endRes
          ending residue in domain, or -1 for whole chain.
 java.lang.String number
          CATH number; i.e. 2.20.200.10...
 int startRes
          starting residue number in domain, or -1 for whole chain.
 
Fields inherited from class org.strbio.util.db.ProteinInfo
protein
 
Fields inherited from class org.strbio.util.db.Info
related
 
Constructor Summary
CATHInfo()
          Default initialization has -1 for start/end res, and null for everything else.
 
Method Summary
 int getA()
          return the architecture number
 int getC()
          return the class number.
 int getH()
          return the homologous superfamily number
 int getLevel(int n)
          Get the part of the number corresponding to the classification at level N (starting at 0 to mean the leftmost, or Class).
 int getT()
          return the topology number
 int matchesLevel(CATHInfo y)
          What is the highest level this matches another record at?
 boolean matchesUpTo(CATHInfo y, int n)
          Does this match another CATH record up to level N?
 void processYAPF(java.lang.String buffer)
          Initialize this Info from a line in a YAPF file, if applicable.
 void stripLeading0()
          strip leading 0's from the number.
 void writeYAPF(Printf outfile)
          write this info to a single line of a file, so it can be read later.
 
Methods inherited from class org.strbio.util.db.Info
getClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

domainCode

public java.lang.String domainCode
CATH code for the domain; i.e. 1abcA1


number

public java.lang.String number
CATH number; i.e. 2.20.200.10...


startRes

public int startRes
starting residue number in domain, or -1 for whole chain.


endRes

public int endRes
ending residue in domain, or -1 for whole chain.

Constructor Detail

CATHInfo

public CATHInfo()
Default initialization has -1 for start/end res, and null for everything else.

Method Detail

getLevel

public int getLevel(int n)
Get the part of the number corresponding to the classification at level N (starting at 0 to mean the leftmost, or Class). Returns 0 to mean unknown/unclassified.


getC

public int getC()
return the class number. I can't call this getClass() or class() due to incompatibility with Java language.


getA

public int getA()
return the architecture number


getT

public int getT()
return the topology number


getH

public int getH()
return the homologous superfamily number


matchesUpTo

public boolean matchesUpTo(CATHInfo y,
                           int n)
Does this match another CATH record up to level N? 0==class, etc. This will be false if the level doesn't exist for one or the other entries.


matchesLevel

public int matchesLevel(CATHInfo y)
What is the highest level this matches another record at? 0=class. -1 means this doesn't even match at the class level.


writeYAPF

public void writeYAPF(Printf outfile)
               throws java.io.IOException
write this info to a single line of a file, so it can be read later.

Overrides:
writeYAPF in class Info
Throws:
java.io.IOException

processYAPF

public void processYAPF(java.lang.String buffer)
Initialize this Info from a line in a YAPF file, if applicable.

Overrides:
processYAPF in class Info

stripLeading0

public void stripLeading0()
strip leading 0's from the number.