def createGenderPlot(bfile, intensities, problematic_samples, format,
                     out_prefix):
    """Creates the gender plot.

    :param bfile: the prefix of the input binary file.
    :param intensities: the file containing the intensities.
    :param problematic_samples: the file containing the problematic samples.
    :param format: the format of the output plot.
    :param out_prefix: the prefix of the output file.

    :type bfile: str
    :type intensities: str
    :type problematic_samples: str
    :type format: str
    :type out_prefix: str

    Creates the gender plot of the samples using the
    :py:mod:`pyGenClean.SexCheck.gender_plot` module.

    """
    gender_plot_options = ["--bfile", bfile, "--intensities", intensities,
                           "--sex-problems", problematic_samples, "--format",
                           format, "--out", out_prefix]
    try:
        gender_plot.main(gender_plot_options)
    except gender_plot.ProgramError as e:
        msg = "gender plot: {}".format(e)
        raise ProgramError(msg)