mw = 0
n=0 # number of amino acid in each protein
Total=0 # total molecular weight after elimination of one molecule of water
for y,z in proteins[i].items():
n+=z
mw += ((weights[y]*z))
Total=(mw-(18.015*(n-1)))
for sequence in SeqIO.parse("H:\\yeast.fasta","fasta"):
analysed_seq = ProteinAnalysis(str(sequence.seq))
print(sequence.id, sequence.seq, 'Mw : ', analysed_seq.molecular_weight())
First code gave me result 6760.
Second code gave me 7560.
What may be the difference for?