PEATDB/DNA_sequence.py
def align_withseq(self,sequence):
        """Extract the sequence of the current molecule and align it with the sequence given.
        Return an array giving the relation between the sequence position and the PDB residue ID"""
        pdbpir=self.clean_seq(self.PirSeq(),remove_gaps=True)
        sequence=self.clean_seq(sequence,remove_gaps=True)
        import sequence_alignment
        NW=sequence_alignment.NW(pdbpir,sequence)
        al1,al2,map1,map2=NW.Align(verbose=True)
        map=[]
        residues=self.residues.keys()
        residues.sort()
        count=0
        #
        for count in range(len(sequence)):
            pdbrespos=map2[count]
            if pdbrespos!='-':
                map.append(residues[map2[count]])
            else:
                map.append(None)
        #
        # Check that we have 100% sequence identify for the aligned residues
        #
        print 'Aligned seqid',NW.aligned_seqid
        return map,NW.aligned_seqid
Extract the sequence of the current molecule and align it with the sequence given.
        Return an array giving the relation between the sequence position and the PDB residue ID
Extract the sequence of the current molecule and align it with the sequence given.
Return an array giving the relation between the sequence position and the PDB residue ID
Extract the sequence of the current molecule and align it with the sequence given . Return an array giving the relation between the sequence position and the PDB residue ID
def align_withseq(self,sequence):
        pdbpir=self.clean_seq(self.PirSeq(),remove_gaps=True)
        sequence=self.clean_seq(sequence,remove_gaps=True)
        import sequence_alignment
        NW=sequence_alignment.NW(pdbpir,sequence)
        al1,al2,map1,map2=NW.Align(verbose=True)
        map=[]
        residues=self.residues.keys()
        residues.sort()
        count=0
        for count in range(len(sequence)):
            pdbrespos=map2[count]
            if pdbrespos!='-':
                map.append(residues[map2[count]])
            else:
                map.append(None)
         Check that we have 100% sequence identify for the aligned residues
        print 'Aligned seqid',NW.aligned_seqid
        return map,NW.aligned_seqid
def align_withseq ( self , sequence ) : pdbpir = self . clean_seq ( self . PirSeq ( ) , remove_gaps = True ) sequence = self . clean_seq ( sequence , remove_gaps = True ) import sequence_alignment NW = sequence_alignment . NW ( pdbpir , sequence ) al1 , al2 , map1 , map2 = NW . Align ( verbose = True ) map = [ ] residues = self . residues . keys ( ) residues . sort ( ) count = 0 for count in range ( len ( sequence ) ) : pdbrespos = map2 [ count ] if pdbrespos != '-' : map . append ( residues [ map2 [ count ] ] ) else : map . append ( None ) print 'Aligned seqid' , NW . aligned_seqid return map , NW . aligned_seqid
Extract the sequence of the current molecule and align it with the sequence given.
Extract the sequence of the current molecule and align it with the sequence given .
"""Extract the sequence of the current molecule and align it with the sequence given.
        Return an array giving the relation between the sequence position and the PDB residue ID""" # # # Check that we have 100% sequence identify for the aligned residues #
self
sequence