Context : Time-dependent gas-grain chemistry can help us understand the layered structure of species deposited onto the surface of grains during the lifetime of a protoplanetary disk . The history of trapping large quantities of carbon- and oxygen-bearing molecules onto the grains is especially significant for the formation of more complex ( organic ) molecules on the surface of grains . Aims : Among other processes , cosmic ray-induced UV photoprocesses can lead to the efficient formation of OH . Using a more accurate treatment of cosmic ray-gas interactions for disks , we obtain an increased cosmic ray-induced UV photon flux of 3.8 \times 10 ^ { 5 } photons cm ^ { -2 } s ^ { -1 } for a cosmic-ray ionization rate of H _ { 2 } value of 5 \times 10 ^ { -17 } s ^ { -1 } ( compared to previous estimates of 10 ^ { 4 } photons cm ^ { -2 } s ^ { -1 } based on ISM dust properties ) . We explore the role of the enhanced OH abundance on the gas-grain chemistry in the midplane of the disk at 10 AU , which is a plausible location of comet formation . We focus on studying the formation/destruction pathways and timescales of the dominant chemical species . Methods : We solved the chemical rate equations based on a gas-grain chemical network and correcting for the enhanced cosmic ray-induced UV field . This field was estimated from an appropriate treatment of dust properties in a protoplanetary disk , as opposed to previous estimates that assume an ISM-like grain size distribution . We also explored the chemical effects of photodesorption of water ice into OH+H . Results : Near the end of the disk ’ s lifetime our chemical model yields H _ { 2 } O , CO , CO _ { 2 } and CH _ { 4 } ice abundances at 10 AU ( consistent with a midplane density of 10 ^ { 10 } cm ^ { -3 } and a temperature of 20 K ) that are compatible with measurements of the chemical composition of cometary bodies for a [ C/O ] ratio of 0.16 . This comparison puts constraints on the physical conditions in which comets were formed . Conclusions :