program digrab(input,ii,xyin,xyplop,output); (* digrab: diagonal grabs of diana data Tom Schneider National Cancer Institute Laboratory of Mathematical Biology Frederick, Maryland 21701-1013 toms@ncifcrf.gov 1990 *) label 1; (* end of program *) const (* begin module version *) version = 1.04; (* of digrab.p 1990 August 10 origin 1990 July 20 *) (* end module version *) (* begin module describe.digrab *) (* name digrab: diagonal grabs of diana data synopsis digrab(input: in, ii: in, xyin: out, xyplop: out, output: out) files input: User defines the value of n. ii: output of the diana program, filtered for information lines only. xyin: input to the xyplo plotting program, extracted lines. xyplop: parameters controlling xyplo output: messages to the user description This program extracts lines that have the form (x,x+n) from the da output of diana. The result may be plotted with xyplo. examples documentation see also diana.p, xyplop.p author Thomas Dana Schneider bugs technical notes *) (* end module describe.digrab *) var ii: text; (* output of diana, filtered for lines with information only *) xyin: text; (* input to xyplo *) xyplop: text; (* paramters to control xyplo *) (* 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 copyaline *) procedure copyaline(var fin, fout: text); (* copy a line from file fin to file fout *) begin (* copyaline *) while not eoln(fin) do begin fout^ := fin^; put(fout); get(fin) end; readln(fin); writeln(fout); end; (* copyaline *) (* end module copyaline version = 'delmod 6.58 90 Jan 2 tds/gds' *) (* begin module makexyplop *) procedure makexyplop(var xyplop: text; distance: integer); (* make the xyplop file, with the given distance *) begin writeln(xyplop, '2 2 zerox zeroy graph coordinate center'); writeln(xyplop, 'x -50 50 zx min max (char, real, real) if zx=x then set xaxis'); writeln(xyplop, 'y 0 0.1 zy min max (char, real, real) if zy=y then set yaxis'); writeln(xyplop, '10 10 xinterval yinterval number of intervals on axes to plot'); writeln(xyplop, '4 6 xwidth ywidth width of numbers in characters'); writeln(xyplop, '0 2 xdecimal ydecimal number of decimal places'); writeln(xyplop, '5 5 xsize ysize size of axes in inches'); writeln(xyplop, 'position x in (x,x+',distance:1,')'); writeln(xyplop, 'bits'); writeln(xyplop, 'a zc c crosshairs, axXyYnN'); writeln(xyplop, 'n 2 zxl base if zxl=l then make x axis log to the given base'); writeln(xyplop, 'n 2 zyl base if zyl=l then make y axis log to the given base'); writeln(xyplop, ' ******************************************************************'); writeln(xyplop, '3 8 xcolumn ycolumn columns of xyin that determine plot location'); writeln(xyplop, '0 symbol column the xyin column to read symbols from'); writeln(xyplop, '0 0 xscolumn yscolumn columns of xyin that determine the symbol size'); writeln(xyplop, '0 0 0 hue saturation brightness columns for color manipulation'); writeln(xyplop, ' ******************************************************************'); writeln(xyplop, 'c symbol-to-plot c(circle)bd(dotted box)x+Ifgpr(rectangle)'); writeln(xyplop, '0 symbol-flag character in xyin'); writeln(xyplop, '0.05 symbol sizex side in inches on the x axis of the symbol.'); writeln(xyplop, '0.05 symbol sizey as for the x axis, get size from yscolumn'); writeln(xyplop, 'cl 0.05 connection'); writeln(xyplop, 'n 0.05 linetype size linetype l.-in and size of dashes or dots'); writeln(xyplop, ' ******************************************************************'); writeln(xyplop, '.'); writeln(xyplop, ' ******************************************************************'); end; (* end module makexyplop *) (* begin module digrab.themain *) procedure themain(var ii, xyin, xyplop: text); (* the main procedure of the program *) var a,b,c,d: char; (* first characters of each line *) distance: integer; (* diagonal identifier *) x,y: integer; (* coordinates *) begin writeln(output,'digrab ',version:4:2); writeln(output,'Give distance from the first base that you want', ' the second base:'); readln(input,distance); rewrite(xyin); writeln(xyin,'* digrab ',version:4:2); writeln(xyin,'* distance between positions x and y: ',distance:1); reset(ii); rewrite(xyplop); makexyplop(xyplop,distance); while ii^='*' do copyaline(ii,xyin); while not eof(ii) do begin (* pick up the first characters of the line *) read(ii,a,b,c,d); (* read the coordinates *) read(ii,x,y); if y = x+distance then begin write(xyin,a,b,c,d,' ',x:1,' ',y:1); while not eoln(ii) do begin read(ii,c); (* a character *) write(xyin,c); end; writeln(xyin); end; readln(ii); end end; (* end module digrab.themain *) begin themain(ii, xyin, xyplop); 1: end.