Inference of haplotypic phase and missing genotypes in polyploid organisms and variable copy number genomic regions