Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Private Member Functions
Bio.SCOP.Cla.Record Class Reference

List of all members.

Public Member Functions

def __init__
def __str__

Public Attributes

 sid
 residues
 sccs
 sunid
 hierarchy

Private Member Functions

def _process

Detailed Description

Holds information for one SCOP domain.

sid         --  SCOP identifier. e.g. d1danl2

residues    --  The domain definition as a Residues object

sccs        --  SCOP concise classification strings.  e.g. b.1.2.1

sunid       --  SCOP unique identifier for this domain

hierarchy   --  A dictionary, keys are nodetype, values are sunid,
                describing the location of this domain in the SCOP
                hierarchy. See the Scop module for a description of
                nodetypes. This used to be a list of (key,value) tuples
                in older versions of Biopython (see Bug 3109).

Definition at line 25 of file Cla.py.


Constructor & Destructor Documentation

def Bio.SCOP.Cla.Record.__init__ (   self,
  line = None 
)

Definition at line 42 of file Cla.py.

00042 
00043     def __init__(self, line=None):
00044         self.sid = ''
00045         self.residues = None 
00046         self.sccs = ''
00047         self.sunid =''
00048         self.hierarchy = {}
00049         if line:
00050             self._process(line)
        

Member Function Documentation

Definition at line 66 of file Cla.py.

00066 
00067     def __str__(self):
00068         s = []
00069         s.append(self.sid)
00070         s += str(self.residues).split(" ")
00071         s.append(self.sccs)
00072         s.append(self.sunid)
00073 
00074         s.append(','.join('='.join((key, str(value))) for key, value
00075                           in self.hierarchy.iteritems()))
00076 
00077         return "\t".join(map(str,s)) + "\n"
00078 

def Bio.SCOP.Cla.Record._process (   self,
  line 
) [private]

Definition at line 51 of file Cla.py.

00051 
00052     def _process(self, line):
00053         line = line.rstrip()         # no trailing whitespace
00054         columns = line.split('\t')   # separate the tab-delineated cols
00055         if len(columns) != 6:
00056             raise ValueError("I don't understand the format of %s" % line)
00057         
00058         self.sid, pdbid, residues, self.sccs, self.sunid, hierarchy = columns
00059         self.residues = Residues(residues)
00060         self.residues.pdbid = pdbid
00061         self.sunid = int(self.sunid)
00062         
00063         for ht in hierarchy.split(","):
00064             key, value = ht.split('=')
00065             self.hierarchy[key] = int(value)


Member Data Documentation

Definition at line 47 of file Cla.py.

Definition at line 44 of file Cla.py.

Definition at line 45 of file Cla.py.

Definition at line 43 of file Cla.py.

Definition at line 46 of file Cla.py.


The documentation for this class was generated from the following file: