A computational approach to discovering the functions of bacterial phytochromes by analysis of homolog distributions