Class parsers
file parsers: command line parser, PDB file / (modified) DSSP output parser
not a class but works better with ldoc if we say it is
Methods
parsers:parseCmdLine (argFormat, info, valid_flags, valid_params) | parse specified flags and parameters from command line, pass remaining args through |
parsers:parseProteinData (infile, callback, chain, infname) | parse PDB file, internal coordinates (.pic) file, or rfold modified DSSP output file |
Methods
- parsers:parseCmdLine (argFormat, info, valid_flags, valid_params)
-
parse specified flags and parameters from command line, pass remaining args through ./parseCmdLine.lua -p1=hello -f1 -f1 fee fie fo fum
Parameters:
- argFormat
format of command line argments for help e.g. '[
| | ] ...' - info descriptive text for what the program does
- valid_flags { ['f1'] = "flag1 effect message", ['f2'] = "flag2 message" }
- valid_params { ['p1'] = "parameter1 explanation ...", ['p2'] = "parameter2 explanation ..." }
Returns:
-
table with 'param' values as specified, 'flag' values counting number of times flag seen, and remaining args in sequential numbered slots
- argFormat
format of command line argments for help e.g. '[
- parsers:parseProteinData (infile, callback, chain, infname)
-
parse PDB file, internal coordinates (.pic) file, or rfold modified DSSP output file
Parameters:
- infile (file or string) rfold modified DSSP output or PDB file or lines with hedron or dihedron specifications
- callback (optional) call with table containing parsed fields for DSSP data lines, PDB ATOM etc. lines, hedron length-angle-length lines, or dihedron angle lines
- chain only process line if specified chain matches input (where relevant)
- infname (optional) specify source for infile=string data
Returns:
-
pdbid if callback specified, else sequential list of tables as for 'callback' above in order read