The pumpkin, used to light the path for children's trick or treating at Halloween, has been given a new food industry role by Canadian scientists.