home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / biologia / distanc_.exe / HELP.PAS < prev    next >
Pascal/Delphi Source File  |  1993-03-18  |  18KB  |  318 lines

  1. UNIT Help;
  2.  
  3. INTERFACE
  4.  
  5. USES Crt;
  6.  
  7. PROCEDURE HelpPag1;
  8. PROCEDURE HelpPag2;
  9. PROCEDURE HelpPag3;
  10. PROCEDURE HelpPag4;
  11. PROCEDURE HelpPag5;
  12. PROCEDURE HelpPag6;
  13. PROCEDURE HelpPag7;
  14. PROCEDURE HelpPag8;
  15. PROCEDURE HelpPag9;
  16. PROCEDURE HelpPag10;
  17. PROCEDURE HelpPag11;
  18. PROCEDURE HelpPag12;
  19. PROCEDURE HelpPag13;
  20. PROCEDURE HelpPag14;
  21. PROCEDURE HelpCommandLine;
  22.  
  23. IMPLEMENTATION
  24.  
  25. PROCEDURE HelpPag1;
  26.   begin
  27.   textcolor (white);
  28.   GotoXY(12,2); write ('INDEX.                                                   (Page 1)');
  29.   textcolor (green);
  30.   GotoXY(2,3);  write ('');
  31.   GotoXY(2,4);  write ('Page  1. Index.');
  32.   GotoXY(2,5);  write ('Page  2. Phylip New input -interleaved- format. Example.');
  33.   GotoXY(2,6);  write ('Page  3. Phylip Old input -aligned- format. Example.');
  34.   GotoXY(2,7);  write ('Page  4. MSF input format. Example.');
  35.   GotoXY(2,8);  write ('Page  5. Methods to compute distances (Jukes-Cantor).');
  36.   GotoXY(2,9);  write ('Page  6. Methods to compute distances (Kimura 2).');
  37.   GotoXY(2,10); write ('Page  7. Methods to compute distances (Kimura 3).');
  38.   GotoXY(2,11); write ('Page  8. Methods to compute distances (Kimura 4).');
  39.   GotoXY(2,12); write ('Page  9. Methods to compute distances (Kimura 6).');
  40.   GotoXY(2,13); write ('Page 10. Methods to compute distances (Tajima and Nei).');
  41.   GotoXY(2,14); write ('Page 11. Bases to use.');
  42.   GotoXY(2,15); write ('Page 12. Code tables.');
  43.   GotoXY(2,16); write ('Page 13. Output.');
  44.   GotoXY(2,17); write ('Page 14. Some important notes. Future.');
  45.   end;
  46.  
  47. PROCEDURE HelpPag2;
  48.   begin
  49.   textcolor (white);
  50.   GotoXY(12,2); write ('PHYLIP NEW INPUT -INTERLEAVED- FORMAT. EXAMPLE.          (Page 2)');
  51.   textcolor (green);
  52.   GotoXY(1,3);  write ('4 100',chr(20));
  53.   GotoXY(1,4);  write ('HLPH3      TGGGAAAAGT TCTCCAGCCA ACCCAAGTTC GAAAGAGATT TGTTCTACCA',chr(20));
  54.   GotoXY(1,5);  write ('RLPH3      TGGGAGAAGT TCTCCAACCA GACCAAGTTT GAAAGAGACT TGTTCTATCA',chr(20));
  55.   GotoXY(1,6);  write ('HLPH4      ---------- ---------- ---------- ------GATG AGTTTCTGTA',chr(20));
  56.   GotoXY(1,7);  write ('RLPH4      ---------- ---------- ---------- ------GATG AGTTCGTGTA',chr(20));
  57.   GotoXY(1,8);  write (chr(20));
  58.   GotoXY(1,9);  write ('CGGGATGACT TTCTGTGGGG CGTGTCCTCT TCCGCTTATC AGATTGAAGG',chr(20));
  59.   GotoXY(1,10); write ('CGGGATGACT TCCTGTGGGG CGTGTCCTCT TCAGCGTATC AGATTGAAGG',chr(20));
  60.   GotoXY(1,11); write ('CCTGAGGGCT TCATCTGGAG TGCAGCTTCT GCTGCATATC AGATTGAAGG',chr(20));
  61.   GotoXY(1,12); write ('CCTGAGGGCT TCGTGTGGAG TACATCTACT GCTGCATTTC AGATCGAAGG',chr(20));
  62.   GotoXY(1,13); write (chr(20));
  63.   textcolor (white); GotoXY(1,16); write ('IMPORTANT NOTES:'); textcolor (green);
  64.   GotoXY(1,17); write ('-Species names must be ten chars long, completed with blanks if necessary.');
  65.   GotoXY(1,18); write ('-The line length is not relevant.');
  66.   GotoXY(1,19); write ('-There must be a blank line between blocks of species.');
  67.   end;
  68.  
  69. PROCEDURE HelpPag3;
  70.   begin
  71.   textcolor (white);
  72.   GotoXY(12,2); write ('PHYLIP OLD INPUT -ALIGNED- FORMAT. EXAMPLE.              (Page 3)');
  73.   textcolor (green);
  74.   GotoXY(1,3);  write ('4 100',chr(20));
  75.   GotoXY(1,4);  write ('HLPH3     TGGGAAAAGT TCTCCAGCCA ACCCAAGTTC GAAAGAGATT TGTTCTACCA',chr(20));
  76.   GotoXY(1,5);  write ('          CGGGATGACT TTCTGTGGGG CGTGTCCTCT TCCGCTTATC AGATTGAAGG',chr(20));
  77.   GotoXY(1,6);  write (chr(20));
  78.   GotoXY(1,7);  write ('RLPH3     TGGGAGAAGT TCTCCAACCA GACCAAGTTT GAAAGAGACT TGTTCTATCA',chr(20));
  79.   GotoXY(1,8);  write ('          CGGGATGACT TCCTGTGGGG CGTGTCCTCT TCAGCGTATC AGATTGAAGG',chr(20));
  80.   GotoXY(1,9);  write (chr(20));
  81.   GotoXY(1,10); write ('HLPH4     ---------- ---------- ---------- ------GATG AGTTTCTGTA',chr(20));
  82.   GotoXY(1,11); write ('          CCTGAGGGCT TCATCTGGAG TGCAGCTTCT GCTGCATATC AGATTGAAGG',chr(20));
  83.   GotoXY(1,12); write (chr(20));
  84.   GotoXY(1,13); write ('RLPH4     ---------- ---------- ---------- ------GATG AGTTCGTGTA',chr(20));
  85.   GotoXY(1,14); write ('          CCTGAGGGCT TCGTGTGGAG TACATCTACT GCTGCATTTC AGATCGAAGG',chr(20));
  86.   GotoXY(1,15); write (chr(20));
  87.   textcolor (white); GotoXY(1,16); write ('IMPORTANT NOTES:'); textcolor (green);
  88.   GotoXY(1,17); write ('-Species names must be ten chars long, completed with blanks if necessary.');
  89.   GotoXY(1,18); write ('-The line length is not relevant.');
  90.   GotoXY(1,19); write ('-The ten blank spaces below the species names are not relevant.');
  91.   GotoXY(1,20); write ('-There must be a blank line between sequences.');
  92.   end;
  93.  
  94. PROCEDURE HelpPag4;
  95.   begin
  96.   textcolor (white);
  97.   GotoXY(12,2); write ('MSF INPUT FORMAT. EXAMPLE.                               (Page 4)');
  98.   textcolor (green);
  99.   GotoXY(2,3);  write (' ****  ANYTHING UNTIL THE "//" IN THE NEXT LINE  ****');
  100.   GotoXY(2,4);  write ('//',chr(20));
  101.   GotoXY(2,5);  write (chr(20));
  102.   GotoXY(2,6);  write ('         1                                                   50',chr(20));
  103.   GotoXY(2,7);  write ('HLPH3    TGGGAAAAGT TCTCCAGCCA ACCCAAGTTC GAAAGAGATT TGTTCTACCA',chr(20));
  104.   GotoXY(2,8);  write ('RLPH3    TGGGAGAAGT TCTCCAACCA GACCAAGTTT GAAAGAGACT TGTTCTATCA',chr(20));
  105.   GotoXY(2,9);  write ('HLPH4    .......... .......... .......... ......GATG AGTTTCTGTA',chr(20));
  106.   GotoXY(2,10); write (chr(20));
  107.   GotoXY(2,11); write ('         51                                                 100',chr(20));
  108.   GotoXY(2,12); write ('HLPH3    CGGGATGACT TTCTGTGGGG CGTGTCCTCT TCCGCTTATC AGATTGAAGG',chr(20));
  109.   GotoXY(2,13); write ('RLPH3    CGGGATGACT TCCTGTGGGG CGTGTCCTCT TCAGCGTATC AGATTGAAGG',chr(20));
  110.   GotoXY(2,14); write ('HLPH4    CCTGAGGGCT TCATCTGGAG TGCAGCTTCT GCTGCATATC AGATTGAAGG',chr(20));
  111.   GotoXY(2,15); write (chr(20));
  112.   textcolor (white); GotoXY(1,16); write ('IMPORTANT NOTES:'); textcolor (green);
  113.   GotoXY(1,17); write ('-Species names must be NINE chars long, completed with blanks if necessary.');
  114.   GotoXY(1,18); write ('-The line length is not relevant. -Deletions are represented by dots.');
  115.   GotoXY(1,19); write ('-There must be two blank lines between blocks of species. The numbers of the');
  116.   GotoXY(1,20); write (' bases in the second line are not relevant.');
  117.   end;
  118.  
  119. PROCEDURE HelpPag5;
  120.   begin
  121.   textcolor (white);
  122.   GotoXY(12,2); write ('METHODS TO COMPUTE DISTANCES (Jukes-Cantor).             (Page 5)');
  123.   textcolor (green);
  124.   GotoXY(2,3);  write ('1. Jukes-Cantor''s distance method:');
  125.   GotoXY(2,4);  write ('                                             9p(1-p)');
  126.   GotoXY(2,5);  write ('    d = (-3/4) ln (1-(4/3)p),     V (d) = ---------------,');
  127.   GotoXY(2,6);  write ('                                            ((3-4p)²) n');
  128.   GotoXY(2,8);  write ('where d is the Jukes-Cantor distance, V the corresponding variance,');
  129.   GotoXY(2,9);  write ('p the proportion of different nucleotides between two sequences,');
  130.   GotoXY(2,10); write ('and n the total number of nucleotides being compared.');
  131.   GotoXY(2,12); write ('  This is a simple method for estimating the number of nucleotide');
  132.   GotoXY(2,13); write ('substitutions presented by Jukes and Cantor (1969).');
  133.   GotoXY(2,14); write ('  Nucleotide substitutions are assumed to occur at all nucleotide');
  134.   GotoXY(2,15); write ('sites with equal probability, and, at any site, a nucleotide');
  135.   GotoXY(2,16); write ('changes to any other nucleotide with a constant rate.');
  136.   end;
  137.  
  138. PROCEDURE HelpPag6;
  139.   begin
  140.   textcolor (white);
  141.   GotoXY(12,2); write ('METHODS TO COMPUTE DISTANCES (Kimura 2).                 (Page 6)');
  142.   textcolor (green);
  143.   GotoXY(2,3);  write ('2. Kimura''s two parameters distance method:');
  144.   GotoXY(2,5);  write ('    d = (-1/2) ln [(1-2P-Q) sqrt(1-2Q)]');
  145.   GotoXY(2,7);  write ('    V (d) = (1/n) [(a²P)+(b²Q)-(aP+bQ)²]');
  146.   GotoXY(2,9);  write ('    a = (1/(1-2P-Q)),     b = (1/2) [(1/(1-2P-2Q)) + (1/(1-2Q))],');
  147.   GotoXY(2,11); write ('where d is Kimura''s 2 parameters distance, V its variance,');
  148.   GotoXY(2,12); write ('P the proportion of transitions, Q the proportion of transversions,');
  149.   GotoXY(2,13); write ('and n is the total number of nucleotides being compared.');
  150.   GotoXY(2,15); write ('  This method was proposed by Kimura (1980). It allows transitional');
  151.   GotoXY(2,16); write ('and transversional substitutions to occur at different rates.');
  152.   end;
  153.  
  154. PROCEDURE HelpPag7;
  155.   begin
  156.   textcolor (white);
  157.   GotoXY(12,2); Write ('METHODS TO COMPUTE DISTANCES (Kimura 3).                 (Page 7)');
  158.   textcolor (green);
  159.   GotoXY(2,3);  write ('3. Kimura''s three parameters distance method:');
  160.   GotoXY(2,4);  write ('');
  161.   GotoXY(2,5);  write ('  d := (-1/4)*ln((1-(2*fp)-(2*fq))*(1-(2*fp)-(2*fr))*(1-(2*fq)-(2*fr))');
  162.   GotoXY(2,8);  write ('where p is the proportion of different nucleotides between two sequences');
  163.   GotoXY(2,9); write ('and n the total number of nucleotides being compared.');
  164.   GotoXY(2,11); write ('   This model, proposed by Kimura (1981), allows for one type of');
  165.   GotoXY(2,12); write ('transversional substitutions (fp) and two types of transitional');
  166.   GotoXY(2,13); write ('substitutions (fq and fr).');
  167.   end;
  168.  
  169. PROCEDURE HelpPag8;
  170.   begin
  171.   textcolor (white);
  172.   GotoXY(12,2); Write ('METHODS TO COMPUTE DISTANCES (Kimura 4).                 (Page 8)');
  173.   textcolor (green);
  174.   GotoXY(2,5); write ('   This four-parameter model, proposed by Takahata and Kimura (1981),');
  175.   GotoXY(2,6); write ('allows for the two types of transversional substitutions at a');
  176.   GotoXY(2,7); write ('nucleotide site to occur at different rates. Moreover, the four');
  177.   GotoXY(2,8); write ('types of transitions can occur at different rates.');
  178.   GotoXY(2,10); write ('   For further information about this distance see the references cited');
  179.   GotoXY(2,11); write ('in the file DISTANCE.DOC.');
  180.   end;
  181.  
  182. PROCEDURE HelpPag9;
  183.   begin
  184.   textcolor (white);
  185.   GotoXY(12,2); Write ('METHODS TO COMPUTE DISTANCES (Kimura 6).                 (Page 9)');
  186.   textcolor (green);
  187.   GotoXY(2,5); write ('   This six-parameter model is based on the model originally');
  188.   GotoXY(2,6); write ('proposed by Kimura (1981), who called it the two frequency');
  189.   GotoXY(2,7); write ('class model. It was solved by Gojobori et al. (1982).');
  190.   GotoXY(2,10); write ('   For further information about this distance see the references cited');
  191.   GotoXY(2,11); write ('in the file DISTANCE.DOC.');
  192.   end;
  193.  
  194. PROCEDURE HelpPag10;
  195.   begin
  196.   textcolor (white);
  197.   GotoXY(12,2); Write ('METHODS TO COMPUTE DISTANCES (Tajima and Nei).          (Page 10)');
  198.   textcolor (green);
  199.   GotoXY(2,3);  write ('6. Tajima and Nei''s distance method:');
  200.   GotoXY(2,5);  write ('     d = (-b)*ln(1-(p/b))');
  201.   GotoXY(2,7);  write ('               (b²)*p*(1-p)');
  202.   GotoXY(2,8);  write ('     V (d) = ------------------');
  203.   GotoXY(2,9);  write ('                ((b-p)²)*n');
  204.   GotoXY(2,11); write ('where d is Tajima and Nei''s distance, V its variance,');
  205.   GotoXY(2,12); write ('p the proportion of different nucleotides between two sequences,');
  206.   GotoXY(2,13); write ('and n the total number of nucleotides compared.');
  207.   GotoXY(2,15); write ('   Tajima and Nei (1984) developed another method, the Four-Parameters');
  208.   GotoXY(2,16); write ('Method, which seems to be quite insensitive to various disturbing factors,');
  209.   GotoXY(2,17); write ('in which each nucleotide is substituted by another at a fixed rate');
  210.   GotoXY(2,18); write ('for each substituting nucleotide.');
  211.   GotoXY(2,19); write ('   For further information about this distance see the references cited');
  212.   GotoXY(2,20); write ('in the file DISTANCE.DOC.');
  213.   end;
  214.  
  215. PROCEDURE HelpPag11;
  216.   begin
  217.   textcolor (white);
  218.   GotoXY(12,2); Write ('BASES TO USE.                                           (Page 11)');
  219.   textcolor (green);
  220.   GotoXY(2,4);  write ('In this step, the bases in each codon to use in computations are chosen.');
  221.   GotoXY(2,5);  write ('   You can choose to compute distances in each combination of bases in');
  222.   GotoXY(2,6);  write ('DNA sequences (all bases [default], first base, second base, third base,');
  223.   GotoXY(2,7);  write ('the aligned first and second bases, first and third bases, and second and');
  224.   GotoXY(2,8);  write ('third bases). Every distance can be calculated with these seven methods.');
  225.   GotoXY(2,10); write ('beginning of the sequence');
  226.   GotoXY(2,11); write ('  |');
  227.   GotoXY(2,12); write ('  |   1 2 3 4 5 6 7 8 9');
  228.   GotoXY(2,13); write ('  --> A A C T G G G G T');
  229.   GotoXY(2,14); write ('      ___   ___   ___');
  230.   GotoXY(2,15); write ('      1+2   1+2   1+2      <---- Using 1st + 2nd bases');
  231.   GotoXY(2,16); write ('        ___   ___   ___');
  232.   GotoXY(2,17); write ('        2+3   2+3   2+3    <---- Using 2nd + 3rd bases');
  233.   GotoXY(2,19); write ('                                  etc...');
  234.   end;
  235.  
  236. PROCEDURE HelpPag12;
  237.   begin
  238.   textcolor (white);
  239.   GotoXY(12,2); Write ('CODE TABLES.                                            (Page 12)');
  240.   textcolor (green);
  241.   GotoXY(2,4);  write ('   When all the bases are selected, the matrices of synonymous and');
  242.   GotoXY(2,5);  write ('non-synonymous difference proportions and substitutions per site using the');
  243.   GotoXY(2,6);  write ('unweighted pathway method (Nei 1987), can be computed according to one of');
  244.   GotoXY(2,7);  write ('the following genetic codes:');
  245.   GotoXY(2,10); write ('Tables of trinucleotide-aminoacid translation code to use:');
  246.   GotoXY(2,11); write ('   - don''t make these calculations (default),');
  247.   GotoXY(2,12); write ('   - standard nuclear code,');
  248.   GotoXY(2,13); write ('   - Drosophila mitochondrial code,');
  249.   GotoXY(2,14); write ('   - Yeast mitochondrial code,');
  250.   GotoXY(2,15); write ('   - Mammalian mitochondrial code,');
  251.   GotoXY(2,16); write ('   - ciliated code,');
  252.   textcolor (white); GotoXY(2,18); write ('IMPORTANT NOTICE:'); textcolor (green);
  253.   GotoXY(2,19); write ('These are slow computations. They may take a while.');
  254.   end;
  255.  
  256. PROCEDURE HelpPag13;
  257.   begin
  258.   textcolor (white);
  259.   GotoXY(12,2); Write ('OUTPUT.                                                 (Page 13)');
  260.   textcolor (green);
  261.   GotoXY(2,3);  write ('The results file can be of three types:');
  262.   GotoXY(2,5);  write ('    -Large output file (all the matrices). DISTANCE prints the common');
  263.   GotoXY(2,6);  write ('     length vector, Hamming''s distance (absolute number of changes)');
  264.   GotoXY(2,7);  write ('     matrix, the transversions and transitions matrix (if selected),all the');
  265.   GotoXY(2,8);  write ('     nucleotide pairs matrices, and the distance matrix selected in, along');
  266.   GotoXY(2,9);  write ('     with its variances matrix, when feasible. This is the default.');
  267.   GotoXY(2,11); write ('    -Brief output file. The program only prints the distance and the');
  268.   GotoXY(2,12); write ('     corresponding variances matrix.');
  269.   GotoXY(2,14); write ('    -Output for FITCH and KITSCH. The program only prints one lower ');
  270.   GotoXY(2,15); write ('     triangular matrix with the distances for using with the PHYLIP package');
  271.   GotoXY(2,16); write ('     programs FITCH and KITSCH. Remember to change the PHYLIP option ');
  272.   GotoXY(2,17); write ('     ''Lower-triangular data matrix'' for using these matrices.');
  273.   end;
  274.  
  275. PROCEDURE HelpPag14;
  276.   begin
  277.   textcolor (white);
  278.   GotoXY(12,2); Write ('SOME IMPORTANT NOTES:                                   (Page 14)');
  279.   textcolor (green);
  280.   GotoXY(2,4);  write ('-Read the file ''DISTANCE.DOC'' and the on-screen help before beginning.');
  281.   GotoXY(2,6);  write ('-The program does not use pairs of nucleotides with a deletion in the ');
  282.   GotoXY(2,7);  write (' computations (this seems to be most correct unless an evolutionary model');
  283.   GotoXY(2,8);  write (' for insertion/deletions is available). This can cause the results to be ');
  284.   GotoXY(2,9);  write (' slightly different from other programs. All the results are coincident');
  285.   GotoXY(2,10);  write (' in alignments without deletions.');
  286.   GotoXY(2,12);  write ('-Error detection has been improved, but computer hang-ups may still occur.');
  287.   GotoXY(2,13); write (' It is strongly recommended to check the input file format.');
  288.   GotoXY(2,14); write (' There is a sample file for each input format.');
  289.   textcolor (white);
  290.   GotoXY(2,16); write ('FUTURE DEVELOPMENTS:');
  291.   textcolor (green);
  292.   GotoXY(2,17); write ('-More input formats.');
  293.   GotoXY(2,18); write ('-Improvement of the graphic interface. Mouse support.');
  294.   GotoXY(2,19); write ('-Use of extended memory under Windows 3.x.');
  295.   end;
  296.  
  297.                                    (*HELP FOR DISTANCE IN COMMAND LINE MODE*)
  298. PROCEDURE HelpCommandLine;
  299.   begin
  300.   writeln ('Help for DISTANCE in command line mode.');
  301.   writeln ('Up to 7 parameters can be specified, separated by a blank space.');
  302.   writeln ('1st. Input file         (string)              Default: sequence.seq.');
  303.   writeln ('2nd. Output file        (string)              Default: sequence.rst.');
  304.   writeln ('3rd. Format             (1 <= integer <= 3)   Default: 1= interleaved.');
  305.   writeln ('4th. Distance measure   (1 <= integer <= 6)   Default: 2= Kimura-2.');
  306.   writeln ('5th. Bases used         (1 <= integer <= 7)   Default: 1= all bases.');
  307.   writeln ('6th. Genetic code       (1 <= integer <= 6)   Default: 1= none.');
  308.   writeln ('7th. Output format      (1 <= integer <= 3)   Default: 1= long output.');
  309.   writeln;
  310.   writeln ('Distance /h (/H)                            Shows this help.');
  311.   writeln;
  312.   writeln ('Example:               Distance input.seq output.rst 3');
  313.   writeln ('It will take file input.seq as input with MSF format and results will be');
  314.   writeln ('written in the file output.rst, using the remaining default parameters.');
  315.   end;
  316.  
  317. END.
  318.