╭───────────────────── Traceback (most recent call last) ─────────────────────╮ │ /home/shared/philharmonic/philharmonic/generate_candidates.py:47 in main │ │ │ │ 44 │ │ │ 45 │ # Create list of filtered GO terms │ │ 46 │ if go_filter is not None: │ │ ❱ 47 │ │ allowed_proteins = filter_proteins_GO( │ │ 48 │ │ │ protein_names, go_filter, go_map, go_database │ │ 49 │ │ ) │ │ 50 │ │ logger.info( │ │ │ │ ╭──────────────────────────────── locals ─────────────────────────────────╮ │ │ │ go_database = '/home/shared/16TB_HDD_01/sr320/github/timeseries… │ │ │ │ go_filter = '/home/shared/16TB_HDD_01/sr320/github/timeseries… │ │ │ │ go_map = '/home/shared/16TB_HDD_01/sr320/github/timeseries… │ │ │ │ output = PosixPath('/home/shared/16TB_HDD_01/sr320/github/… │ │ │ │ paircount = -1 │ │ │ │ protein_names = [ │ │ │ │ │ 'FUN_000001-T1', │ │ │ │ │ 'FUN_000002-T1', │ │ │ │ │ 'FUN_000003-T1', │ │ │ │ │ 'FUN_000004-T1', │ │ │ │ │ 'FUN_000005-T1', │ │ │ │ │ 'FUN_000006-T1', │ │ │ │ │ 'FUN_000007-T1', │ │ │ │ │ 'FUN_000008-T1', │ │ │ │ │ 'FUN_000009-T1', │ │ │ │ │ 'FUN_000010-T1', │ │ │ │ │ ... +40511 │ │ │ │ ] │ │ │ │ seed = 42 │ │ │ │ seq_out = PosixPath('/home/shared/16TB_HDD_01/sr320/github/… │ │ │ │ sequence_file_path = PosixPath('/home/shared/16TB_HDD_01/sr320/github/… │ │ │ │ sequences = { │ │ │ │ │ 'FUN_000001-T1': │ │ │ │ SeqRecord(seq=Seq('MMPQGYKNALPGYKDLYLSQAITEEVHNMF… │ │ │ │ id='FUN_000001-T1', name='FUN_000001-T1', │ │ │ │ description='FUN_000001-T1 FUN_000001', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000002-T1': │ │ │ │ SeqRecord(seq=Seq('MAFVRLPRPLLDEFITLWDQVQSISPTLPE… │ │ │ │ id='FUN_000002-T1', name='FUN_000002-T1', │ │ │ │ description='FUN_000002-T1 FUN_000002', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000003-T1': │ │ │ │ SeqRecord(seq=Seq('MSNFSIKSEDEPASPLVRTDKNEELPTIPQ… │ │ │ │ id='FUN_000003-T1', name='FUN_000003-T1', │ │ │ │ description='FUN_000003-T1 FUN_000003', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000004-T1': │ │ │ │ SeqRecord(seq=Seq('MLIFNRGELLFLPIRNVLCMMPQGYKNALP… │ │ │ │ id='FUN_000004-T1', name='FUN_000004-T1', │ │ │ │ description='FUN_000004-T1 FUN_000004', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000005-T1': │ │ │ │ SeqRecord(seq=Seq('MAFVRLPRPLLDEFITLWDQVQSISPTLPE… │ │ │ │ id='FUN_000005-T1', name='FUN_000005-T1', │ │ │ │ description='FUN_000005-T1 FUN_000005', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000006-T1': │ │ │ │ SeqRecord(seq=Seq('MSNFSIKSEDEPASPLVRTDKNEELPRIPQ… │ │ │ │ id='FUN_000006-T1', name='FUN_000006-T1', │ │ │ │ description='FUN_000006-T1 FUN_000006', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000007-T1': │ │ │ │ SeqRecord(seq=Seq('MMFGEWLELGKIPMVKKKLLENYTKPSNRD… │ │ │ │ id='FUN_000007-T1', name='FUN_000007-T1', │ │ │ │ description='FUN_000007-T1 FUN_000007', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000008-T1': │ │ │ │ SeqRecord(seq=Seq('MLKQLCSQETTRTAARNHLAQHLPGMEPQF… │ │ │ │ id='FUN_000008-T1', name='FUN_000008-T1', │ │ │ │ description='FUN_000008-T1 FUN_000008', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000009-T1': │ │ │ │ SeqRecord(seq=Seq('MKRCFVLLRFCDPLKVPRPNVQRVLEGSGR… │ │ │ │ id='FUN_000009-T1', name='FUN_000009-T1', │ │ │ │ description='FUN_000009-T1 FUN_000009', │ │ │ │ dbxrefs=[]), │ │ │ │ │ 'FUN_000010-T1': │ │ │ │ SeqRecord(seq=Seq('MPFPRSVVLHFPAEVHKTQGVSDVAPQLLR… │ │ │ │ id='FUN_000010-T1', name='FUN_000010-T1', │ │ │ │ description='FUN_000010-T1 FUN_000010', │ │ │ │ dbxrefs=[]), │ │ │ │ │ ... +40511 │ │ │ │ } │ │ │ ╰─────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/shared/philharmonic/philharmonic/utils.py:257 in filter_proteins_GO │ │ │ │ 254 │ │ # Get children of allowed GO terms │ │ 255 │ │ allowed_go_initial = [line.strip() for line in f] │ │ 256 │ │ allowed_go = set( │ │ ❱ 257 │ │ │ [i[0] for i in subset_GO_graph(go_database_f, allowed_go_ │ │ 258 │ │ ) │ │ 259 │ │ │ │ 260 │ │ # Filter proteins by GO terms │ │ │ │ ╭──────────────────────────────── locals ─────────────────────────────────╮ │ │ │ allowed_go_initial = [ │ │ │ │ │ '# --- Interaction / Communication ---', │ │ │ │ │ 'GO:0098754 # detoxification', │ │ │ │ │ 'GO:0098542 # defense response to other │ │ │ │ organism', │ │ │ │ │ 'GO:0050886 # endocrine process', │ │ │ │ │ 'GO:0050877 # nervous system process', │ │ │ │ │ 'GO:0048870 # cell motility', │ │ │ │ │ 'GO:0042060 # wound healing', │ │ │ │ │ 'GO:0023052 # signaling', │ │ │ │ │ 'GO:0022600 # digestive system process', │ │ │ │ │ '', │ │ │ │ │ ... +27 │ │ │ │ ] │ │ │ │ f = <_io.TextIOWrapper │ │ │ │ name='/home/shared/16TB_HDD_01/sr320/github/times… │ │ │ │ mode='r' encoding='UTF-8'> │ │ │ │ go_database_f = '/home/shared/16TB_HDD_01/sr320/github/timeseries… │ │ │ │ go_filter_f = '/home/shared/16TB_HDD_01/sr320/github/timeseries… │ │ │ │ go_map_f = '/home/shared/16TB_HDD_01/sr320/github/timeseries… │ │ │ │ proteins = [ │ │ │ │ │ 'FUN_000001-T1', │ │ │ │ │ 'FUN_000002-T1', │ │ │ │ │ 'FUN_000003-T1', │ │ │ │ │ 'FUN_000004-T1', │ │ │ │ │ 'FUN_000005-T1', │ │ │ │ │ 'FUN_000006-T1', │ │ │ │ │ 'FUN_000007-T1', │ │ │ │ │ 'FUN_000008-T1', │ │ │ │ │ 'FUN_000009-T1', │ │ │ │ │ 'FUN_000010-T1', │ │ │ │ │ ... +40511 │ │ │ │ ] │ │ │ ╰─────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/shared/philharmonic/philharmonic/utils.py:201 in subset_GO_graph │ │ │ │ 198 │ │ │ 199 │ go_subset = [] │ │ 200 │ for c in visited_go_terms: │ │ ❱ 201 │ │ go_subset.append((c, go2desc[c][0], go2desc[c][1], ";".join(g │ │ 202 │ │ │ 203 │ return sorted(go_subset) │ │ 204 │ │ │ │ ╭──────────────────────────────── locals ─────────────────────────────────╮ │ │ │ c = '' │ │ │ │ c1 = 'GO:0061007 # hepaticobiliary system process' │ │ │ │ go2children = defaultdict(, { │ │ │ │ │ 'GO:0048308': [ │ │ │ │ │ │ 'GO:0000001', │ │ │ │ │ │ 'GO:0000011', │ │ │ │ │ │ 'GO:0009665', │ │ │ │ │ │ 'GO:0045033', │ │ │ │ │ │ 'GO:0048309', │ │ │ │ │ │ 'GO:0048313' │ │ │ │ │ ], │ │ │ │ │ 'GO:0048311': [ │ │ │ │ │ │ 'GO:0000001', │ │ │ │ │ │ 'GO:0048312', │ │ │ │ │ │ 'GO:0160040' │ │ │ │ │ ], │ │ │ │ │ 'GO:0005385': [ │ │ │ │ │ │ 'GO:0000006', │ │ │ │ │ │ 'GO:0000007', │ │ │ │ │ │ 'GO:0015633', │ │ │ │ │ │ 'GO:0016463', │ │ │ │ │ │ 'GO:0022883', │ │ │ │ │ │ 'GO:0140412', │ │ │ │ │ │ 'GO:0140826' │ │ │ │ │ ], │ │ │ │ │ 'GO:0000030': [ │ │ │ │ │ │ 'GO:0000009', │ │ │ │ │ │ 'GO:0000026', │ │ │ │ │ │ 'GO:0000033', │ │ │ │ │ │ 'GO:0004169', │ │ │ │ │ │ 'GO:0004376', │ │ │ │ │ │ 'GO:0004582', │ │ │ │ │ │ 'GO:0016438', │ │ │ │ │ │ 'GO:0019187', │ │ │ │ │ │ 'GO:0047252', │ │ │ │ │ │ 'GO:0047264', │ │ │ │ │ │ ... +4 │ │ │ │ │ ], │ │ │ │ │ 'GO:0120531': [ │ │ │ │ │ │ 'GO:0000010', │ │ │ │ │ │ 'GO:0004161', │ │ │ │ │ │ 'GO:0004311', │ │ │ │ │ │ 'GO:0004337', │ │ │ │ │ │ 'GO:0036423', │ │ │ │ │ │ 'GO:0044687', │ │ │ │ │ │ 'GO:0045547', │ │ │ │ │ │ 'GO:0047863', │ │ │ │ │ │ 'GO:0050267', │ │ │ │ │ │ 'GO:0052922', │ │ │ │ │ │ ... +5 │ │ │ │ │ ], │ │ │ │ │ 'GO:0007033': [ │ │ │ │ │ │ 'GO:0000011', │ │ │ │ │ │ 'GO:0033298', │ │ │ │ │ │ 'GO:0060036', │ │ │ │ │ │ 'GO:0080171', │ │ │ │ │ │ 'GO:0097576', │ │ │ │ │ │ 'GO:1905037', │ │ │ │ │ │ 'GO:1990019' │ │ │ │ │ ], │ │ │ │ │ 'GO:0006281': [ │ │ │ │ │ │ 'GO:0000012', │ │ │ │ │ │ 'GO:0000725', │ │ │ │ │ │ 'GO:0006284', │ │ │ │ │ │ 'GO:0006289', │ │ │ │ │ │ 'GO:0006290', │ │ │ │ │ │ 'GO:0006298', │ │ │ │ │ │ 'GO:0006301', │ │ │ │ │ │ 'GO:0006302', │ │ │ │ │ │ 'GO:0006307', │ │ │ │ │ │ 'GO:0010213', │ │ │ │ │ │ ... +7 │ │ │ │ │ ], │ │ │ │ │ 'GO:0004520': [ │ │ │ │ │ │ 'GO:0000014', │ │ │ │ │ │ 'GO:0003906', │ │ │ │ │ │ 'GO:0009381', │ │ │ │ │ │ 'GO:0015666', │ │ │ │ │ │ 'GO:0016888', │ │ │ │ │ │ 'GO:0016889', │ │ │ │ │ │ 'GO:0033892', │ │ │ │ │ │ 'GO:0043765', │ │ │ │ │ │ 'GO:0044824', │ │ │ │ │ │ 'GO:0048256', │ │ │ │ │ │ ... +1 │ │ │ │ │ ], │ │ │ │ │ 'GO:0016788': [ │ │ │ │ │ │ 'GO:0000014', │ │ │ │ │ │ 'GO:0000171', │ │ │ │ │ │ 'GO:0004527', │ │ │ │ │ │ 'GO:0008484', │ │ │ │ │ │ 'GO:0008849', │ │ │ │ │ │ 'GO:0009381', │ │ │ │ │ │ 'GO:0015666', │ │ │ │ │ │ 'GO:0016298', │ │ │ │ │ │ 'GO:0016790', │ │ │ │ │ │ 'GO:0016888', │ │ │ │ │ │ ... +12 │ │ │ │ │ ], │ │ │ │ │ 'GO:1902494': [ │ │ │ │ │ │ 'GO:0000015', │ │ │ │ │ │ 'GO:0000118', │ │ │ │ │ │ 'GO:0005601', │ │ │ │ │ │ 'GO:0005697', │ │ │ │ │ │ 'GO:0005835', │ │ │ │ │ │ 'GO:0005839', │ │ │ │ │ │ 'GO:0005950', │ │ │ │ │ │ 'GO:0005951', │ │ │ │ │ │ 'GO:0005954', │ │ │ │ │ │ 'GO:0008074', │ │ │ │ │ │ ... +109 │ │ │ │ │ ], │ │ │ │ │ ... +14749 │ │ │ │ }) │ │ │ │ go2desc = { │ │ │ │ │ 'GO:0000001': ( │ │ │ │ │ │ 'biological_process', │ │ │ │ │ │ 'mitochondrion inheritance' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000002': ( │ │ │ │ │ │ 'biological_process', │ │ │ │ │ │ 'obsolete mitochondrial genome maintenance' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000003': ( │ │ │ │ │ │ 'biological_process', │ │ │ │ │ │ 'obsolete reproduction' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000005': ( │ │ │ │ │ │ 'molecular_function', │ │ │ │ │ │ 'obsolete ribosomal chaperone activity' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000006': ( │ │ │ │ │ │ 'molecular_function', │ │ │ │ │ │ 'high-affinity zinc transmembrane │ │ │ │ transporter activity' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000007': ( │ │ │ │ │ │ 'molecular_function', │ │ │ │ │ │ 'low-affinity zinc ion transmembrane │ │ │ │ transporter activity' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000008': ( │ │ │ │ │ │ 'molecular_function', │ │ │ │ │ │ 'obsolete thioredoxin' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000009': ( │ │ │ │ │ │ 'molecular_function', │ │ │ │ │ │ 'alpha-1,6-mannosyltransferase activity' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000010': ( │ │ │ │ │ │ 'molecular_function', │ │ │ │ │ │ 'heptaprenyl diphosphate synthase activity' │ │ │ │ │ ), │ │ │ │ │ 'GO:0000011': ( │ │ │ │ │ │ 'biological_process', │ │ │ │ │ │ 'vacuole inheritance' │ │ │ │ │ ), │ │ │ │ │ ... +48155 │ │ │ │ } │ │ │ │ go_graph_file = '/home/shared/16TB_HDD_01/sr320/github/timeseries_… │ │ │ │ go_included_terms = [ │ │ │ │ │ '# --- Interaction / Communication ---', │ │ │ │ │ 'GO:0098754 # detoxification', │ │ │ │ │ 'GO:0098542 # defense response to other │ │ │ │ organism', │ │ │ │ │ 'GO:0050886 # endocrine process', │ │ │ │ │ 'GO:0050877 # nervous system process', │ │ │ │ │ 'GO:0048870 # cell motility', │ │ │ │ │ 'GO:0042060 # wound healing', │ │ │ │ │ 'GO:0023052 # signaling', │ │ │ │ │ 'GO:0022600 # digestive system process', │ │ │ │ │ '', │ │ │ │ │ ... +27 │ │ │ │ ] │ │ │ │ go_subset = [] │ │ │ │ visited_go_terms = { │ │ │ │ │ '', │ │ │ │ │ 'GO:0048870 # cell motility', │ │ │ │ │ 'GO:0061007 # hepaticobiliary system │ │ │ │ process', │ │ │ │ │ 'GO:0022600 # digestive system process', │ │ │ │ │ '# --- Immunity & Specialized Responses ---', │ │ │ │ │ 'GO:0003013 # circulatory system process', │ │ │ │ │ '# --- Interaction / Communication ---', │ │ │ │ │ 'GO:0071941 # nitrogen cycle metabolic │ │ │ │ process', │ │ │ │ │ 'GO:1901135 # carbohydrate derivative │ │ │ │ metabolic process', │ │ │ │ │ 'GO:0015979 # photosynthesis', │ │ │ │ │ ... +25 │ │ │ │ } │ │ │ ╰─────────────────────────────────────────────────────────────────────────╯ │ ╰─────────────────────────────────────────────────────────────────────────────╯ KeyError: ''