home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / pedraw14.zip / PEDRAW.DOC < prev    next >
Text File  |  1992-07-29  |  47KB  |  1,117 lines

  1.  
  2.  
  3.  
  4.  
  5.                                 PEDRAW.DOC v1.4 
  6.         
  7.         PEDRAW is a program which draws out family trees in either text
  8.         or graphics mode. It is designed to be used to help with
  9.         genetics research, especially linkage analysis using the LINKAGE
  10.         and LINKSYS packages.
  11.  
  12.  
  13.         * OVERVIEW
  14.  
  15.         Data about the structure of the pedigree and about the
  16.         individuals within it is read in from a data file which can have
  17.         one of a variety of formats. One individual is selected and his
  18.         relatives are displayed either diagramatically using shaded
  19.         symbols or else as paragraphs of text linked by the IBM box
  20.         character set. The pedigree is saved to disk in either Microsoft
  21.         Paint Format or as a text file.
  22.  
  23.  
  24.         * SPECIFICATIONS
  25.  
  26.         Needs a PC, DOS 2.0 or higher, 350K of RAM, any graphics monitor
  27.         type. To do graphics pedigrees of a reasonable size you'll need
  28.         a hard disk with some free space on it. To print out graphics
  29.         you need an Epson or IBM compatible dot matrix printer, or a
  30.         PostScript or HP-compatible laser printer, or you need Microsoft
  31.         Windows or some other program that can read Microsoft Paint
  32.         (MSP) files so you can use its printer drivers. The number of
  33.         individuals displayed is limited by the amount of available
  34.         memory. Multiple marriages and in-breeding can be accommodated
  35.         to a reasonable extent, though may require some trial and error
  36.         to produce the best result.
  37.  
  38.  
  39.         * PROGRAM MENU FUNCTIONS
  40.  
  41.         Options are selected using the Up and Down arrow keys, followed
  42.         by Enter (CR). Jump straight to an option by pressing the key
  43.         corresponding to the first letter of the option's name. The Esc
  44.         key generally quits a menu to the one at a higher level.
  45.  
  46.         * Load pedigree file
  47.  
  48.         Loads a file in from disk. File must be of acceptable format
  49.         (see section on "Data files"). If the file has extension .DAT,
  50.         .SDF, .PED or .PPD then the appropriate format is assumed,
  51.         otherwise the user must specify the format.
  52.  
  53.         * Edit a file
  54.  
  55.         A simple text editor is supplied enabling the user to read or
  56.         edit a file on disk or create a new file. The F1 provides help
  57.         listing the functions available and the Esc key quits the editor
  58.         so that the file can be saved to disk. This editor can be used
  59.         to edit data files if desired.
  60.  
  61.         
  62.                                        1 
  63.  
  64.  
  65.  
  66.  
  67.                                 PEDRAW.DOC v1.4 
  68.         
  69.         * Save pedigree file
  70.  
  71.         The pedigree data in memory is saved to disk. You are advised to
  72.         give the file the extension .DAT so that it will be correctly
  73.         recognised when it is subsequently loaded by PEDRAW.
  74.  
  75.         * Adjust pedigree
  76.  
  77.         Use this option to alter current pedigree data or create new
  78.         data (by adding members). Every individual must have a unique
  79.         ID, and the structure of the pedigree is determined by
  80.         specifying the ID's of parents where relevant. Only the last
  81.         three digits of the ID will be displayed in the pedigree
  82.         diagram, and the rest of the ID may refer e.g. to family number.
  83.         The shading is determined by the diagnosis code: 1 for filled
  84.         in, 2 for half-filled and other numbers up to 19 for patterned
  85.         shading. The first few values from 20 produce special symbols
  86.         (20 produces the little filled circle usually used to indicate
  87.         carrier status). Values from 30 up give a variety of half- and
  88.         quarter-shaded symbols, and values from 40 up produce the
  89.         "negative image" of these. If 100 is added to the shading code
  90.         the individual is marked as dead. When adding or editing a
  91.         member, press F10 when the information is complete, or Esc to
  92.         cancel the operation. Promoting and demoting members moves them
  93.         to the start or end of the list of pedigree members, controlling
  94.         the way the pedigree will be displayed (for further information
  95.         see the section explaining the algorithm used).
  96.  
  97.         * Configure settings
  98.  
  99.         This option is used to adjust the way the pedigree is drawn. The
  100.         current configuration can be saved to disk, or a previously
  101.         saved configuration can be loaded. If a configuration is saved
  102.         to the file PEDRAW.CFG in the current working directory, then
  103.         that configuration will be automatically loaded the next time
  104.         PEDRAW is run from that directory.
  105.  
  106.         When the option to change the configuration is selected, any of
  107.         the command line flags can be entered if desired (see section on
  108.         "Flags"), but unless the program is being run in batch mode it
  109.         is best just to press Enter to edit the options individually.
  110.  
  111.         If "Graphic display" is set to N a text file will be created
  112.         with extension .TRE. The default is instead to produce a
  113.         graphical display of the pedigree structure.
  114.  
  115.         If "Conceal sex" is set to Y then all individuals will be
  116.         displayed as diamonds. This is to improve confidentiality when
  117.         pedigrees are published.
  118.  
  119.         If "Conceal diagnosis" is set to Y then no individuals will be
  120.         shaded. This is to maintain blindness among other members of the
  121.         research team, e.g. laboratory workers assigning genotype.
  122.  
  123.         
  124.                                        2 
  125.  
  126.  
  127.  
  128.  
  129.                                 PEDRAW.DOC v1.4 
  130.         
  131.         If "Codes for Epson printer" is set to Y then at the start of a
  132.         text file (TRE file) the codes to make an Epson printer output
  133.         the IBM box character set correctly are added (otherwise you
  134.         would get italics, etc.). This has no effect on ordinary
  135.         graphics (MSP) files.
  136.  
  137.         If "File name for saved diagram" is left blank then a default
  138.         filename will be used, consisting of the ID of the individual of
  139.         used as the pedigree ancestor with the extension .MSP for
  140.         graphics files or .TRE for text files. So the pedigree diagram
  141.         produced by selecting individual 12099 as the ancestor would be
  142.         saved to file 12099.MSP. If the filename is set to 0 then the
  143.         diagram will not be saved to disk, only displayed on screen.
  144.         Otherwise any filename can be specified and the diagram will be
  145.         saved with that name.
  146.  
  147.         The "Title" can be set to say anything. It will be printed out
  148.         under the pedigree diagram.
  149.  
  150.         The "Numbers of lines to show" refers to which lines are to be
  151.         displayed. The default is the first 5. Line 1 is the ID line,
  152.         and then lines 2 to 11 are the optional text lines. The line
  153.         numbers are entered separated by commas. To display the ID, if
  154.         the ID contains a hyphen it is assumed that the LINKSYS format
  155.         is used so that members have ID's such as 1-2, 2-3, etc.
  156.         Therefore the first digit before the hyphen and all subsequent
  157.         characters are displayed. If there is no hyphen in the ID code,
  158.         it is assumed that the last 3 digits of the ID refer to the code
  159.         of an individual within a family, and that the earlier
  160.         characters may refer to the family code. Accordingly only the
  161.         last 3 digits are displayed (and leading zeroes are removed).
  162.         With the text lines, the number of characters displayed depends
  163.         on the width of the symbols and of the gap between symbols.
  164.  
  165.         The symbol and gap height and width in pixels can be set. The
  166.         minimum values for these are 4 and the maximum depends on the
  167.         screen type. The sum of the symbol width and gap width must be a
  168.         multiple of eight. The extra line height refers to the vertical
  169.         space taken up by extra lines which are created either  when
  170.         multiple marriages occur or when a line is drawn through the
  171.         pedigree when an intermarriage has occurred. The tip is that if
  172.         you want to leave room for more characters of text lines to be
  173.         displayed, the best thing to do is to increase the width of the
  174.         gap between symbols but leave other dimensions unchanged.
  175.  
  176.         It is possible to limit the number of generations to be printed,
  177.         perhaps if you have trouble fitting them on paper.
  178.  
  179.         The "Show all members" option is quite important. If it is set
  180.         to N (the default) then when a pedigree is drawn and an ancestor
  181.         is selected, only his descendants and their spouses (and their
  182.         spouses' descendants and their spouses' spouses) are displayed.
  183.         If the "Show all members" option is set to Y then the program
  184.         looks for the oldest ancestor of each person marrying in to the
  185.         
  186.                                        3 
  187.  
  188.  
  189.  
  190.  
  191.                                 PEDRAW.DOC v1.4 
  192.         
  193.         pedigree and shows all their descendants as well. In addition
  194.         the original ancestor used is not the person selected by the
  195.         user but that person's oldest ancestor, so this option can be
  196.         useful if you have forgotten the pedigree structure and want to
  197.         have the ancestor selected automatically. See the section
  198.         explaining the algorithm used for fuller details of how the
  199.         program behaves.
  200.  
  201.         The "Invisible" option allows the program to run invisibly - no
  202.         pedigree will be drawn on screen, although the relevant pedigree
  203.         diagram will still be created and will be saved on disk. The
  204.         purpose of this is so that the program can be run (e.g. from a
  205.         batch file) in background of a multitasking system such as
  206.         DESQview without having to switch the display in and out of
  207.         graphics mode.
  208.  
  209.         The maximum number of rows (generations) and columns in the
  210.         pedigree diagram can be altered from the default values, though
  211.         the numbers that can in practice be used are limited by the
  212.         available memory.
  213.  
  214.         * Display pedigree
  215.  
  216.         Once the pedigree structure has been set up this option enables
  217.         you to display it on screen and save the diagram to disk. Just
  218.         select the individual whose descendants are to be drawn.
  219.  
  220.         * Make key
  221.  
  222.         Produce a simple key for the pedigree diagram indicating the
  223.         scheme used for shading symbols. The file giving this
  224.         information must already exist on disk (it can be created with
  225.         the "Edit a file option"). The format of the file is that there
  226.         is one optional title line for the key, followed by up to ten
  227.         lines each beginning with a number followed by an explanation of
  228.         the diagnosis this represents, e.g.:
  229.  
  230.         Key for manic depressive pedigree
  231.         1 Bipolar disorder
  232.         2 Unipolar depression
  233.         0 Unaffected
  234.         100 Deceased
  235.  
  236.         A male symbol shaded appropriately will be drawn followed by the
  237.         text given.
  238.  
  239.         You will also be prompted for the name of the file to save the
  240.         key to, and this should have the extension MSP, e.g. KEY.MSP.
  241.         Alternatively entering 0 for the filename will prevent the key
  242.         being saved to disk.
  243.  
  244.         * Use DOS
  245.  
  246.         Enter any DOS commands, e.g. to copy, rename or delete files, or
  247.         
  248.                                        4 
  249.  
  250.  
  251.  
  252.  
  253.                                 PEDRAW.DOC v1.4 
  254.         
  255.         run another program if there is enough memory left.
  256.  
  257.         * Quit program
  258.  
  259.         Quit program. Beware, all unsaved data will be lost!
  260.  
  261.  
  262.         * FLAGS
  263.  
  264.         These can either be entered on the command line, when the
  265.         program is first run, or when the "Configure settings" option is
  266.         chosen, or in batch mode instead of an ID. All flags may be
  267.         upper or lower case. To use flags on the command line enter:
  268.  
  269.         PEDRAW /FLAG1 /FLAG2 etc.
  270.  
  271.         or:
  272.  
  273.         PEDRAW datafile.dat /FLAG1 /FLAG2 etc.
  274.  
  275.         The section on the "Configure settings" option clarifies the
  276.         effects of some of the flags.
  277.  
  278.  
  279.         /P or /P1  - draw Pictures, enter graphics mode.
  280.  
  281.         /P0        - leave graphics mode, display text.
  282.  
  283.         /E or /E1  - send a code to the text file which instructs Epson-
  284.                      compatible printers to print the graphics character
  285.                      set correctly - this is the default.
  286.  
  287.         /E0        - do not insert special characters into text file, to
  288.                      allow output to e.g. IBM compatible printers and
  289.                      some word processors.
  290.  
  291.         /Gx        - print only first x generations, default is 6.
  292.  
  293.         /Lx        - determines whether or not a line from an
  294.                      individual's entry is displayed; the default is to
  295.                      just display the last three digits of an
  296.                      individual's ID number (line 1 displayed) and the
  297.                      first four text lines but up eleven lines can be
  298.                      displayed. To turn, for example, line 6 on enter
  299.                      /L6. To turn a line off again the negative number
  300.                      is used, e.g. /L-2. x = 1 to 11 or -1 to -11.
  301.  
  302.         /Ttitle    - set the title to the words following /T, until the
  303.                      next / is encountered. This will not work for more
  304.                      than one word if the switch is used on the command
  305.                      line.
  306.  
  307.         /Ffile     - sets the filename to save the pedigree diagram to.
  308.                      /F0 means don't save it. /F means use default name.
  309.         
  310.                                        5 
  311.  
  312.  
  313.  
  314.  
  315.                                 PEDRAW.DOC v1.4 
  316.         
  317.         /A         - attempts to display all relatives; when an ancestor
  318.                      is entered the program seeks to find his oldest
  319.                      ancestor; when all that ancestor's descendants have
  320.                      been displayed the family trees of everybody
  321.                      marrying into the pedigree are then mapped out, and
  322.                      so on.
  323.  
  324.         /B or /B1  - blanks out diagnoses, all symbols are left
  325.                      unshaded.
  326.  
  327.         /B0        - shades symbols according to coding.
  328.  
  329.         /U or /U1  - unsexes individuals so that all symbols are
  330.                      displayed as diamonds regardless of gender.
  331.  
  332.         /U0        - displays males as squares, females as circles.
  333.  
  334.         /M         - use menus, quit batch mode.
  335.  
  336.         /Cx        - set maximum number of columns in the pedigree
  337.                      diagram to x. Default is 200.
  338.  
  339.         /Rx        - set maximum number of rows (generations) in the
  340.                      pedigree diagram to x (though number actually
  341.                      displayed can be limited by /G). Default is 8.
  342.  
  343.         /SWx       - Set symbol width in pixels to x. Default is 24.
  344.  
  345.         /GWx       - Set width of gap between symbols in pixels to x.
  346.                      Note that the width of the symbol plus the width of
  347.                      the gap must sum to a multiple of 8. Default is 16.
  348.  
  349.         /SHx       - Set symbol height in pixels to x. Default is 24.
  350.  
  351.         /GHx       - Set height of gap between symbols in pixels to x.
  352.                      Default is 16.
  353.  
  354.         /Hx        - Set height of extra lines (for second marriages,
  355.                      etc. ) in pixels to x. Default is 12.
  356.  
  357.         /I or /I1  - Run the program "invisibly", without drawing the
  358.                      diagram on screen, just save it to an MSP file.
  359.  
  360.         /I0        - Resume normal mode, displaying diagrams on screen.
  361.  
  362.  
  363.         * DATA FILES
  364.  
  365.         PEDRAW accepts pedigree data arranged in one of four formats: as
  366.         a PEDRAW data file, as a LINKSYS SDF file, or as a LINKAGE PED
  367.         file either before or after passing through MAKEPED. PEDRAW
  368.         determines the format of the file by its extension. If the
  369.         filename ends .DAT then it is assumed to be in PEDRAW format. If
  370.         it ends .SDF it is assumed to be in LINKSYS SDF format (produced
  371.         
  372.                                        6 
  373.  
  374.  
  375.  
  376.  
  377.                                 PEDRAW.DOC v1.4 
  378.         
  379.         by using the "Export" option of LINKSYS). If it has the
  380.         extension .PED it is assumed to be a LINKAGE pedigree data file
  381.         before MAKEPED has been run on it (i.e. without sibling
  382.         pointers), and if it has the extension .PPD then it is assumed
  383.         to be a LINKAGE pedigree file output from MAKEPED. If the data
  384.         file has none of these extensions then the program will ask
  385.         which format the file is in. Note that there is no way to
  386.         override the default interpretation. That is if you have a
  387.         LINKAGE file called PEDATAIN.DAT, PEDRAW will misread the file
  388.         and report an error. The file would have to be renamed e.g. to
  389.         PEDATAIN.PPD before PEDRAW could use it.
  390.  
  391.         * PEDRAW data file format
  392.  
  393.         This is the format in which PEDRAW itself saves files. The file
  394.         should be saved with the extension .DAT. This format will be
  395.         created automatically when pedigree data is saved using the
  396.         "Save pedigree file" option. The file is a plain text file which
  397.         can be created by a word processor or the text editor supplied
  398.         with PEDRAW (selected by the "Edit a file" option), or if
  399.         pedigree information is kept in a database a report can be set
  400.         up to export information in the correct format.
  401.  
  402.         Each individual needs at least 13 lines. The first line contains
  403.         the ID. The second line is the gender (M, F or X) and an
  404.         optional diagnosis code which is a number from 0 to 99 to
  405.         indicate how the symbol will be shaded (currently only some
  406.         numbers produce shades, the highest at present being 46). If 100
  407.         is added to this number the individual is marked as dead. The
  408.         diagnosis code is separated from the gender by a comma. The next
  409.         line optionally contains the ID's of the father then mother,
  410.         separated by a comma. The next ten lines can contain any text.
  411.         The maximum length of a an ID or text line is 20 characters.
  412.         Example:
  413.  
  414.         12032
  415.         F,4
  416.         12048,12060
  417.         Miss Linda Smith
  418.         Schizophrenic
  419.         AB
  420.         pos
  421.         wx
  422.         Rr
  423.              ... four more lines, some can be blank.
  424.  
  425.         Note that there is no obligation to keep separate pedigrees in
  426.         separate files. Information about several pedigrees can be
  427.         stored in the same data file, provided each individual has a
  428.         unique ID.
  429.  
  430.         A diagnosis code of 1 shades solid, 2 is half-filled and the
  431.         other numbers produce different patterns. Males are squares,
  432.         females circles and unknowns (X) diamonds.
  433.         
  434.                                        7 
  435.  
  436.  
  437.  
  438.  
  439.                                 PEDRAW.DOC v1.4 
  440.         
  441.         * Other data formats
  442.  
  443.         These are only worth using if you are actually using the LINKSYS
  444.         and/or LINKAGE programs, so the format of the files will not be
  445.         described. Files can only be read in from these formats, not
  446.         saved (though the data input can then be saved in PEDRAW
  447.         format).
  448.  
  449.         The SDF format is created from LINKSYS by using the "Export"
  450.         option. If PEDRAW reads such a file in it treats it in the
  451.         following way:
  452.  
  453.         1. A new ID is created by concatenating the individual's family
  454.         name with the LINKSYS ID to create a new unique name (meaning
  455.         that information about several different pedigrees can be
  456.         contained in the one SDF file). So individual 2-5 from pedigree
  457.         F9 becomes F92-5.
  458.  
  459.         2. Each of the (up to) ten phenotype codes is read into the ten
  460.         text lines.
  461.  
  462.         3. In a somewhat feeble attempt to guess diagnosis the program
  463.         assumes that the first phenotype code refers to affection
  464.         status. If it begins with a "2" or contains a "-2" (e.g. if the
  465.         phenotype code is "1-2") then the PEDRAW diagnosis code is set
  466.         to 1 (for solid shading). Otherwise it is set to 0. If this does
  467.         not end up right the diagnosis codes can be adjusted
  468.         subsequently by hand using the "Adjust pedigree" option.
  469.  
  470.         LINKAGE pedigree files can be read in directly (handy for
  471.         checking coding). There must be at least two spaces between
  472.         locus codes, and only single spaces between the symbols within a
  473.         locus code, i.e. PEDRAW expects to find codes such as:
  474.  
  475.         2  1 1 1  0 1 0  1 1
  476.  
  477.         PEDRAW expects to find a file with extension .PED to be in a
  478.         format suitable to be read by MAKEPED, and with .PPD if the file
  479.         has been output by MAKEPED. This clashes with the convention
  480.         suggested in the most recent LINKAGE documentation of having the
  481.         former with an extension .DAT and the latter with an extension
  482.         .PED. The PEDRAW convention is the one used by LINKSYS and files
  483.         may have to be renamed accordingly.
  484.  
  485.         LINKAGE files are treated as follows:
  486.  
  487.         1. A unique ID number is constructed by multiplying the pedigree
  488.         number by 1000 and adding the individual number, so that
  489.         individual 2 from pedigree 3 gets an ID of 3002.
  490.  
  491.         2. Each of the locus codes is read into a text line. Single
  492.         spaces within locus codes are removed, so that 0 1 1 becomes
  493.         011.
  494.  
  495.         
  496.                                        8 
  497.  
  498.  
  499.  
  500.  
  501.                                 PEDRAW.DOC v1.4 
  502.         
  503.         3. As for LINKSYS files, PEDRAW attempts to guess the diagnosis
  504.         code by assuming that the first locus code is affection status.
  505.         If the first digit of the first locus code is 2 the diagnosis
  506.         code is set to 1 (for solid shading), otherwise it is set to 0.
  507.  
  508.  
  509.         * USING PEDRAW IN BATCH MODE
  510.  
  511.         Usually PEDRAW is operated interactively from menus. It is also
  512.         possible to run PEDRAW in batch mode so that it takes all its
  513.         entry from standard input, meaning that input can be redirected
  514.         into PEDRAW using DOS commands. The way to start PEDRAW in batch
  515.         mode is to give the name of a data file on the command line
  516.         e.g.:
  517.  
  518.         PEDRAW EXPED.DAT
  519.  
  520.         The data file must exist and must have the extension .DAT or
  521.         .SDF or .PED or .PPD so that PEDRAW knows what format to expect.
  522.         PEDRAW then moves directly to the "Display pedigree" option and
  523.         awaits the input of the ID of an individual whose descendants
  524.         are to be displayed. However in batch mode it is possible
  525.         instead to enter flags at this point. PEDRAW carries on reading
  526.         commands from standard input until either there is an error, or
  527.         until the end of the input file is reached, or until an 'X' is
  528.         input or until the /M flag is selected. If the end of file is
  529.         reached or an 'X' is input the program exits, otherwise it just
  530.         reverts back to ordinary menu-driven operation. To use PEDRAW
  531.         with redirected input one might run it like so:
  532.  
  533.         PEDRAW EXPED.DAT < INPUT.JF
  534.  
  535.         Here INPUT.JF would contain a list of ID's and flags as follows:
  536.  
  537.         12880
  538.         13990
  539.         /l-2 /l-3 /f1out.msp /tRelatives of number 14001 /a
  540.         14001
  541.         x
  542.  
  543.         This would display the descendants of 12880 and 13990, saving
  544.         the diagrams to 12880.MSP and 13990.MSP, then would draw a
  545.         diagram of all the relatives of 14001 and save it in the file
  546.         1OUT.MSP with an appropriate title. The x at the end is not
  547.         strictly necessary but marks the end of file and quits PEDRAW.
  548.  
  549.         Note that in batch mode the normal editing keys do not work
  550.         (cursor keys, control-left-arrow, etc.). The pedigree diagram is
  551.         not displayed for long on screen, just drawn and then saved to
  552.         disk.
  553.  
  554.         You may wish to run the program "invisibly" in batch mode,
  555.         particularly in a multitasking environment such as DESQview. The
  556.         pedigree diagram will not be displayed on the screen, just saved
  557.         
  558.                                        9 
  559.  
  560.  
  561.  
  562.  
  563.                                 PEDRAW.DOC v1.4 
  564.         
  565.         to disk. The advantage is that the monitor is never switched
  566.         into graphics mode, an operation which can sometimes cause
  567.         problems with some multitaskers.
  568.  
  569.  
  570.         * SETTING THE GRAPHICS DISPLAY
  571.  
  572.         If the program won't display graphics and prints the message
  573.         "fg_init() failed" then you will have to set an environment
  574.         variable to the name of your display type. To do this, before
  575.         you run PEDRAW type the following line:
  576.  
  577.         SET FG_DISPLAY=xxxx
  578.  
  579.         except instead of xxxx type one of the following:
  580.  
  581.         HERC
  582.         CGAHIRES
  583.         EGAECD
  584.         VGA11
  585.         VGA12
  586.         EGAMONO
  587.         EGACOLOR
  588.         TOSHIBA
  589.         8514A
  590.  
  591.         Which one you type depends on the kind of display you have which
  592.         you will have to determine from reading your computer manual or
  593.         by asking your supplier. So if you have a Hercules-compatible
  594.         display you would type:
  595.  
  596.         SET FG_DISPLAY=HERC
  597.  
  598.         and if you had a CGA display you would type:
  599.  
  600.         SET FG_DISPLAY=CGAHIRES
  601.  
  602.         and so on. You may want to put this line in your AUTOEXEC.BAT
  603.         file.
  604.  
  605.  
  606.         * PRINTING OUT PEDIGREES
  607.  
  608.         Text pedigrees can be read into a word processor and printed out
  609.         from there, or can be printed directly to an Epson or IBM
  610.         compatible printer with the following command:
  611.  
  612.         COPY filename.tre PRN
  613.  
  614.         Graphics pedigrees can be input into Microsoft Paint, edited if
  615.         necessary, and then output to a printer. New versions of Paint
  616.         no longer work correctly with large diagrams. Other programs
  617.         designed to work with Microsoft Paint files can also be used,
  618.         for example WordPerfect 5 works well (at least for small
  619.         
  620.                                        10 
  621.  
  622.  
  623.  
  624.  
  625.                                 PEDRAW.DOC v1.4 
  626.         
  627.         pedigrees) and can be used to incorporate pedigree diagrams into
  628.         text.
  629.  
  630.         To print out pedigrees without using Microsoft Windows the
  631.         program PRMSP.EXE can be used to print MSP files to an Epson or
  632.         IBM compatible dot-matrix printer or a laser printer:
  633.  
  634.         PRMSP filename.msp
  635.  
  636.         The full details of the options available with PRMSP are as
  637.         follows:
  638.  
  639.         Format: PRMSP infile.msp [outfile.prn] [/flag1 /flag2 etc.]
  640.  
  641.         infile.msp - the name of the saved MSP file to be printed out.
  642.  
  643.         outfile.prn - the name of a file to be printed to. This is
  644.         optional and if no name is given then the printer (PRN) will be
  645.         used instead.
  646.  
  647.         /I - this flag means print to an IBM-compatible printer instead
  648.         of an Epson-compatible printer.
  649.  
  650.         /P - this flag means print the pedigree with the paper in
  651.         "portrait" orientation - across the page - instead of the
  652.         default "landscape" orientation - down the page. Note that in
  653.         earlier versions of PRMSP this had the opposite effect because
  654.         it was taken to refer to the orientation of the diagram rather
  655.         than the paper.
  656.  
  657.         /H - high density - will work only with Epson-compatible 24-pin
  658.         printer to give a picture three times smaller than above, or
  659.         twice as small on a Hewlett-Packard compatible laser printer.
  660.  
  661.         /D - draught mode - should be quicker but lower quality for dot
  662.         matrix printers in high density mode or "portrait" orientation.
  663.         On Hewlett-Packard compatible laser printers prints out double
  664.         normal size.
  665.  
  666.         /Snumber - this flag means print "number" spaces before each
  667.         line of the picture - use it to control where the diagram appears
  668.         on the page. The default is 6. (Only for dot matrix printers.)
  669.  
  670.         /Lnumber - this flag controls the line spacing on the printer,
  671.         as used by the ESC A command. By default "number" is set to 8,
  672.         but if the lines of your diagram come out separated or
  673.         overlapping, then using this flag may help you to adjust the
  674.         line-spacing to produce a better picture. (Only for dot matrix
  675.         printers.)
  676.  
  677.         /Fnumber - this flag lets you determine whether a line feed (new
  678.         line) character is sent to your printer with each carriage
  679.         return character. If number is 0 then no line feed is sent, if
  680.         it is 1 then a line feed is sent. The default is 1. If your
  681.         
  682.                                        11 
  683.  
  684.  
  685.  
  686.  
  687.                                 PEDRAW.DOC v1.4 
  688.         
  689.         diagram comes out "double-spaced" - with gaps between each line -
  690.         then specifying /F0 may cure the problem. (Only for dot matrix
  691.         printers.)
  692.  
  693.         /FF - send a formfeed (new page) after printing the file. (You
  694.         must use this flag on the last file you print on a PostScript
  695.         printer, but other files can be printed on the same page first.)
  696.  
  697.         /HP - produce output for a Hewlett-Packard compatible laser
  698.         printer.
  699.  
  700.         /PS - produce output for a PostScript printer.
  701.  
  702.         For Hewlett-Packard or PostScript printers only:
  703.  
  704.         /OXnumber - x origin, default 72. Measured in points (1/72")
  705.         approximately from the left hand edge of the page.
  706.  
  707.         /OYnumber - y origin from the bottom of an A4 page, default 72 in
  708.         "portrait" orientation for the bottom left corner, or 720 in
  709.         "landscape" orientation for the top left corner.
  710.  
  711.         For PostScript printers only:
  712.  
  713.         /SXnumber - x scale, default 1.0.
  714.  
  715.         /SYnumber - y scale, default 1.0.
  716.  
  717.         /ROnumber - rotation about origin, default 0.0
  718.  
  719.         Example use of PRMSP:
  720.  
  721.         PRMSP 12990.MSP TEMP.PRN /S12 /I
  722.  
  723.         The file 12990.MSP would be printed out to the file TEMP.PRN, in
  724.         a format suitable for sending to an IBM-compatible printer. Then
  725.         later TEMP.PRN could be printed by entering:
  726.  
  727.         PRINT TEMP.PRN
  728.  
  729.         The advantage of this is that by using the DOS PRINT command
  730.         printing occurs in background - you can get on with other things
  731.         while the diagram is being printed.
  732.  
  733.         Note: except in the case of PostScript printers, PRMSP cannot
  734.         work if your computer does not send 8 data bits to the printer.
  735.         This is sometimes altered by the MODE command which is usually
  736.         in the AUTOEXEC.BAT file - see your DOS manual for details - and
  737.         it is especially likely to have been used if your printer is on
  738.         a serial cable rather than the ordinary "Centronics" parallel
  739.         cable. Also make sure that your printer is set to receive 8 bits
  740.         rather than 7 - see your printer manual if you have problems.
  741.  
  742.         Note that you must always use the /FF flag when you wish to
  743.         
  744.                                        12 
  745.  
  746.  
  747.  
  748.  
  749.                                 PEDRAW.DOC v1.4 
  750.         
  751.         produce output from a laser printer, otherwise the image will be
  752.         stored in the printer's memory but will never be displayed.
  753.         However you may wish to print a number of graphs onto different
  754.         parts of the same page and then only use the /FF flag with the
  755.         last one.
  756.  
  757.  
  758.         * EXPLANATION OF MAPPING ALGORITHM
  759.  
  760.         This is provided so that the optimum order for including people
  761.         in the data file can be decided upon. The aim would be to reduce
  762.         the number of crossings over of lines, and to avoid having to
  763.         repeat individuals in different parts of the diagram.
  764.  
  765.         In general people are added to the pedigree diagram in order
  766.         from top to bottom and from left to right. The algorithm used is
  767.         as follows:
  768.  
  769.         1. An individual whose descendants are to be displayed is
  770.         selected by the user.
  771.  
  772.         2. If the option to extend the pedigree and show all members is
  773.         selected then instead of starting with the individual given the
  774.         program attempts to begin with the oldest ancestor of this
  775.         individual it can find.
  776.  
  777.         3. The following process is repeated (recursively) for each
  778.         individual in turn, beginning with the common ancestor provided.
  779.  
  780.         A. The index individual is marked as "dealt with", and is drawn.
  781.  
  782.         B. The next spouse of the index individual is selected. The next
  783.         spouse is the one who has a child which appears in the data file
  784.         before the children of other spouses, provided that the spouse
  785.         is not marked as "dealt with".
  786.  
  787.         C. Each of the children of the index individual and this spouse
  788.         is in turn selected. If the child has already been drawn then a
  789.         line will be drawn from the current sibship to the place where
  790.         the child appears in the pedigree, unless the child has been
  791.         shown in an earlier generation (when the line would have to go
  792.         "uphill"), in which case the child is drawn again but is marked
  793.         as a repeat ("REP"). If the child is not marked as "dealt with"
  794.         it is set as the new index individual and the process beginning
  795.         in 3A is applied to it (i.e. it's spouses and children will be
  796.         displayed).
  797.  
  798.         D. If the option to extend the pedigree and show all members is
  799.         selected then the oldest ancestor of the spouse is added to a
  800.         "to-be-done-later" list.
  801.  
  802.         E. The spouse is set to be the new index individual and the
  803.         process beginning in 3A is applied to it.
  804.  
  805.         
  806.                                        13 
  807.  
  808.  
  809.  
  810.  
  811.                                 PEDRAW.DOC v1.4 
  812.         
  813.         4. If the option to extend the pedigree and show all members is
  814.         selected then for everyone in the "to-be-done-later" list the
  815.         process beginning in 3A is applied.
  816.  
  817.         The above algorithm actually works quite well, even for fairly
  818.         complex pedigrees. However it does fall down if there is a
  819.         complete marriage loop, as when a husband has children by his
  820.         ex-wife's ex-husband's ex-wife. If H1 has children by W1 and W1
  821.         has children by H2 and H2 has children by W2, then if W2 has
  822.         children by H1 the program will not display them (or the
  823.         marriage between H1 and W2) because H1 will already be marked as
  824.         "dealt with" by the time the circle comes round to him again. A
  825.         similar thing would happen if a man had children by his ex-
  826.         wife's ex-husband's daughter. In practice this should rarely be
  827.         a problem and I have no intention of fixing it at present. You
  828.         will have to work round it by creating a dummy individual to
  829.         break the loop.
  830.  
  831.         To avoid having unnecessary repeated individuals, make sure that
  832.         the ancestor belonging to the earliest generation is given
  833.         first. Note that to force a sibship of a given parent to be
  834.         shown first it is only necessary to promote one of the sibs in
  835.         it to be first in the data file. However to force a sibship to
  836.         be last all the sibs must come after all the other children of
  837.         that parent.
  838.  
  839.         I don't know whether to recommend that the easiest way to get
  840.         the best-looking pedigree is to try to understand the algorithm
  841.         or just use trial and error. In my experience it is almost
  842.         always possible to get whole the pedigree displayed without any
  843.         repeats.
  844.  
  845.  
  846.         * EXAMPLE SESSION
  847.  
  848.         To help explain the above I have enclosed an example data file
  849.         called EXPED.DAT. Use a text editor or word processor to read it
  850.         or print it out by entering:
  851.  
  852.         PRINT EXPED.DAT
  853.  
  854.         To produce pedigrees proceed as follows.
  855.  
  856.         First make sure that you are logged on to the disk containing
  857.         the above programs, and that you have changed directory (using
  858.         CHDIR) to the one that contains them. Then enter:
  859.  
  860.         PEDRAW
  861.  
  862.         Using the up-and-down arrows highlight the "Load pedigree file"
  863.         option and press Enter. Press Enter twice more to see a list of
  864.         all files in the subdirectory. Highlight EXPED.DAT and select it
  865.         by pressing Enter. The data file should be loaded in without
  866.         problems.
  867.         
  868.                                        14 
  869.  
  870.  
  871.  
  872.  
  873.                                 PEDRAW.DOC v1.4 
  874.         
  875.         Highlight the "Display pedigree" option and select it with
  876.         Enter. Press Enter again to see a list of ID's of everyone in
  877.         the pedigree. Highlight 12119 and select it with Enter. The
  878.         pedigree should be displayed (if not see the section on "Setting
  879.         the graphics display"). Press Esc and the diagram will be saved
  880.         to disk with the name 12119.MSP.
  881.  
  882.         Press Esc again to return to the main menu, then select "Quit"
  883.         to leave PEDRAW.
  884.  
  885.         If you have Microsoft Windows then you may wish to run that and
  886.         then select the file 12119.MSP to open with Paint. You can label
  887.         the pedigree with that and then print it out in the usual way.
  888.  
  889.         If you do not have Microsoft Windows, print out the pedigree by
  890.         entering:
  891.  
  892.         PRMSP 12119.MSP
  893.  
  894.         To see how PEDRAW uses .PED files, try selecting EXPED.PED
  895.         instead of EXPED.DAT and choose the ancestor 4001.
  896.  
  897.  
  898.         * MICROSOFT PAINT UTILITIES
  899.  
  900.         In addition to PRMSP, a number of utility programs for
  901.         manipulating Microsoft paint files are provided. These programs
  902.         are for resizing, joining and viewing files. They all work only
  903.         on "old format" paint files, so they will not work on files
  904.         saved from newer versions of Microsoft paint, or on .BMP files.
  905.         However it should be possible to read the results in to Windows
  906.         Paint without any difficulty (I think). Later versions (3.x) of
  907.         Windows Paint(brush) will read in an MSP file OK (if that option
  908.         is selected) but will then save it as a BMP file, and these
  909.         utilities will therefore not work on the edited file, nor can
  910.         the BMP file be read into some versions of WordPerfect. To get
  911.         round this I have introduced a small conversion utility to
  912.         convert back from BMP to MSP format. Please note that these
  913.         programs may be quite slow on some computers.
  914.  
  915.         * Resizing paint files
  916.  
  917.         This can be done using the SIZEMSP.EXE program. Running this
  918.         program on its own gives you the current size of a paint file in
  919.         pixels:
  920.  
  921.         SIZEMSP filename.msp
  922.  
  923.         The size of the file is adjusted by entering four numbers to
  924.         increase the left, right, top, and bottom margins by that number
  925.         of pixels. The numbers for the left and right margins must be
  926.         divisible by eight. Negative numbers cut off that number of
  927.         pixels from the appropriate edge. E.g.:
  928.  
  929.         
  930.                                        15 
  931.  
  932.  
  933.  
  934.  
  935.                                 PEDRAW.DOC v1.4 
  936.         
  937.         SIZEMSP filename.msp 16 16 4 -6
  938.  
  939.         Adds white space 16 pixels wide to the left and right edges,
  940.         adds 4 blank lines of pixels at the top, and snips off 6 lines
  941.         of pixels at the bottom.
  942.  
  943.         * Viewing paint files
  944.  
  945.         You can view files without having to print them out or load
  946.         Windows by entering:
  947.  
  948.         VIEWMSP filename.msp
  949.  
  950.         If the file is too big to be displayed on the screen you can
  951.         move around it using the cursor keys. Pressing the Escape key
  952.         quits the program.
  953.  
  954.         * Joining paint files
  955.  
  956.         Files can be combined into a larger paint file, either side by
  957.         side using SPLICMSP.EXE, or one under the other using
  958.         TAGMSP.EXE. The format for both programs is the same:
  959.  
  960.         TAGMSP file1.msp file2.msp [file3.msp ...] newfile.msp
  961.  
  962.         Several files can be joined at once in this way.
  963.  
  964.         * Converting BMP to MSP files
  965.  
  966.         To do this use the BMP2MSP program. You only have to give the
  967.         name of the BMP file (the .BMP can also be omitted) and a file
  968.         with the same name but extension .MSP will be created:
  969.  
  970.         BMP2MSP file1.bmp
  971.  
  972.  
  973.         * HYPERTEXT HELP
  974.  
  975.         This documentation is available as a set of files which can be
  976.         read as pop-up hypertext help using MaxThink's HyperRez program.
  977.         If you have these files (generally distributed in the HELPINST
  978.         archive) then to read them first change into the directory in
  979.         which the files are located, then enter HR to load the program.
  980.         One can then change to another directory, and thereafter
  981.         pressing the hot key combination (by default Control-B) at any
  982.         time will pop up the help. The hot key combination can be
  983.         changed using the HRK program supplied. Pressing F1 then
  984.         provides brief instructions on using the utility. With some
  985.         monitor types it would probably be unwise to attempt to pop up
  986.         the help when the monitor is in graphics mode, i.e. while a
  987.         pedigree diagram is actually being drawn or displayed. Otherwise
  988.         it can provide a useful reminder of how to use PEDRAW, although
  989.         having the program loaded (or any other pop-up program) does
  990.         take up a small amount of memory which therefore becomes
  991.         
  992.                                        16 
  993.  
  994.  
  995.  
  996.  
  997.                                 PEDRAW.DOC v1.4 
  998.         
  999.         unavailable to PEDRAW.
  1000.  
  1001.  
  1002.         * CLOSING COMMENTS
  1003.  
  1004.         All trademarks acknowledged. PEDRAW is freely distributed to
  1005.         educational institutions, public health institutions and
  1006.         individuals for their private use. All other users (including
  1007.         private hospitals) must register the program before using it.
  1008.         Contact me at the address below for details.
  1009.  
  1010.         I would be very glad to hear of comments/problems/suggestions
  1011.         for improvements. One thing that is somewhat unsatisfactory but
  1012.         that I probably will not be changing is the way that diagonal
  1013.         lines which mark someone as deceased are rather short and get
  1014.         truncated at the edges of the screen. I probably won't be
  1015.         improving the facilities to print out pedigrees either, as
  1016.         programs such as Windows do exist to do this and it is a rather
  1017.         tedious way of reinventing the wheel. The text mode has now
  1018.         fallen behind the graphics mode, but I have no real plans to
  1019.         bring it back in line. Other features can be adjusted within
  1020.         limits according to user demand, and if somebody has special
  1021.         requirements then I may well be able to accommodate them.
  1022.  
  1023.         PEDRAW is written in C++ and makes fairly heavy use of routines
  1024.         from the Zortech Flash Graphics library and C++ toolkit. I would
  1025.         be willing to distribute to the source code to appropriate
  1026.         individuals who wish to modify it (though it is not well
  1027.         documented). Unfortunately I have made various modifications to
  1028.         the toolkit and so I would have to pass that on as well, so
  1029.         anybody wanting this code would have to furnish me with proof
  1030.         that they had a copy of the toolkit already, e.g. by sending me
  1031.         a listing of a header file or two.
  1032.  
  1033.         As far as upgrades are concerned, I will try to maintain a list
  1034.         of people I know who are using PEDRAW and I may periodically
  1035.         send out a notice announcing if I have made any significant
  1036.         changes. If you did not obtain the program directly from me it
  1037.         may be worth sending me your address so that I can add you to
  1038.         this list. I aim to keep up-to-date versions at the following
  1039.         sites from which they will be available by e-mail or anonymous
  1040.         ftp:
  1041.  
  1042.         USA: SIMTEL collection
  1043.         Numerous mirror sites available by anonymous ftp and e-mail.
  1044.  
  1045.         Europe mailserver:
  1046.         mailserv@fi.uwasa.garbo
  1047.         Send mail with Subject: garbo-request
  1048.         and message: send help
  1049.  
  1050.         gene-server:
  1051.  
  1052.         Internet    gene-server@bchs.uh.edu
  1053.         
  1054.                                        17 
  1055.  
  1056.  
  1057.  
  1058.  
  1059.                                 PEDRAW.DOC v1.4 
  1060.         
  1061.         BITNET/
  1062.         EARN        gene-server%bchs.uh.edu@CUNYVM
  1063.         UUCP        gene-server@bchs.UUCP (new style)
  1064.         Send mail with  Subject: SEND DOS HELP
  1065.         Anonymous ftp: ftp.bchs.uh.edu
  1066.  
  1067.         European:
  1068.         Anonymous ftp: nic.fun.com
  1069.         E-mail: mailserver@nic.funet.fi
  1070.         Send mail message: HELP
  1071.  
  1072.         European EMBL server:
  1073.         NetServ@EMBL-Heidelberg.DE
  1074.         Send mail message: DIR DOS_SOFTWARE
  1075.         Anonymous ftp: ftp.embl-heidelberg.de (/pub/software/dos)
  1076.         Manager: Rainer Fuchs, Fuchs@EMBL-Heidelberg.DE
  1077.         Problems: NetHelp@EMBL-Heidelberg.DE
  1078.  
  1079.         USA anonymous FTP: ftp.bio.indiana.edu
  1080.  
  1081.         UK only (JANET):
  1082.         call: uk.ac.lancs.pdsoft
  1083.         mailserver: archive-server@uk.ac.lancs.pdsoft
  1084.         Send message: send micros/ibmpc/INDEX
  1085.  
  1086.         Reference: CURTIS D. A program to draw pedigrees using LINKAGE
  1087.         or LINKSYS data files. Annals of Human Genetics 1990 54: 365-
  1088.         367.
  1089.  
  1090.         This work was supported in part by a post-doctoral training
  1091.         fellowship from the John D. and Catherine T. MacArthur
  1092.         Foundation Mental Health Research Network I (Psychobiology of
  1093.         Depression).
  1094.  
  1095.         Copyright Dave Curtis 1990
  1096.  
  1097.         Academic Department of Psychiatry
  1098.         St Mary's Hospital Medical School
  1099.         Praed Street
  1100.         London W2 1NY, England                   Phone:  071 725 1993
  1101.  
  1102.         Janet:       dcurtis@UK.AC.CRC
  1103.         Elsewhere:   dcurtis@CRC.AC.UK
  1104.         EARN/Bitnet: dcurtis%CRC@UKACRL
  1105.         Usenet: ...!mcsun!ukc!mrccrc!D.Curtis
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.         
  1116.                                        18 
  1117.