program dnamwt(input, report, output); (* dnamwt: calculate the molecular weight of a DNA molecule Paul N. Hengen and Tom Schneider National Cancer Institute Laboratory of Mathematical Biology NCI/FCRDC Bldg 469. Room 144 P.O. Box B Frederick, MD 21702-1201 (301) 846-5581 (-5532 for messages) e-mail: pnh@ncifcrf.gov and toms@ncifcrf.gov *) label 1; (* end of program *) const (* begin module version *) version = 1.08; (* of dnamwt.p 1995 July 20 origin 1995 July 14 *) (* end module version *) (* begin module describe.dnamwt *) (* name dnamwt: calculate the molecular weight of a DNA molecule synopsis dnamwt(input: in, report: out, output: out) files input: user input report: output file with calculated weight output: output file with calculated weight description This program is used to calculate the molecular weight of DNA examples The molecular weights of the monophosporylated nucleotides are: A = 331.2 C = 307.2 G = 347.2 T = 322.2 When polymerized, each nucleotide will lose a water molecule of 18.0, and not considering methylation of any bases, the molecular weight of each will be; A = 313.2 C = 289.2 G = 329.2 T = 304.2 But, we'll have to add back two hydroxide ions, one for each strand polymerized, which is 17.0 x 2 = 34.0 PLUS 2.0 for the two extra hydrogen ions subtracted earlier. If you only know the sequence of one strand, and want to know the molecular weight of the entire double-stranded DNA: MW of strand1 = #A(313.2) + #C(289.2) + #G(329.2) + #T(304.2) + 18.0 PLUS MW of strand2 = #A(304.2) + #C(329.2) + #G(289.2) + #T(313.2) + 18.0 Therefore the overall MW is #A(313.2 + 304.2) + #C(289.2 + 329.2) + #G(329.2 + 289.2) + #T(304.2 + 313.2) + 36.0 --------------------------------------- OR #A(617.4) + #C(618.4) + #G(618.4) + #T(617.4) + 36.0 OR 617.4(#T + #A) + 618.4(#C + #G) + 36.0 OR If you know the %GC of the single stranded sequence, MW in daltons for the double stranded DNA would be = (%GC * total length) (100-%GC * total length) -------------------- (618.4) + ------------------------ (617.4) + 36.0 100 100 documentation Other sources of information or documents on the program. see also author Paul N. Hengen and Thomas Dana Schneider bugs technical notes *) (* end module describe.dnamwt *) (* begin module dnamwt.const *) (* molecular weights of all the deoxynucleotides with a single phosphate and H2O removed *) awt = 313.2; cwt = 289.2; gwt = 329.2; twt = 304.2; (* end module dnamwt.const *) var report: text; (* file used by this program *) (* begin module halt *) procedure halt; (* stop the program. the procedure performs a goto to the end of the program. you must have a label: label 1; declared, and also the end of the program must have this label: 1: end. examples are in the module libraries. this is the only goto in the delila system. *) begin writeln(output,' program halt.'); goto 1 end; (* end module halt version = 'delmod 6.16 84 mar 12 tds/gds'; *) (* begin module dnamwt.themain *) procedure themain(var report: text); (* the main procedure of the program *) var ano: integer; (* number of a's in the sequence *) cno: integer; (* number of c's in the sequence *) gno: integer; (* number of g's in the sequence *) tno: integer; (* number of t's in the sequence *) total: integer; (* total number of bases in the sequence *) c: char; (* a character *) strand1: real; (* strand 1 molecular weight *) strand2: real; (* strand 2 molecular weight *) procedure getbase(var report: text; xchar: char; var xno: integer); (* get the number of base x and write it to the report file *) begin write(output,'number of ',xchar,'''s in strand 1 of the sequence: '); readln(input, xno); writeln(report,'the number of ',xchar, '''s in strand 1 of the sequence is: ',xno:1); end; begin writeln(output,'dnamwt ',version:4:2); rewrite(report); writeln(report,'dnamwt ',version:4:2); getbase(report,'A',ano); getbase(report,'C',cno); getbase(report,'G',gno); getbase(report,'T',tno); strand1 := ano*awt + cno*cwt + gno*gwt + tno*twt + 18.0; strand2 := ano*twt + cno*gwt + gno*cwt + tno*awt + 18.0; total := ano + cno + gno + tno; writeln(report,'total number of bases: ',total); writeln(report,'strand 1 molecular weight: ',strand1:4:1,' daltons'); writeln(report,'strand 2 molecular weight: ',strand2:4:1,' daltons'); writeln(report,'total molecular weight: ',(strand1+strand2):4:1,' daltons'); writeln(report,'% GC: ',(100*(gno+cno)/(ano+cno+gno+tno)):4:1); (* show the report *) writeln(output); reset(report); while not eof(report) do begin while not eoln(report) do begin read(report, c); write(output, c); end; readln(report); writeln(output); end; end; (* end module dnamwt.themain *) begin themain(report); 1: end.