merenlab/anvio

KeyError: 'modelseed_reaction_id'

Closed this issue · 3 comments

Short description of the problem

Not able to run anvi-self-test --suite metabolism -T 10 sucessfully

anvi'o version

anvi-self-test --version

$ anvi-self-test --version
Anvi'o .......................................: marie (v8)
Python .......................................: 3.10.15

Profile database .............................: 38
Contigs database .............................: 21
Pan database .................................: 16
Genome data storage ..........................: 7
Auxiliary data storage .......................: 2
Structure database ...........................: 2
Metabolic modules database ...................: 4
tRNA-seq database ............................: 2

System info

uname -a
Linux manish-Precision-3660 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
I installed anvi'o via conda and every other test is working fine.

Files / commands to reproduce the issue

anvi-self-test --suite metabolism

:: Setting up the ModelSEED Biochemistry database ...

ModelSEED database version (git commit hash) .: 194ac8afe48f8a606c0dd07ba3c7af10c02ba2fd
Reorganized ModelSEED reactions table ........: /tmp/tmp.eDJmEfQsDl/MODELSEED/reactions.tsv
Reorganized ModelSEED compounds table ........: /tmp/tmp.eDJmEfQsDl/MODELSEED/compounds.tsv

:: Storing a metabolic reaction network ...

  • A reaction network will be made from protein orthology annotations in the
    contigs database.
    Contigs database .............................: B_thetaiotamicron_VPI-5482.db
  • Certain genes matched KOs that were not found in the KO database. It could be
    that the KOfams used to annotate genes were not from the same KEGG database
    version as the KO files. Here are the unrecognized KO IDs from the contigs
    database: K06949, K02939, K00525, K01613, K03561, K07075, K09702, K07115,
    K12524, K07317, K03832, K11749, K11991, K03205, K03775, K02495, K00057,
    K00651, K18234, K17103, K00053, K04744, K00287, K07729, K07098, K01951,
    K01206, K02860, K06384, K03559, K02337, K08169, K14742, K22390, K07460,
    K01710, K12340, K25314, K03648, K00800, K14652, K00790, K00970, K16870,
    K03924, K00949, K02838, K07149, K07165, K09955, K01448, K01676, K04068,
    K06131, K00031, K13663, K02963, K00812, K21572, K03710, K02355, K03088,
    K01847, K21573, K00973, K04485, K03671, K03665, K03442, K02990, K00942,
    K01447, K01687, K02013, K05595, K07343, K13652, K18707, K03327, K00969,
    K01652, K02429, K01653, K00029, K21636, K01733, K01914, K06925, K11068,
    K02014, K03524, K24847, K18138, K00560, K00986, K07025, K00945, K01246,
    K01736, K01734, K03527, K15635, K03719, K03718, K09816, K18954, K01424,
    K02313, K00262, K01633, K03781, K07493, K07487, K03811, K03152, K07095,
    K00705, K07056, K03797, K11392, K00937, K07137, K02067, K00857, K02517,
    K07484, K01740, K07133, K00099, K09903, K01807, K01190, K04567, K07052,
    K07091, K07085, K03585, K03340, K07318, K07495, K07497, K00850, K03424,
    K03550, K01810, K26288, K06158, K03169, K12257, K00243, K02864, K00929,
    K02906, K22397, K01610, K02481, K02867, K02907, K12267, K01991, K01588,
    K02863, K01198, K12132, K09704, K19265, K02876, K00640, K00683, K00873,
    K02527, K01548, K02874, K24119, K07059, K18353, K02040, K01207, K02242,
    K02518, K07407, K18367, K02437, K03073, K20866, K00962, K02965, K07148,
    K16694, K19997, K03307, K01262, K02970, K01712, K01060, K25307, K02948,
    K01500, K00971, K01887, K09808, K02961, K01265, K02988, K16692, K03076,
    K01885, K02426, K05349, K04095, K02238, K03324, K03046, K02358, K07221,
    K04066, K07037, K02601, K02952, K02946, K01297, K20265, K01726, K02950,
    K00174, K03092, K07791, K00798, K02986, K02992, K00175, K02004, K07391,
    K01092, K20074, K01284, K02982, K00603, K03530, K12373, K03040, K01468,
    K02834, K01534, K02954, K02956, K13683, K02003, K03296, K09022, K07231,
    K03043, K06113, K00588, K03526, K02994, K01251, K05989, K01785, K00666,
    K19294, K02878, K07727, K01183, K04763, K02886, K02892, K01425, K02851,
    K02879, K07646, K02931, K02919, K19693, K12063, K01745, K02933, K00856,
    K03387, K01547, K01235, K02884, K02890, K07240, K03543, K01546, K02926,
    K01744, K02503, K02881, K02895, K07053, K03786, K11383, K25026, K00852,
    K03624, K03168, K02935, K00844, K06207, K11753, K06975, K07114, K21064,
    K03979, K01200, K18369, K07507, K01176, K16345, K03210, K07076, K03827,
    K15923, K18581, K01205, K09922, K03770, K00537, K06970, K18555, K00859,
    K14623, K00656, K00939, K07071, K00290, K03564, K16052, K03305, K10026,
    K04047, K03310, K07404, K23997, K18929, K03306, K00784, K21574, K02346,
    K03070, K20509, K18928, K02551, K21571, K01689, K03075, K04069, K00757,
    K03699, K17836, K00782, K01661, K04043, K18682, K01258, K03498, K03668,
    K00605, K00981, K21556, K03734, K07220, K00764, K01056, K01915, K03643,
    K03496, K03284, K00558, K08307, K05810, K02945, K03695, K01737, K03281,
    K09790, K14058, K14059, K03525, K11719, K00760, K01873, K01126, K07783,
    K03650, K07486, K23242, K06001, K01752, K01197, K04762, K01154, K10716,
    K00868, K15726, K06941, K02099, K04761, K01619, K02477, K06177, K06188,
    K06201, K15725, K03625, K01224, K03427, K09888, K03553, K19052, K01153,
    K02499, K06199, K07456, K07118, K03975, K01151, K19050, K21900, K02897,
    K02520, K00874, K01808, K01809, K00849, K18330, K01599, K08224, K12308,
    K15894, K07089, K00876, K18331, K07106, K00655, K02687, K00721, K01173,
    K02916, K01990, K01992, K07273, K01950, K01089, K00817, K03271, K00180,
    K00382, K03892, K18691, K01465, K01868, K05367, K03930, K03273, K07001,
    K19824, K06079, K21001, K22736, K22905, K18332, K06871, K00179, K06911,
    K03664, K08679, K03077, K01462, K03315, K06076, K00177, K00956, K00765,
    K01686, K06894, K00957, K03325, K16066, K00176, K01685, K03723, K05970,
    K01082, K02564, K00548, K18139, K07031, K09793, K00013, K00615, K01912,
    K07387, K07082, K00712, K02887, K19068, K01551, K01790, K03839, K01209,
    K00895, K01625, K03741, K07447, K01787, K03816, K00648, K03547, K15669,
    K00067, K03546, K03630, K08363, K02100, K01186, K11381, K01192, K01804,
    K01811, K20742, K06020, K00848, K18785, K00928, K02124, K02483, K01834,
    K01607, K06889, K03978, K00281, K14155, K00652, K08218, K06221, K06143,
    K00254, K05275, K02123, K21063, K00833, K00865, K21908, K01372, K13038,
    K02121, K06187, K03799, K25010, K01818, K13993, K07058, K08223, K06959,
    K00426, K00793, K00036, K16899, K11072, K01711, K00425, K02959, K11070,
    K03501, K09789, K11065, K07175, K10804, K01935, K00346, K02169, K00018,
    K01662, K01886, K04041, K02342, K00347, K15789, K00351, K02036, K00033,
    K08678, K02037, K00350, K17609, K01057, K00349, K09812, K17686, K00639,
    K16649, K00567, K13283, K00348, K19802, K06934, K02005, K02039, K08676,
    K07223, K06897, K03534, K09964, K02038, K01531, K01069, K02574, K11530,
    K00978, K01119, K02377, K00831, K02217, K03686, K11645, K00012, K01709,
    K03687, K01961, K02501, K06997, K01814, K00075, K01586, K03385, K02500,
    K07478, K17680, K11754, K15532, K03218, K01433, K02338, K15876, K11741,
    K11755, K03631, K07735, K06167, K04771, K03744, K07720, K01966, K03801,
    K00688, K07079, K03814, K03616, K00041, K02469, K03617, K01955, K03824,
    K02172, K03615, K03748, K10536, K00645, K02913, K03614, K01956, K12251,
    K13985, K04751, K19271, K03215, K02902, K01006, K01953, K03613, K25181,
    K25180, K03149, K02069, K22391, K02109, K03217, K15460, K02108, K05908,
    K01993, K03612, K01937, K09760, K01658, K03701, K01881, K08325, K05601,
    K03110, K00948, K01303, K25706, K03702, K04079, K05366, K11105, K07029,
    K03313, K03101, K14441, K00554, K07164, K22441, K03100, K00609, K02340,
    K01890, K09758, K01714, K01902, K15977, K12942, K11720, K01241, K01876,
    K10947, K01136, K05807, K00610, K16264, K03696, K01903, K03657, K14698,
    K00606, K01524, K02824, K00941, K02171, K00766, K08138, K00773, K10206,
    K14699, K00820, K06921, K17828, K01079, K09800, K00950, K00788, K01870,
    K01657, K01695, K00979, K00602, K08289, K00600, K01696, K01443, K02823,
    K03320, K01791, K03596, K02111, K03742, K13747, K02110, K03150, K07322,
    K01784, K19334, K18189, K02112, K03973, K01142, K02113, K03437, K15255,
    K03147, K01778, K00700, K03976, K02314, K02472, K00265, K01609, K01812,
    K03208, K06204, K01972, K03803, K03154, K01805, K04564, K02115, K00919,
    K01798, K00337, K03602, K21132, K02871, K18197, K07263, K21065, K00134,
    K06223, K03629, K03601, K01770, K02899, K01823, K08191, K08999, K02536,
    K21472, K07462, K00331, K02888, K09710, K07107, K00330, K07139, K03439,
    K03798, K02486, K06178, K00858, K01923, K00432, K00340, K03113, K07566,
    K09761, K16053, K02967, K00341, K01934, K00343, K03474, K00791, K07405,
    K00024, K02357, K01139, K01893, K00794, K04486, K00384, K01918, K01926,
    K03116, K03499, K03466, K07588, K06872, K01270, K01933, K06880, K06881,
    K04516, K09973, K02775, K00604, K11537, K03655, K01493, K01875, K16363,
    K00940, K03497, K03118, K01051, K02996, K02835, K07568, K08316, K07192,
    K01091, K01278, K01495, K03282, K00748, K07027, K01867, K06885, K01872,
    K00991, K00826, K01735, K03644, K06217, K01815, K01627, K15530, K01579,
    K02528, K08978, K06969, K01803, K01591, K01783, K00338, K13378, K06173,
    K03787, K00661, K00339, K03183, K00677, K03593, K02316, K00266, K06213,
    K09861, K01756, K02078, K01565, K06168, K19049, K25767, K21071, K13821,
    K08998, K07301, K00240, K00241, K01201, K10532, K02335, K06153, K07259,
    K00278, K08156, K00046, K06999, K14379, K03177, K01945, K08961, K09458,
    K11175, K03773, K01738, K02557, K03517, K08641, K01883, K03703, K01869,
    K06041, K07005, K01104, K07560, K04096, K03658, K18898, K22522, K22278,
    K03473, K01719, K03495, K12573, K02614, K00759, K03536, K00215, K25137,
    K05540, K09811, K12410, K01874, K00954, K03332, K01519, K03685, K05592,
    K00789, K09815, K09817, K03490, K05988, K03321, K01866, K13292, K16212,
    K03555, K00077, K06373, K07042, K01802, K22214, K06942, K18979, K01187,
    K03551, K17108, K01940, K05515, K02911, K06381, K09924, K07277, K07713,
    K01000, K06180, K00297, K21575, K01163, K06142, K03589, K03402, K00133,
    K09117, K03572, K00286, K01629, K03771, K01358, K02519, K01776, K02914,
    K03565, K02493, K03558, K03570, K03438, K09774, K09748, K01880, K22719,
    K09013, K23003, K01077, K12976, K20534, K06518, K03925, K06861, K01129,
    K01897, K11717, K14445, K01921, K01925, K15987, K23004, K09014, K02356,
    K09015, K00145, K03470, K23005, K01924, K00806, K00147, K00796, K06330,
    K22721, K05837, K22132, K03654, K11085, K02600, K13043, K19793, K21557,
    K02563, K01929, K15633, K01135, K18672, K09810, K01928, K00762, K03531,
    K01520, K02968, K07386, K02836, K03269, K03308, K02529, K02065, K09939,
    K03569, K00048, K07040, K03568, K02066, K00088, K03595, K03972, K03594,
    K01585, K03584, K03590, K02856, K01191, K01813, K03977, K07126, K00891,
    K01755, K11752, K03587, K00930, K00059, K03544, K07078, K02470, K03545,
    K00931, K00925, K03592, K19302, K03789, K01835, K03575, K16568, K17884,
    K05516, K07102, K01573, K15738, K01759, K03628, K06973, K01952, K00912,
    K07270, K00052, K21739, K01012, K01159, K09459, K03885, K01704, K03270,
    K21055, K11927, K03106, K01277, K02839, K09011, K01673, K01667, K04078,
    K05776, K03111, K03303, K05606, K01892, K02343, K22723, K02395, K01515,
    K01703, K06287, K11089, K01649, K06133, K01489, K00783, K03522, K01889,
    K02371, K21741, K01491, K01095, K06920, K03521, K03737, K00767, K02000,
    K00763, K01858, K04075, K10773, K01130, K00992, K00616, K02001, K19353,
    K10439, K00428, K01939, K13052, K19225, K04077, K08659, K23351, K02837,
    K21750, K00946, K02002, K23999, K21681, K09125, K06996, K00459, K09469,
    K09457, K06200, K03783, K00275, K01624, K21279, K07443, K00927, K01620,
    K04759, K03778, K00259, K03426, K08968, K02909, K04773, K14415, K06950,
    K07481, K00754, K06196, K04084, K14645, K09825, K13566, K03800, K15921,
    K24258, K03651, K01817, K25183, K03328, K13010, K03322, K02847, K15727,
    K21563, K02114, K07636, K01938, K19755, K23012, K14836, K00854, K00019,
    K11621, K16898, K02478, K08364, K03455, K00058, K05591, K13658, K16698,
    K01960, K11069, K00693, K02120, K02118, K02117, K07979, K00226, K12453,
    K03809, K09017, K09807, K02199, K01133, K07282, K07004, K01134, K13012,
    K16702, K23352, K00847, K18997, K03711, K07483, K03248, K01271, K02548,
    K01647, K17450, K10742, K26607, K23980, K19286, K19701, K03298, K20968,
    K23976, K03286, K14213, K01537, K00634, K01580, K20975, K02904, K05808,
    K16868, K00761, K05340, K07506, K15924, K17713, K02622, K00239, K08303,
    K15268, K07733, K00556, K02523, K01138, K00566, K25652, K03469, K03588,
    K19611, K02621, K00010, K00821, K06006, K03768, K02341, K17734, K04518,
    K01840, K00342, K12264, K19172, K00208, K00014, K00703, K00097, K06138,
    K01243, K01843, K07039, K14060, K02361, K02549, K01911
    Traceback (most recent call last):
    File "/home/manish/miniconda3/envs/anvio-8/bin/anvi-reaction-network", line 56, in
    main()
    File "/home/manish/miniconda3/envs/anvio-8/bin/anvi-reaction-network", line 27, in main
    constructor.make_network(contigs_db=args.contigs_db, overwrite_existing_network=args.overwrite_existing_network)
    File "/home/manish/miniconda3/envs/anvio-8/lib/python3.10/site-packages/anvio/biochemistry/reactionnetwork.py", line 1943, in make_network
    network = self.make_contigs_database_network(contigs_db, store=store, overwrite_existing_network=overwrite_existing_network)
    File "/home/manish/miniconda3/envs/anvio-8/lib/python3.10/site-packages/anvio/biochemistry/reactionnetwork.py", line 2332, in make_contigs_database_network
    self._store_contigs_database_reactions(network, contigs_db)
    File "/home/manish/miniconda3/envs/anvio-8/lib/python3.10/site-packages/anvio/biochemistry/reactionnetwork.py", line 2761, in _store_contigs_database_reactions
    reactions_table = pd.DataFrame.from_dict(reactions_data, orient='index').reset_index(drop=True).sort_values('modelseed_reaction_id')
    File "/home/manish/miniconda3/envs/anvio-8/lib/python3.10/site-packages/pandas/core/frame.py", line 7189, in sort_values
    k = self._get_label_or_level_values(by[0], axis=axis)
    File "/home/manish/miniconda3/envs/anvio-8/lib/python3.10/site-packages/pandas/core/generic.py", line 1911, in _get_label_or_level_values
    raise KeyError(key)
    KeyError: 'modelseed_reaction_id'

Config Error: According to the exit code ('1'), anvi'o suspects that something may have gone
wrong while running your tests :/ We hope that the reason is clear to you from
the lines above. But if you don't see anything obvious, and especially if the
test ended up running until the end with reasonable looking final results, you
shouldn't worry too much about this error. Life is short and we all can worry
just a bit less.

Hello!

I think this may be a problem fixed in anvi'o-dev. Can you try installing the development version and rerunning the metabolism test suite? If you want to use reaction networks and KEGG pathway visualizations, you'll want to work with that version anyways.
https://anvio.org/install/

Best,
Sam

Hello!

I think this may be a problem fixed in anvi'o-dev. Can you try installing the development version and rerunning the metabolism test suite? If you want to use reaction networks and KEGG pathway visualizations, you'll want to work with that version anyways. https://anvio.org/install/

Best, Sam

Thanks Sam, I will give a try and then share my experience.

Hello, I successfully installed anvi'o-dev and run the tests , its working. However in anvio-8 it is not working. Thanks. A big thanks to Sam.