Testing the genetic effects of river networks