#silence output and run API filter call with helpers.no_console_output(): script07_api_call(curDir, os.path.join(curDir, outFile), genelist, filtervals['opt_e_keyword_field'], negative_query, joinedPrevFile) outheader = [] outtext = [] outtextmap = [] outheadermap = [] #for column defs #get number of lines in the file using custom function numresults = -1 try: #results = file line count minus header numresults = helpers.get_linecount(os.path.join(curDir, outFile)) - 1 except: numresults = -1 try: with open(os.path.join(curDir, outFile), 'r') as ifff: outheader = ifff.readline().strip().split('\t') #only store the first RESULTLIMIT results for i in range(0, RESULTLIMIT): outtext.append(ifff.readline().strip().split('\t')) except: pass #no results found
#read the new (old) results file and return the data #parse out the data from the output file and return it in JSON #format changed as of tag v0.5 to export this as a map/dict #which is the easiest way for angular to produce a sortable table outheader = [] outtext = [] outtextmap = [] outheadermap = [] #for column defs #get number of lines in the file using custom function numresults = -1 try: #result count = file line count minus header numresults = helpers.get_linecount('%s/%s' % (curDir, outFile)) - 1 except: numresults = -1 try: with open('%s/%s' % (curDir, outFile), 'r') as ifff: outheader = ifff.readline().strip().split('\t') #only store the first RESULTLIMIT results for i in range(0, RESULTLIMIT): outtext.append(ifff.readline().strip().split('\t')) except: pass #no results found
#read the new (old) results file and return the data #parse out the data from the output file and return it in JSON #format changed as of tag v0.5 to export this as a map/dict #which is the easiest way for angular to produce a sortable table outheader = [] outtext = [] outtextmap = [] outheadermap = [] #for column defs #get number of lines in the file using custom function numresults = -1 try: #result count = file line count minus header numresults = helpers.get_linecount('%s/%s' % (curDir, outFile)) - 1 except: numresults = -1 try: with open('%s/%s' % (curDir, outFile), 'r') as ifff: outheader = ifff.readline().strip().split('\t') #only store the first RESULTLIMIT results for i in range(0, RESULTLIMIT): outtext.append(ifff.readline().strip().split('\t')) except: pass #no results found for result in outtext: