Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio::SCOP::Raf::SeqMap::_process (   self,
  line 
) [private]

Parses a RAF record into a SeqMap object.

Definition at line 198 of file Raf.py.

00198                             :
        """Parses a RAF record into a SeqMap object.
        """
        header_len = 38
 
        line = line.rstrip()  # no trailing whitespace        

        if len(line)<header_len: 
            raise ValueError("Incomplete header: "+line)

        self.pdbid = line[0:4]
        chainid = line[4:5]
        
        self.version = line[6:10]

        #Raf format versions 0.01 and 0.02 are identical for practical purposes
        if(self.version != "0.01" and  self.version !="0.02") :
            raise ValueError("Incompatible RAF version: "+self.version)

        self.pdb_datestamp = line[14:20]
        self.flags = line[21:27]

        for i in range(header_len, len(line), 7) :
            f = line[i : i+7]
            if len(f)!=7:
                raise ValueError("Corrupt Field: ("+f+")")
            r = Res()
            r.chainid = chainid
            r.resid =  f[0:5].strip()
            r.atom = normalize_letters(f[5:6])
            r.seqres = normalize_letters(f[6:7])

            self.res.append(r)


    def index(self, resid, chainid="_") :


Generated by  Doxygen 1.6.0   Back to index