Back to index

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

List of all members.

Public Member Functions

def __init__
def __str__

Public Attributes

 sid
 residues
 hierarchy

Private Member Functions

def _process

Detailed Description

Holds information for one SCOP domain.

sid -- The SCOP ID of the entry, e.g. d1anu1

residues -- The domain definition as a Residues object

hierarchy -- A string specifying where this domain is in the hierarchy.

Definition at line 21 of file Dom.py.


Constructor & Destructor Documentation

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

Definition at line 30 of file Dom.py.

00030 
00031     def __init__(self, line=None):
00032         self.sid = ''
00033         self.residues = []
00034         self.hierarchy = ''
00035         if line:
00036             self._process(line)


Member Function Documentation

Definition at line 59 of file Dom.py.

00059 
00060     def __str__(self):
00061         s = []
00062         s.append(self.sid)
00063         s.append(str(self.residues).replace(" ","\t") )
00064         s.append(self.hierarchy)
00065         return "\t".join(s) + "\n"
00066 

def Bio.SCOP.Dom.Record._process (   self,
  line 
) [private]
Parses DOM records.
    
Records consist of 4 tab deliminated fields;
sid, pdbid, residues, hierarchy

Definition at line 37 of file Dom.py.

00037 
00038     def _process(self, line):
00039         """Parses DOM records.
00040     
00041         Records consist of 4 tab deliminated fields;
00042         sid, pdbid, residues, hierarchy
00043         """
00044         #For example ::
00045         #
00046         #d1sctg_ 1sct    g:      1.001.001.001.001.001
00047         #d1scth_ 1sct    h:      1.001.001.001.001.001
00048         #d1flp__ 1flp    -       1.001.001.001.001.002
00049         #d1moh__ 1moh    -       1.001.001.001.001.002
00050 
00051         line = line.rstrip()  # no trailing whitespace
00052         columns = line.split("\t")  # separate the tab-delineated cols
00053         if len(columns) != 4:
00054             raise ValueError("I don't understand the format of %s" % line)
00055         self.sid, pdbid, res, self.hierarchy = columns
00056         self.residues = Residues(res)
00057         self.residues.pdbid =pdbid
00058 


Member Data Documentation

Definition at line 33 of file Dom.py.

Definition at line 32 of file Dom.py.

Definition at line 31 of file Dom.py.


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