def save_multiple_uverskyPlot2( SeqParam_list, filename, label_list=[], title="Uversky plot", legendOn=True, xLim=1, yLim=1, fontSize=10, saveFormat='png'): """ Plots multiple sequences on the Uversky plot (hydropathy vs. mean net charge) and saves that plot to 'filename' (.png is appended). This function takes SequenceParameter objects instead of list of hydropathy and mean_net_charge values INPUT: -------------------------------------------------------------------------------- SeqParam_list | List of sequence parameter objects 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 a Uversky plot with multiple points should be saved to the 'filename', where filename defines the name of a file/path for saving """ # construct the fraction positive and negative vectors hydropathy_list = [] mean_net_charge_list = [] for seq in SeqParam_list: hydropathy_list.append(seq.get_uversky_hydropathy()) mean_net_charge_list.append(seq.get_mean_net_charge()) plotting.save_multiple_uverskyPlot( hydropathy_list, mean_net_charge_list, filename, label_list, title, legendOn, xLim, yLim, fontSize)
def save_multiple_uverskyPlot( hydropathy_list, mean_net_charge_list, filename, label_list=[], title="Uversky plot", legendOn=True, xLim=1, yLim=1, fontSize=10, saveFormat='png'): """ Plots multiple sequences on the Uversky plot (hydropathy vs. mean net charge) and saves that plot to 'filename' (.png is appended). INPUT: -------------------------------------------------------------------------------- hydropathy | List of mean hydropathies for sequences mean_net_charge_list | List of the absolute magnitude of the protein's net charge divided by sequence length filename | Path/name of file to save plot (.png is appended) label_list | List of labels for each sequence (empty = no list) 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 a Uversky plot with multiple points should be saved to the 'filename', where filename defines the name of a file/path for saving """ plotting.save_multiple_uverskyPlot( hydropathy_list, mean_net_charge_list, filename, label_list, title, legendOn, xLim, yLim, fontSize, saveFormat)
def save_multiple_uverskyPlot2(SeqParam_list, filename, label_list=[], title="Uversky plot", legendOn=True, xLim=1, yLim=1, fontSize=10, saveFormat='png'): """ Plots multiple sequences on the Uversky plot (hydropathy vs. mean net charge) and saves that plot to 'filename' (.png is appended). This function takes SequenceParameter objects instead of list of hydropathy and mean_net_charge values INPUT: -------------------------------------------------------------------------------- SeqParam_list | List of sequence parameter objects 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 a Uversky plot with multiple points should be saved to the 'filename', where filename defines the name of a file/path for saving """ # construct the fraction positive and negative vectors hydropathy_list = [] mean_net_charge_list = [] for seq in SeqParam_list: hydropathy_list.append(seq.get_uversky_hydropathy()) mean_net_charge_list.append(seq.get_mean_net_charge()) plotting.save_multiple_uverskyPlot(hydropathy_list, mean_net_charge_list, filename, label_list, title, legendOn, xLim, yLim, fontSize)
def save_multiple_uverskyPlot( hydropathy_list, mean_net_charge_list, filename, label_list=[], title="Uversky plot", legendOn=True, xLim=1, yLim=1, fontSize=10): """ Plots multiple sequences on the Uversky plot (hydropathy vs. mean net charge) and saves that plot to 'filename' (.png is appended). INPUT: -------------------------------------------------------------------------------- hydropathy | List of mean hydropathies for sequences mean_net_charge_list | List of the absolute magnitude of the protein's net charge divided by sequence length filename | Path/name of file to save plot (.png is appended) label_list | List of labels for each sequence (empty = no list) 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 a Uversky plot with multiple points should be saved to the 'filename', where filename defines the name of a file/path for saving """ plotting.save_multiple_uverskyPlot( hydropathy_list, mean_net_charge_list, filename, label_list, title, legendOn, xLim, yLim, fontSize)
def save_multiple_uverskyPlot(hydropathy_list, mean_net_charge_list, filename, label_list=[], title="Uversky plot", legendOn=True, xLim=1, yLim=1, fontSize=10, saveFormat='png'): """ Plots multiple sequences on the Uversky plot (hydropathy vs. mean net charge) and saves that plot to 'filename' (.png is appended). INPUT: -------------------------------------------------------------------------------- hydropathy | List of mean hydropathies for sequences mean_net_charge_list | List of the absolute magnitude of the protein's net charge divided by sequence length filename | Path/name of file to save plot (.png is appended) label_list | List of labels for each sequence (empty = no list) 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 a Uversky plot with multiple points should be saved to the 'filename', where filename defines the name of a file/path for saving """ plotting.save_multiple_uverskyPlot(hydropathy_list, mean_net_charge_list, filename, label_list, title, legendOn, xLim, yLim, fontSize, saveFormat)