networkcommons.visual.plot_rank
- networkcommons.visual.plot_rank(df, bio_ids=None, figsize=(12, 6), x_label='Proteins', y_label='Average Intensity', title='Protein abundance Rank Plot', legend_labels=None, id_column='idx', average_color='blue', stdev_color='gray', stdev_alpha=0.2, highlight_color='red', highlight_size=5, highlight_zorder=5, filepath=None, render=False)
Plot a protein abundance rank plot.
This function generates a plot showing protein abundance ranked by their average intensity with an option to highlight specific proteins.
- Return type:
Figure- Parameters:
- dfpd.DataFrame
Input DataFrame containing gene or protein data.
- bio_idslist of str, optional
List of specific genes or proteins to highlight. Defaults to None.
- figsizetuple, optional
Size of the figure. Defaults to (12, 6).
- x_labelstr, optional
Label for the x-axis. Defaults to ‘Proteins’.
- y_labelstr, optional
Label for the y-axis. Defaults to ‘Average Intensity’.
- titlestr, optional
Title of the plot. Defaults to ‘Protein abundance Rank Plot’.
- legend_labelsdict, optional
Dictionary with legend labels for ‘average’, ‘stdev’, and ‘highlight’. Defaults to None.
- id_columnstr, optional
Name of the column containing the IDs (e.g., gene symbols or proteins). Defaults to ‘idx’.
- average_colorstr, optional
Color of the average intensity line. Defaults to ‘blue’.
- stdev_colorstr, optional
Color of the standard deviation shaded area. Defaults to ‘gray’.
- stdev_alphafloat, optional
Transparency for the standard deviation shaded area. Defaults to 0.2.
- highlight_colorstr, optional
Color for highlighting specific genes or proteins. Defaults to ‘red’.
- highlight_sizeint, optional
Size of the highlighted points. Defaults to 5.
- highlight_zorderint, optional
Z-order for the highlighted points. Defaults to 5.
- filepathstr, optional
Path to save the plot. If None, the plot will not be saved. Defaults to None.
- renderbool, optional
Whether to display the plot. Defaults to False.
- Returns:
- matplotlib.figure.Figure
The figure object for the plot.