Operads on graphs: extending the pre-Lie operad and general construction