def read(results_file):
 results = {}
 if (not os.path.exists(results_file)):
  raise IOError('Results file does not exist.')
 with open(results_file) as handle:
  lines = handle.readlines()
 (results, num_params) = _parse_baseml.parse_basics(lines, results)
 results = _parse_baseml.parse_parameters(lines, results, num_params)
 if (results.get('version') is None):
  raise ValueError('Invalid results file')
 return results

def read ( results_file ) : results = { } if ( not os . path . exists ( results_file ) ) : raise IOError ( 'Results file does not exist.' ) with open ( results_file ) as handle : lines = handle . readlines ( ) ( results , num_params ) = _parse_baseml . parse_basics ( lines , results ) results = _parse_baseml . parse_parameters ( lines , results , num_params ) if ( results . get ( 'version' ) is None ) : raise ValueError ( 'Invalid results file' ) return results
parses an xml file from the ncbi entrez utilities into python objects .