def show_uverskyPlot(
            self,
            label="",
            title="Uversky plot",
            legendOn=True,
            xLim=1,
            yLim=1,
            fontSize=10,
            getFig=False):
        """
        Generates the Uversky phase diagram (hydropathy vs NCPR), places
        this sequence on that plot, and creates it on the screen

        INPUT:
        --------------------------------------------------------------------------------
        label     | A label for the point on the phase diagram
        title     | Plot title (DEFAULT = 'Uversky plot')
        legendOn  | Boolean for if the figure legend should be displayed or not
        xLim      | Max value for the x axis (mean net charge) (DEFAULT = 1)
        yLim      | Max value for the y axis (hydropathy) (DEFAULT = 1)
        fontSize  | Size of font for label (DEFAULT = 10)
        getFig    | Returns a matplotlib figure object instead of simply displaying the
                    plot on the screen (DEFAULT = False)


        OUTPUT:
        --------------------------------------------------------------------------------
        If the argument getFig is False (which it is by default) then the Uversky plot appears on
        the screen. If getFig is set to True then the function returns a matplotlib plt object, which
        can be further manipulated.


        """
        if getFig:
            return plotting.show_single_uverskyPlot(
                self.get_uversky_hydropathy(),
                self.get_mean_net_charge(),
                label,
                title,
                legendOn,
                xLim,
                yLim,
                fontSize,
                getFig)
        else:
            plotting.show_single_uverskyPlot(
                self.get_uversky_hydropathy(),
                self.get_mean_net_charge(),
                label,
                title,
                legendOn,
                xLim,
                yLim,
                fontSize,
                getFig)
Exemple #2
0
def show_single_uverskyPlot(
        hydropathy,
        mean_net_charge,
        label="",
        title="Uversky plot",
        legendOn=True,
        xLim=1,
        yLim=1,
        fontSize=10,
        getFig=False):
    """
    Plots a single sequence on the Uversky plot (hydropathy vs. mean net charge)

    INPUT:
    --------------------------------------------------------------------------------
    hydropathy      | Mean hydropathy for sequence
    mean_net_charge | Absolute magnitude of the protein's net charge divided by sequence length

    label           | On-plot label of sequence (DEFAULT = no label)
    title           | Plot title (DEFAULT = "Uversky plot")
    legendOn        | Include the phase diagram region legend (DEFAULT = True)
    xLim            | Set upper limit for the x axis (DEFAULT = 1)
    yLim            | Set upper limit for the y axis (DEFAULT = 1)
    fontSize        | Set font size for the point labels (DEFAULT = 10)
    getFig          | Returns a matplotlib figure object instead of simply displaying the
                    | plot on the screen (DEFAULT = False)



    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing, but an annotated Uversky plot should be generated on screen

    """

    return plotting.show_single_uverskyPlot(
        hydropathy,
        mean_net_charge,
        label,
        title,
        legendOn,
        xLim,
        yLim,
        fontSize,
        getFig)
Exemple #3
0
def show_single_uverskyPlot(hydropathy,
                            mean_net_charge,
                            label="",
                            title="Uversky plot",
                            legendOn=True,
                            xLim=1,
                            yLim=1,
                            fontSize=10,
                            getFig=False):
    """
    Plots a single sequence on the Uversky plot (hydropathy vs. mean net charge)

    INPUT:
    --------------------------------------------------------------------------------
    hydropathy      | Mean hydropathy for sequence
    mean_net_charge | Absolute magnitude of the protein's net charge divided by sequence length

    label           | On-plot label of sequence (DEFAULT = no label)
    title           | Plot title (DEFAULT = "Uversky plot")
    legendOn        | Include the phase diagram region legend (DEFAULT = True)
    xLim            | Set upper limit for the x axis (DEFAULT = 1)
    yLim            | Set upper limit for the y axis (DEFAULT = 1)
    fontSize        | Set font size for the point labels (DEFAULT = 10)
    getFig          | Returns a matplotlib figure object instead of simply displaying the
                    | plot on the screen (DEFAULT = False)



    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing, but an annotated Uversky plot should be generated on screen

    """

    return plotting.show_single_uverskyPlot(hydropathy, mean_net_charge, label,
                                            title, legendOn, xLim, yLim,
                                            fontSize, getFig)