Genome assembly by maximum likelihood