1. n. 
The physical, chemical or biological alteration of sediments into sedimentary rock at relatively low temperatures and pressures that can result in changes to the rock's original mineralogy and texture. After deposition, sediments are compacted as they are buried beneath successive layers of sediment and cemented by minerals that precipitate from solution. Grains of sediment, rock fragments and fossils can be replaced by other minerals during diagenesis. Porosity usually decreases during diagenesis, except in rare cases such as dissolution of minerals and dolomitization. Diagenesis does not include weathering processes. Hydrocarbon generation begins during diagenesis. There is not a clear, accepted distinction between diagenesis and metamorphism, although metamorphism occurs at pressures and temperatures higher than those of the outer crust, where diagenesis occurs.
2. n. 
The initial stage of alteration of sediments and maturation of kerogen that occurs at temperatures less than 50°C [122°F]. The type of hydrocarbon generated depends on the type of organic matter in the kerogen, the amount of time that passes, and the ambient temperature and pressure. During early diagenesis, microbial activity is a key contributor to the breakdown of organic matter and generally results in production of biogenic gas. Longer exposure to higher temperatures during diagenesis, catagenesis, and metagenesis generally results in transformation of the kerogen into liquid hydrocarbons and hydrocarbon gases.