Exemplo n.º 1
0
def save_multiple_phasePlot2(
        SeqParam_list,
        filename,
        label_list=[],
        title="Diagram of states",
        legendOn=True,
        xLim=1,
        yLim=1,
        fontSize=10,
        saveFormat='png'):
    """
    Plot multiple sequences on the same Pappu-Das phase plot (diagram of states) and save that file.
    This function takes SequenceParameter objects rather than raw values.

    INPUT:
    --------------------------------------------------------------------------------
    SeqParam_list | list of sequence parameter objects
    filename      | name of file to save (.png is appended)

    label_list    | On-plot label of sequence (DEFAULT = no label)
    title         | Plot title (DEFAULT = "Diagram of states")
    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:
    --------------------------------------------------------------------------------
    No output, but if succesful a file with filename is generated with the associated plot

    """

    # construct the fraction positive and negative vectors
    fp_list = []
    fn_list = []
    for seq in SeqParam_list:
        fp_list.append(seq.get_fraction_positive())
        fn_list.append(seq.get_fraction_negative())

    plotting.save_multiple_phasePlot(
        fp_list,
        fn_list,
        filename,
        label_list,
        title,
        legendOn,
        xLim,
        yLim,
        fontSize,
        saveFormat)
Exemplo n.º 2
0
def save_multiple_phasePlot(
        fp_list,
        fn_list,
        filename,
        label_list=[],
        title="Diagram of states",
        legendOn=True,
        xLim=1,
        yLim=1,
        fontSize=10,
        saveFormat='png'):
    """
    Plot multiple sequences on the same Pappu-Das phase plot (diagram of states) and save that file

    INPUT:
    --------------------------------------------------------------------------------
    fp_list    | Fraction of positive residues
    fn_list    | Fraction of negative residues
    filename   | name of file to save (.png is appended)

    label_list | On-plot label of sequence (DEFAULT = no label)
    title      | Plot title (DEFAULT = "Diagram of states")
    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:
    --------------------------------------------------------------------------------
    No output, but if succesful a file with filename is generated with the associated plot

    """

    plotting.save_multiple_phasePlot(
        fp_list,
        fn_list,
        filename,
        label_list,
        title,
        legendOn,
        xLim,
        yLim,
        fontSize,
        saveFormat)
Exemplo n.º 3
0
def save_multiple_phasePlot2(SeqParam_list,
                             filename,
                             label_list=[],
                             title="Diagram of states",
                             legendOn=True,
                             xLim=1,
                             yLim=1,
                             fontSize=10,
                             saveFormat='png'):
    """
    Plot multiple sequences on the same Pappu-Das phase plot (diagram of states) and save that file.
    This function takes SequenceParameter objects rather than raw values.

    INPUT:
    --------------------------------------------------------------------------------
    SeqParam_list | list of sequence parameter objects
    filename      | name of file to save (.png is appended)

    label_list    | On-plot label of sequence (DEFAULT = no label)
    title         | Plot title (DEFAULT = "Diagram of states")
    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:
    --------------------------------------------------------------------------------
    No output, but if succesful a file with filename is generated with the associated plot

    """

    # construct the fraction positive and negative vectors
    fp_list = []
    fn_list = []
    for seq in SeqParam_list:
        fp_list.append(seq.get_fraction_positive())
        fn_list.append(seq.get_fraction_negative())

    plotting.save_multiple_phasePlot(fp_list, fn_list, filename, label_list,
                                     title, legendOn, xLim, yLim, fontSize,
                                     saveFormat)
Exemplo n.º 4
0
def save_multiple_phasePlot(
        fp_list,
        fn_list,
        filename,
        label_list=[],
        title="Diagram of states",
        legendOn=True,
        xLim=1,
        yLim=1,
        fontSize=10):
    """
    Plot multiple sequences on the same Pappu-Das phase plot (diagram of states) and save that file

    INPUT:
    --------------------------------------------------------------------------------
    fp_list    | Fraction of positive residues
    fn_list    | Fraction of negative residues
    filename   | name of file to save (.png is appended)

    label_list | On-plot label of sequence (DEFAULT = no label)
    title      | Plot title (DEFAULT = "Diagram of states")
    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:
    --------------------------------------------------------------------------------
    No output, but if succesful a file with filename is generated with the associated plot

    """

    plotting.save_multiple_phasePlot(
        fp_list,
        fn_list,
        filename,
        label_list,
        title,
        legendOn,
        xLim,
        yLim,
        fontSize)
Exemplo n.º 5
0
def save_multiple_phasePlot(fp_list,
                            fn_list,
                            filename,
                            label_list=[],
                            title="Diagram of states",
                            legendOn=True,
                            xLim=1,
                            yLim=1,
                            fontSize=10,
                            saveFormat='png'):
    """
    Plot multiple sequences on the same Pappu-Das phase plot (diagram of states) and save that file

    INPUT:
    --------------------------------------------------------------------------------
    fp_list    | Fraction of positive residues
    fn_list    | Fraction of negative residues
    filename   | name of file to save (.png is appended)

    label_list | On-plot label of sequence (DEFAULT = no label)
    title      | Plot title (DEFAULT = "Diagram of states")
    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:
    --------------------------------------------------------------------------------
    No output, but if succesful a file with filename is generated with the associated plot

    """

    plotting.save_multiple_phasePlot(fp_list, fn_list, filename, label_list,
                                     title, legendOn, xLim, yLim, fontSize,
                                     saveFormat)