╭─────────────────────────────── 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_molecular/D-Apul/out… │ │ │ │ go_filter = 'assets/go_filter.txt' │ │ │ │ go_map = '/home/shared/16TB_HDD_01/sr320/github/timeseries_molecular/D-Apul/out… │ │ │ │ output = PosixPath('/home/shared/16TB_HDD_01/sr320/github/timeseries_molecular/… │ │ │ │ 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/timeseries_molecular/… │ │ │ │ sequence_file_path = PosixPath('/home/shared/16TB_HDD_01/sr320/github/timeseries_molecular/… │ │ │ │ sequences = { │ │ │ │ │ 'FUN_000001-T1': │ │ │ │ SeqRecord(seq=Seq('MMPQGYKNALPGYKDLYLSQAITEEVHNMFSTGIDCGVSSFKHGPSLSLLA… │ │ │ │ id='FUN_000001-T1', name='FUN_000001-T1', description='FUN_000001-T1 │ │ │ │ FUN_000001', dbxrefs=[]), │ │ │ │ │ 'FUN_000002-T1': │ │ │ │ SeqRecord(seq=Seq('MAFVRLPRPLLDEFITLWDQVQSISPTLPEQARHLIHRVDDKVAEIRSQAS… │ │ │ │ id='FUN_000002-T1', name='FUN_000002-T1', description='FUN_000002-T1 │ │ │ │ FUN_000002', dbxrefs=[]), │ │ │ │ │ 'FUN_000003-T1': │ │ │ │ SeqRecord(seq=Seq('MSNFSIKSEDEPASPLVRTDKNEELPTIPQAFRKLKECYCNCSWGDSLHAD… │ │ │ │ id='FUN_000003-T1', name='FUN_000003-T1', description='FUN_000003-T1 │ │ │ │ FUN_000003', dbxrefs=[]), │ │ │ │ │ 'FUN_000004-T1': │ │ │ │ SeqRecord(seq=Seq('MLIFNRGELLFLPIRNVLCMMPQGYKNALPGYKDLYLSQAITEEVHNMFST… │ │ │ │ id='FUN_000004-T1', name='FUN_000004-T1', description='FUN_000004-T1 │ │ │ │ FUN_000004', dbxrefs=[]), │ │ │ │ │ 'FUN_000005-T1': │ │ │ │ SeqRecord(seq=Seq('MAFVRLPRPLLDEFITLWDQVQSISPTLPEQARHLIHRVDDKVAEIRSQAS… │ │ │ │ id='FUN_000005-T1', name='FUN_000005-T1', description='FUN_000005-T1 │ │ │ │ FUN_000005', dbxrefs=[]), │ │ │ │ │ 'FUN_000006-T1': │ │ │ │ SeqRecord(seq=Seq('MSNFSIKSEDEPASPLVRTDKNEELPRIPQAFRKLKECYCNCSWGDSLHAD… │ │ │ │ id='FUN_000006-T1', name='FUN_000006-T1', description='FUN_000006-T1 │ │ │ │ FUN_000006', dbxrefs=[]), │ │ │ │ │ 'FUN_000007-T1': │ │ │ │ SeqRecord(seq=Seq('MMFGEWLELGKIPMVKKKLLENYTKPSNRDCSWLSNRHFQIGEFMSTCIKE… │ │ │ │ id='FUN_000007-T1', name='FUN_000007-T1', description='FUN_000007-T1 │ │ │ │ FUN_000007', dbxrefs=[]), │ │ │ │ │ 'FUN_000008-T1': │ │ │ │ SeqRecord(seq=Seq('MLKQLCSQETTRTAARNHLAQHLPGMEPQFGMYIDIQRSNQGEGYQTVRTG… │ │ │ │ id='FUN_000008-T1', name='FUN_000008-T1', description='FUN_000008-T1 │ │ │ │ FUN_000008', dbxrefs=[]), │ │ │ │ │ 'FUN_000009-T1': │ │ │ │ SeqRecord(seq=Seq('MKRCFVLLRFCDPLKVPRPNVQRVLEGSGRCKELEFLNNSTASAIQELLSA… │ │ │ │ id='FUN_000009-T1', name='FUN_000009-T1', description='FUN_000009-T1 │ │ │ │ FUN_000009', dbxrefs=[]), │ │ │ │ │ 'FUN_000010-T1': │ │ │ │ SeqRecord(seq=Seq('MPFPRSVVLHFPAEVHKTQGVSDVAPQLLRSLDAHKIEAVQFLRSGRVRVT… │ │ │ │ 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_initial)] │ │ 258 │ │ ) │ │ 259 │ │ │ │ 260 │ │ # Filter proteins by GO terms │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ allowed_go_initial = [ │ │ │ │ │ '# --- Environmental / Stress response ---', │ │ │ │ │ 'GO:0006950 # response to stress', │ │ │ │ │ 'GO:0006979 # response to oxidative stress', │ │ │ │ │ 'GO:0070887 # cellular response to chemical stimulus', │ │ │ │ │ 'GO:0009414 # response to water deprivation', │ │ │ │ │ 'GO:0009408 # response to heat', │ │ │ │ │ 'GO:0009416 # response to light stimulus', │ │ │ │ │ 'GO:0009628 # response to abiotic stimulus', │ │ │ │ │ 'GO:0009607 # response to biotic stimulus', │ │ │ │ │ '', │ │ │ │ │ ... +16 │ │ │ │ ] │ │ │ │ f = <_io.TextIOWrapper name='assets/go_filter.txt' mode='r' │ │ │ │ encoding='UTF-8'> │ │ │ │ go_database_f = '/home/shared/16TB_HDD_01/sr320/github/timeseries_molecular/D-Apul/out… │ │ │ │ go_filter_f = 'assets/go_filter.txt' │ │ │ │ go_map_f = '/home/shared/16TB_HDD_01/sr320/github/timeseries_molecular/D-Apul/out… │ │ │ │ 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(go2children[c]))) │ │ 202 │ │ │ 203 │ return sorted(go_subset) │ │ 204 │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ c = '' │ │ │ │ c1 = 'GO:0031047 # gene silencing by RNA' │ │ │ │ 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 │ │ │ │ │ ], │ │ │ │ │ ... +14739 │ │ │ │ }) │ │ │ │ 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_molecular/D-Apul/outp… │ │ │ │ go_included_terms = [ │ │ │ │ │ '# --- Environmental / Stress response ---', │ │ │ │ │ 'GO:0006950 # response to stress', │ │ │ │ │ 'GO:0006979 # response to oxidative stress', │ │ │ │ │ 'GO:0070887 # cellular response to chemical stimulus', │ │ │ │ │ 'GO:0009414 # response to water deprivation', │ │ │ │ │ 'GO:0009408 # response to heat', │ │ │ │ │ 'GO:0009416 # response to light stimulus', │ │ │ │ │ 'GO:0009628 # response to abiotic stimulus', │ │ │ │ │ 'GO:0009607 # response to biotic stimulus', │ │ │ │ │ '', │ │ │ │ │ ... +16 │ │ │ │ ] │ │ │ │ go_subset = [] │ │ │ │ visited_go_terms = { │ │ │ │ │ '', │ │ │ │ │ 'GO:0009414 # response to water deprivation', │ │ │ │ │ 'GO:0022414 # reproductive process', │ │ │ │ │ 'GO:0000003 # reproduction', │ │ │ │ │ 'GO:0006979 # response to oxidative stress', │ │ │ │ │ 'GO:0009566 # fertilization', │ │ │ │ │ 'GO:0031047 # gene silencing by RNA', │ │ │ │ │ 'GO:0009607 # response to biotic stimulus', │ │ │ │ │ 'GO:0006306 # DNA methylation', │ │ │ │ │ '# --- Epigenetic processes ---', │ │ │ │ │ ... +15 │ │ │ │ } │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ KeyError: ''