def run(self): """ 02-01-06 """ (conn, curs) = db_connect(self.hostname, self.dbname) tax_id = get_tax_id_from_org(curs, self.organism) mt_id2no = get_mt_id2no(curs, self.matrix_table) prom_id2gene_id = self.get_prom_id2gene_id(curs, self.prom_seq_table, self.organism) self.parse_input_fname(curs, self.input_fname, self.p_value_cut_off, prom_id2gene_id, mt_id2no, tax_id, self.output_table) if self.commit: curs.execute("end")
def run(self): """ 09-18-05 09-30-05 way of calling get_mt_id2no() changed get gene_id_dict is a thread now, to speed up """ (conn, curs) = db_connect(self.hostname, self.dbname) tax_id = org2tax_id(self.organism) tax_id_set = Set([tax_id]) get_gene_id_dict_instance = get_gene_id_dict(self.acc_file, tax_id_set) get_gene_id_dict_instance.start() mt_id2no = get_mt_id2no(curs, self.matrix_table) mt_no2matches = self.get_mt_no2matches(curs, self.input_table, self.prom_seq_table, self.top_number, self.organism, mt_id2no) get_gene_id_dict_instance.join() #must wait it to finish before going on, need gene_id_dict self.dump2output_table(curs, self.output_table, mt_no2matches, get_gene_id_dict_instance.gene_id_dict, tax_id) if self.commit: curs.execute("end")