Back to index

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

List of all members.

Public Member Functions

def __init__
def __str__

Public Attributes

 sunid
 nodetype
 sccs
 name
 description

Private Member Functions

def _process

Detailed Description

Holds information for one node in the SCOP hierarchy.

sunid       -- SCOP unique identifiers

nodetype    -- One of 'cl' (class), 'cf' (fold), 'sf' (superfamily),
               'fa' (family), 'dm' (protein), 'sp' (species),
               'px' (domain). Additional node types may be added.

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

name        -- The SCOP ID (sid) for domains (e.g. d1anu1),
               currently empty for other node types

description --  e.g. "All beta proteins","Fibronectin type III", 

Definition at line 18 of file Des.py.


Constructor & Destructor Documentation

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

Definition at line 35 of file Des.py.

00035 
00036     def __init__(self, line=None):
00037         self.sunid = ''
00038         self.nodetype = ''
00039         self.sccs = ''
00040         self.name = ''
00041         self.description =''
00042         if line:
00043             self._process(line)
        

Member Function Documentation

Definition at line 68 of file Des.py.

00068 
00069     def __str__(self):
00070         s = []
00071         s.append(self.sunid)
00072         s.append(self.nodetype)        
00073         s.append(self.sccs)        
00074         if self.name:
00075             s.append(self.name)
00076         else:
00077             s.append("-")
00078         s.append(self.description)        
00079         return "\t".join(map(str,s)) + "\n"
00080 

def Bio.SCOP.Des.Record._process (   self,
  line 
) [private]
Parses DES records.
    
Records consist of 5 tab deliminated fields,
sunid, node type, sccs, node name, node description.

Definition at line 44 of file Des.py.

00044 
00045     def _process(self, line):
00046         """Parses DES records.
00047     
00048         Records consist of 5 tab deliminated fields,
00049         sunid, node type, sccs, node name, node description.
00050         """
00051         #For example ::
00052         #
00053         #21953   px      b.1.2.1 d1dan.1 1dan T:,U:91-106
00054         #48724   cl      b       -       All beta proteins
00055         #48725   cf      b.1     -       Immunoglobulin-like beta-sandwich
00056         #49265   sf      b.1.2   -       Fibronectin type III
00057         #49266   fa      b.1.2.1 -       Fibronectin type III
00058 
00059         line = line.rstrip()  # no trailing whitespace
00060         columns = line.split("\t")  # separate the tab-delineated cols
00061         if len(columns) != 5:
00062             raise ValueError("I don't understand the format of %s" % line)
00063         
00064         sunid, self.nodetype, self.sccs, self.name, self.description = columns
00065         if self.name=='-': self.name =''
00066         self.sunid = int(sunid)
00067 


Member Data Documentation

Definition at line 40 of file Des.py.

Definition at line 39 of file Des.py.

Definition at line 37 of file Des.py.

Definition at line 38 of file Des.py.

Definition at line 36 of file Des.py.


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