Generalized Representation of Metabolic and Regulatory Pathways