validate - validate and fix column values of a starbase data table
SYNOPSYS
validate 'statements' < tablefile
validate executes a list of awk pattern statement pairs on each row of a starbase data table. Each statement is separated from the next by a semi-colon or newline. validate is very useful for checking and fixing values of columns in a table.
The statements or expression is preprocessed by the program before passed to awk for evaluation. Column and header value names are substituted for thier values in the table. Column names may be subscripted with an array index and the column data will be split on the ARRDEL environment variable. Header values may be also subscripted, but assignments made to header values will not appear in the output table.
The user statements and expressions of are interpreted by the awk programming langauge.
Check the rows of a table for consistancy. X must be less than 7 and Y must be less than 4.
john@panic : validate 'X > 7 && Y < 4 { print "Warning bad position at line " NR }'Validate programs can be quite complex and are very powerful. FastFixes used validate to check and fix the initial versions of the FAST database.
Undefined user written function may be automatically included in the text of programs. The environment variable TABLEFUNCTIONS names a path which is searched for undefined functions. If a function is mentioned in a user program or expression but not defined, a file found in the TABLEFUNCTIONS path with the name of the undefined function will be included in the program. This feature allows a library of usefull functions to be built and accessed easily.