Kyoto Encylopedia of Genes and Genomes (KEGG) NetworkX Topological parser automates downloading, parsing, and converting from a KEGG Markup Language File to a TSV file that is usable in network analyses.
Modularize code into functions that are easy to debug and reuse
Create an object to better organize and maintain methods and properties used during parsing KGML (object-oriented Programming)
Replace unnecessary deep nested if-else statements in deciding what code to run with different combinations of options with wrapper function handling options automatically
Unify "genes" and "mixed" functionality under one parser object and keep the original usage by wrapper functions
All functionality should be exactly the same as before, with only the change to using compound KEGG name+entry ID (e.g. cpd:C00022-102) instead of just entry ID (e.g. 102) for better output format.
Refactor code by modularity and encapsulation.