Farts are made up mainly of hydrogen, methane, nitrogen, oxygen and carbon dioxide. It's not methane that is responsible for the smell, though, but a minor ingredient called hydrogen sulphide. This is given off when sulphur-rich foods - such as cabbage, eggs and meat - makes it past your small intestine and into the large intestine, where bacteria devour them, emitting the smelly gas as a waste product.
A typical emission might be laced with anywhere between 0.001 and 1 part per million (ppm) of hydrogen sulphide. But that's all that is needed to make noses curl. The gas becomes toxic (causing eye irritation) at 4ppm - while any concentration above 300ppm is deadly: the sulphur in the gas irritates the lungs, causing fluid build-up that prevents breathing, literally drowning the victim in their own secretions - a condition known as pulmonary edema.
Levels this high can accumulate in sewer gas (generated by rotting organic matter), for example in drainage systems that are not sufficiently ventilated. So deadly is it at high doses that hydrogen sulphide was used as a chemical weapon by the British army during the First World War.
While we're on the subject, baked beans actually have a relatively low sulphur content, and so - while they tend to boost the fart count - the gas produced isn't especially smelly. Beans are rich in a kind of sugar that humans are incapable of digesting, but which large-intestine bacteria lap up, causing them to pump out all those gases that cause wind.
London lad, loving life and all that it has to offer.