Biosynthesis of secondary metabolites