示例#1
0
def save_single_uverskyPlot(
        hydropathy,
        mean_net_charge,
        filename,
        label="",
        title="Uversky plot",
        legendOn=True,
        xLim=1,
        yLim=1,
        fontSize=10,
        saveFormat='png'):
    """
    Plots a single sequence on the Uversky plot (hydropathy vs. mean net charge) and save it to 'filename' (.png is
    appended).

    INPUT:
    --------------------------------------------------------------------------------
    hydropathy      | Mean hydropathy for sequence
    mean_net_charge | Absolute magnitude of the protein's net charge divided by sequence length
    filename        | Path/name of file to save plot (.png is appended)

    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)
    saveFormat      | Defines the file formal to save plots as. This parameter
                      is passed to matplotlibs savefig command which supports 
                      the following filetypes: emf, eps, pdf, png, ps, raw, 
                      rgba, svg, svgz. (DEFAULT = png)


    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing but single uversky plot should be saved to disk

    """

    plotting.save_single_uverskyPlot(
        hydropathy,
        mean_net_charge,
        filename,
        label,
        title,
        legendOn,
        xLim,
        yLim,
        fontSize,
        saveFormat)
示例#2
0
def save_single_uverskyPlot(
        hydropathy,
        mean_net_charge,
        filename,
        label="",
        title="Uversky plot",
        legendOn=True,
        xLim=1,
        yLim=1,
        fontSize=10):
    """
    Plots a single sequence on the Uversky plot (hydropathy vs. mean net charge) and save it to 'filename' (.png is
    appended).

    INPUT:
    --------------------------------------------------------------------------------
    hydropathy      | Mean hydropathy for sequence
    mean_net_charge | Absolute magnitude of the protein's net charge divided by sequence length
    filename        | Path/name of file to save plot (.png is appended)

    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)


    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing but single uversky plot should be saved to disk

    """

    plotting.save_single_uverskyPlot(
        hydropathy,
        mean_net_charge,
        filename,
        label,
        title,
        legendOn,
        xLim,
        yLim,
        fontSize)
示例#3
0
    def save_uverskyPlot(
            self,
            filename,
            label="",
            title="Uversky plot",
            legendOn=True,
            xLim=1,
            yLim=1,
            fontSize=10):
        """
        Generates the Pappu-Das phase diagram (diagram of states), places
        this sequence on that plot, and saves it at the <filename> location

        INPUT:
        --------------------------------------------------------------------------------
        filename  | A writeable filename

        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)


        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.

        """

        plotting.save_single_uverskyPlot(
            self.get_uversky_hydropathy(),
            self.get_mean_net_charge(),
            filename,
            label,
            title,
            legendOn,
            xLim,
            yLim,
            fontSize)
示例#4
0
def save_single_uverskyPlot(hydropathy,
                            mean_net_charge,
                            filename,
                            label="",
                            title="Uversky plot",
                            legendOn=True,
                            xLim=1,
                            yLim=1,
                            fontSize=10,
                            saveFormat='png'):
    """
    Plots a single sequence on the Uversky plot (hydropathy vs. mean net charge) and save it to 'filename' (.png is
    appended).

    INPUT:
    --------------------------------------------------------------------------------
    hydropathy      | Mean hydropathy for sequence
    mean_net_charge | Absolute magnitude of the protein's net charge divided by sequence length
    filename        | Path/name of file to save plot (.png is appended)

    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)
    saveFormat      | Defines the file formal to save plots as. This parameter
                      is passed to matplotlibs savefig command which supports 
                      the following filetypes: emf, eps, pdf, png, ps, raw, 
                      rgba, svg, svgz. (DEFAULT = png)


    OUTPUT:
    --------------------------------------------------------------------------------
    Nothing but single uversky plot should be saved to disk

    """

    plotting.save_single_uverskyPlot(hydropathy, mean_net_charge, filename,
                                     label, title, legendOn, xLim, yLim,
                                     fontSize, saveFormat)