Modelling and predicting biogeographical patterns in river networks