org.strbio.util.db
Class SCOPInfo

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.SCOPInfo

public class SCOPInfo
extends ProteinStructureInfo

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

  Version 1.0, 3/6/1 - original version.
  

Version:
1.0, 3/6/1
Author:
JMC

Field Summary
 java.lang.String domainCode
          SCOP code for the domain; i.e. d3sdha_
 java.lang.String number
          SCOP number; i.e. 1.1.1.1.1
 
Fields inherited from class org.strbio.util.db.ProteinInfo
protein
 
Fields inherited from class org.strbio.util.db.Info
related
 
Constructor Summary
SCOPInfo()
           
 
Method Summary
 int getC()
          return the class number.
 int getFamily()
          return the family number
 int getFold()
          return the fold 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 getProtein()
          return the protein number
 int getSuperfamily()
          return the superfamily number.
 int matchesLevel(SCOPInfo y)
          What is the highest level this matches another record at?
 boolean matchesUpTo(SCOPInfo y, int n)
          Does this match another SCOP 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
SCOP code for the domain; i.e. d3sdha_


number

public java.lang.String number
SCOP number; i.e. 1.1.1.1.1

Constructor Detail

SCOPInfo

public SCOPInfo()
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.


getFold

public int getFold()
return the fold number.


getSuperfamily

public int getSuperfamily()
return the superfamily number.


getFamily

public int getFamily()
return the family number


getProtein

public int getProtein()
return the protein number


matchesUpTo

public boolean matchesUpTo(SCOPInfo y,
                           int n)
Does this match another SCOP 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(SCOPInfo 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.