The cp_enr function randomly samples genes if the list is larger than 1500 (this bit).
cp_enr
Replace this function in the script until we start using corescf package
corescf