Detecting recombination and its mechanistic association with genomic features via statistical models