/* startup.sas */; ********************************************************************** * * * SASGENE 1.1 * * Program for Analysis of * * Gene Segregation and Linkage * * November 5, 1997 * * * * Example of Invoking SASGENE macros * * * *********************************************************************; ********************************************************************** * * * Specify file names and include macros. * * * * 1. Specify the name of the file where the data is stored. * * The name is enclosed in quotes. * * example: filename in 'orig.dat' ; * * * * 2. Include the macros with the %INCLUDE (%inc) statement. * * Specify the physical name of the external file where the macro * * is stored. The physical name is enclosed in quotes. * * example: %inc 'convert.sas'; * * %inc 'sgene.sas'; * * %inc 'linkage.sas'; * * * * Summary: * * The user only needs to change the information inside the * * quotes on the FILENAME and %INCLUDE statements below. * * The information inside the quotes specifies the name of the * * external file where the data or macros are stored. It may be * * necessary to specify the entire file name inside the quotes. * * example: %inc 'c:\sasmacro\convert.sas'; * *********************************************************************; filename in 'example.dat'; /* name and location of data file */ %inc 'convert.sas'; /* name and location of SAS macro CONVERT */ %inc 'sgene.sas'; /* name and location of SAS macro SGENE */ %inc 'linkage.sas'; /* name and location of SAS macro LINKAGE */ ********************************************************************** * include any desired titles and options * *********************************************************************; title 'Cucumber Gene Linkage Example'; options nodate pageno=1; options linesize=80 pagesize=500; ********************************************************************** * Create SAS dataset * * The user will need to modify the INPUT statement to specify * * the gene names from their experiment. If list input is used, * * then missing values should be coded with a "." * * * * Macros are expecting the following variable names: * * family = family code * * gnr = generation code * * * * Macros are expecting the following values for GNR variable: * * 1 for P1 * * 2 for P2 * * 3 for F1 * * 4 for F2 * * 5 for BC1P1 * * 6 for BC1P2 * * * * P1, P2 and F1 generations must be included * * for program to run (1 plant each is sufficient) * *********************************************************************; data original; infile in missover pad; /* MISSOVER & PAD are options on INFILE */ input plot rep family gnr plnt bi $ rc $ dv $ sp $ ll $ df $ f $ b $ d $ u $ tu $ ; run; ********************************************************************** * Invoke the CONVERT macro if the user needs to convert the gene * * values to "D" or "R". Otherwise delete the %convert statement. * * The SGENE and LINKAGE macros are expecting the following gene * * values: * * D for Dominant, * * R for Recessive, * * . or blank for missing value. * * * * Specify the following parameters: * * DS - SAS dataset to convert * * GENES - gene names from the SAS dataset * * DSOUT - output SAS dataset that has been converted * *********************************************************************; %convert(ds=original, genes=BI RC DV SP LL DF F B D U TU, dsout=new); ********************************************************************** * Invoke the SGENE macro. * * Modify the following parameters for your experiment: * * DS - SAS dataset to analyze (possibly the output dataset * * from the CONVERT macro. * * GENES - gene names from the SAS dataset * * P1 - critical value for about half of the frequency of one * * parent to determine the expected segregation ratio * * (1:1 or 1:0) in BC1 generation. * * * * Indicates the number of plants of parent 1 * * that you feel must have the trait * * before you accept it as uniform * * (for example, 15 plants of P1 measured; * * critical value set at 10, * * allowing 5 misclassifications) * *********************************************************************; %sgene(ds=new, genes=BI RC DV SP LL DF F B D U TU, p1=9 ); ********************************************************************** * Invoke the LINKAGE macro. * * Modify the following parameters for your experiment: * * DS - SAS dataset to analyze (possibly the output dataset * * from the CONVERT macro. * * GENES - gene names from the SAS dataset * * P1, P2- critical value for about half of the frequency of * * the parents to determine if the phase is coupling or * * repulsion. * * * * Indicates the number of plants of parent 1 * * that you feel must have the trait * * before you accept it as uniform * * (for example, 15 plants of P1 measured; * * critical value set at 10, * * allowing 5 misclassifications) * *********************************************************************; %linkage(ds=new, genes=BI RC DV SP LL DF F B D U TU, p1=9, p2=9 );