def main(): ''' Get a GAF, Convert, Calculate, and output. ''' # Use the assessment configuration file to grab the OBO file. obo_path, gaf_path = read_config() print "Read the config" ICHelper.setupGraphs(obo_path) print "Graphs are done" gaf = GOA._gaf20iterator(open(gaf_path)) print "I have made the GAF generator" data = GAFtoDICT(gaf) print "I have made the dictionary" WyattClarkIC(data) print("IC values created")
#!/usr/bin/python import unittest import os from Bio.UniProt import GOA from gothresher import gothresher input_file = os.getcwd( ) + os.sep + ".." + os.sep + "example_data" + os.sep + "goa_exampleYeast.gaf" # print(input_file) # Convert from GAF to required format gaf_output = GOA._gaf20iterator(open(input_file, "r")) data = gothresher.convert_from_gaf_to_required_format(gaf_output) gaf_output.close() prot_list = [] for key in data.keys(): prot_list.append(data[key]["DB_Object_Symbol"]) # Choose proteins based on publications new_data = gothresher.choose_proteins_based_on_publications(data, 50, None) new_prot_list = [] for key in new_data.keys(): new_prot_list.append(new_data[key]["DB_Object_Symbol"]) # Count proteins prot_count = gothresher.count_proteins(data) # GO terms frequency go_freq = gothresher.freq_go_term(data)