Statistical inference of chromosomal homology based on gene colinearity and applications to Arabidopsis and rice