De novo and haplotype assembly of polyploid genomes