def check_options(parser, options):
 if (options.percent_aligned > 1.0):
  parser.error('Please check -p option: should be between 0.0(0%) and 1.0(100%)')
 if (options.querydb is None):
  parser.error('Please check -i option: must specify path to a FASTA file')
 try:
  f = open(options.querydb, 'r')
  f.close()
 except IOError:
  parser.error('Please check -i option: cannot read from query FASTA filepath')
 if (options.subjectdb is None):
  parser.error('Please check -d option: must specify path to a FASTA file')
 try:
  f = open(options.subjectdb, 'r')
  f.close()
 except IOError:
  parser.error('Please check -d option: cannot read from subject FASTA filepath')
 if (options.outputdir is None):
  parser.error('Please check -o option: must specify the output directory path')

def check_options ( parser , options ) : if ( options . percent_aligned > 1.0 ) : parser . error ( 'Please check -p option: should be between 0.0(0%) and 1.0(100%)' ) if ( options . querydb is None ) : parser . error ( 'Please check -i option: must specify path to a FASTA file' ) try : f = open ( options . querydb , 'r' ) f . close ( ) except IOError : parser . error ( 'Please check -i option: cannot read from query FASTA filepath' ) if ( options . subjectdb is None ) : parser . error ( 'Please check -d option: must specify path to a FASTA file' ) try : f = open ( options . subjectdb , 'r' ) f . close ( ) except IOError : parser . error ( 'Please check -d option: cannot read from subject FASTA filepath' ) if ( options . outputdir is None ) : parser . error ( 'Please check -o option: must specify the output directory path' )
check to insure required options have been supplied .