Metabolic network analysis using convex optimization