code: def minimac_X(mm, chr, vcffile, opts):
      
      pf = vcffile.rsplit(".", 1)[0]
      ranges = [(1, 2699519), (2699520, 154931043), (154931044, 155270560)]
      tags = ["PAR1", "NONPAR", "PAR2"]
      Xvcf = []
      phasedfiles = []
      for tag, (start, end) in zip(tags, ranges):
          recodefile = pf + "_{0}.recode.vcf".format(tag)
          cmd = "vcftools --vcf {0} --out {1}_{2}".format(vcffile, pf, tag)
          cmd += " --chr X --from-bp {0} --to-bp {1} --recode".format(start, end)
          mm.add(vcffile, recodefile, cmd)
  
          phasedfile = shapeit_phasing(mm, chr + "_{0}".format(tag), recodefile, opts)
          phasedfiles.append(phasedfile)
  
      pars = [x for x in phasedfiles if "_PAR" in x]
      parfile = pf + "_PAR.recode.phased.vcf"
      nonparfile = pf + "_NONPAR.recode.phased.vcf"
      cmd = "vcf-concat {0} > {1}".format(" ".join(pars), parfile)
      mm.add(pars, parfile, cmd)
  
      for phasedfile in (parfile, nonparfile):
          outvcf = minimac_autosome(mm, chr, phasedfile, opts, phasing=False)
          Xvcf.append(outvcf)
  
      minimacvcf = pf + ".minimac.dose.vcf"
      cmd = "vcf-concat {0} | vcf-sort -c > {1}".format(" ".join(Xvcf), minimacvcf)
      mm.add(Xvcf, minimacvcf, cmd)
docs: See details here:
      http://genome.sph.umich.edu/wiki/Minimac3_Cookbook_:_Chromosome_X_Imputation