craigw@aecom.YU.EDU (Craig Werner) (06/29/88)
[Note: this part of the introduction is a general one for people who don't know PostScript. For those reading this article in comp.lang.postscript rather than sci.bio, I apologize.] .nf A Plasmid Description Language for PostScript Printers Version 0, Edition 13 Craig Werner This is a highly preliminary version of a program that allows one to specify publication quality maps in a text based format. When combined with the appropriate prologue and epilogue and printed out on a printer that supports the page description language PostScript (such as the Apple LaserWriter and the PSjet+), the graphic map is printed rather than the text description. General notes: Since this is based on the PostScript Language, and has not advanced sufficiently to shed many of the conventions of PostScript, I should explain some of those conventions. 1. PostScript uses a Post-Fix notation (presumably why it was named PostScript). If you use an HP calculator, you should feel right at home. Otherwise, it may seem odd. For instance, adding two numbers together is not 1 + 2, or 1 add 2, but rather 1 2 add. 2. PostScript uses a stack. Hence the order of arguments is important. (EcoRI) 450 REsite will print out a restriction site labeled EcoRI. 450 (EcoRI) REsite will do something bizarre and inexplicable. 3. PostScript uses a % to mark a comment. Anything on a line after a % character is not interpreted. 4. The four arithmetic operators are: add, sub, mul, and div, in case you need them. 5. Variables. When defined they need to be preceded by a slash (/), although they are used simply by name after that. And all definitions end with the word def. For example, if you want all Restriction sites in an insert in terms of itself, you can define a variable as the cloning site number and then add, i.e., /Site 450 def (BglII) Site 100 add REsite % "Site 100 add" treated as 1 number. (SspI) Site 350 add REsite This is also a way of adjusting all vector sites after an insert, rather than recalculating. The command /insert 2500 def followed by lines of the form (XmnI) 2294 insert add REsite instead of (XmnI) 4694 REsite 1750 insert add 2450 insert add arcSEGMENT %ampR instead of 3250 4950 arcSEGMENT %ampR means that you don't have to edit the whole vector for different inserts, jusr redefine the variable "insert." 6. Text I haven't had a chance to simplify this yet. You have to specify a font and a pointsize in an elaborate line. Just memorize the following two lines and insert them by rote: 8 POINTSIZE /Times-Roman SETFONT If you change the pointsize , you need to type in the entire second line as well. There are other fonts, but stick to Times-Roman for now. 7. Measurement. PostScript measures all distances in points, which is a typesetting unit. I have defined two conversion units: cm and inch. Thus you need not know that the center of a typical page is 306 points over and 396 points up. The center of an 8.5 by 11 page can be 4.25 inch and 5.5 inch. The measurement, by the way, is from the lower left corner. The page is the 1st quadrant of a graph (X and Y axis positive). Another conversion routine allows most distances to be defined in base pairs, although this varies depending on plasmid size. Now that I dealt with preliminaries, the rest of the description is of the PostScript procedures that form the plasmid description language. -- --------- Craig Werner (Lognames: werner, craigw) "This is no social crisis, just another tricky day for you."