def get_outputs(): if not os.path.isdir('hgt_data/'): os.makedirs('hgt_data/') os.chdir('hgt_data/') kh.output_hits_csv() kh.output_groups() # if __name__ == '__main__': # import sys # os.chdir('/Users/KBLaptop/computation/kvasir/data/output/dutton_genomes2/') # mongo_init('dutton_genomes2') # get_outputs()
def global_distance(species_1, species_2): hits_list = all_by_all(species_1, species_2) hits_distance = [] ssu_distance = None for hit in hits_list: distance = kh.get_gene_distance(str(hit[0]['dna_seq']), str(hit[1]['dna_seq'])) hits_distance.append(distance) if hit[0]['type'] == '16S': ssu_distance = distance return (ssu_distance, hits_distance)