Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def GetChainSequences(structure):	

	chainSeqs = {}
	for chain in structure.chains.keys():
		sequence = ""
		data = structure.chains[chain]
		data = [el for el in data if el.find('ALT') is -1]
		data = sorted(data, 
			cmp=lambda x,y: cmp(Utilities.ParseResidueCode(x)[1], Utilities.ParseResidueCode(y)[1]))
		for res in data:
			sequence = sequence + Utilities.aminoAcidCodes[structure.resname(res)]
		chainSeqs[chain] = sequence	

	return chainSeqs
        


src/p/e/PEATDB-2.3/PEATDB/Actions.py   PEATDB(Download)
                mutationSet = Core.Data.MutationSet(rec.Mutations)
                Xref.Remove_All_NonAminoAcids()
                refaa = Core.Data.GetChainSequences(Xref)['A']
                #print refaa
                mutseq = mutationSet.applyToSequence(refaa, id='A', offset=None, pdb=Xref)