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

def Bio::SCOP::Raf::SeqMapIndex::getSeqMap (   self,
  residues 
)

Get the sequence map for a collection of residues.

residues -- A Residues instance, or a string that can be converted into
    a Residues instance.

Definition at line 130 of file Raf.py.

00130                                   :
        """Get the sequence map for a collection of residues.

        residues -- A Residues instance, or a string that can be converted into
                    a Residues instance.
        """
        if type(residues) == StringType :
            residues = Residues(residues)

        pdbid  = residues.pdbid
        frags = residues.fragments
        if not frags: frags =(('_','',''),) # All residues of unnamed chain

        seqMap = None
        for frag in frags :
            chainid = frag[0]
            if chainid=='' or chainid=='-' or chainid==' ' or chainid=='_':
                chainid = '_'
            id = pdbid + chainid
            
            
            sm = self[id]
            
            #Cut out fragment of interest
            start = 0
            end = len(sm.res)
            if frag[1] : start = int(sm.index(frag[1], chainid))
            if frag[2] : end = int(sm.index(frag[2], chainid)+1)
            
            sm = sm[start:end]

            if seqMap == None :
                seqMap = sm
            else :
                seqMap += sm
                            
        return seqMap



class SeqMap :


Generated by  Doxygen 1.6.0   Back to index