Data Analysis & Visualization
Here you can find the different data analysis and visualization functions in the package.
Visualization Utilities
- pyBiodatafuse.analyzer.utils.plot_pie_chart(template_df: DataFrame, fig_size: tuple = (10, 10), fig_title: str = 'Pie plot') <module 'matplotlib.pyplot' from '/home/docs/checkouts/readthedocs.org/user_builds/pybiodatafuse/envs/latest/lib/python3.9/site-packages/matplotlib/pyplot.py'>[source]
Plot a pie chart.
- Parameters:
template_df – A dataframe with two columns: “label” and “value”
fig_size – A tuple with the size of the figure
fig_title – The title of the figure
- Returns:
A pie chart
- pyBiodatafuse.analyzer.utils.plot_hbarplot_chart(template_df: DataFrame, x_label: str = 'Label', y_label: str = 'Value', fig_size: tuple = (10, 10), fig_title: str = 'Bar plot') <module 'matplotlib.pyplot' from '/home/docs/checkouts/readthedocs.org/user_builds/pybiodatafuse/envs/latest/lib/python3.9/site-packages/matplotlib/pyplot.py'>[source]
Plot a bar plot.
- Parameters:
template_df – A dataframe with two columns: “label” and “value”
x_label – The x-axis label
y_label – The y-axis label
fig_size – A tuple with the size of the figure
fig_title – The title of the figure
- Returns:
A bar plot
- pyBiodatafuse.analyzer.utils.plotly_pie_chart(template_df: DataFrame, fig_size: tuple = (10, 10), fig_title: str = 'Pie plot') <module 'plotly.express' from '/home/docs/checkouts/readthedocs.org/user_builds/pybiodatafuse/envs/latest/lib/python3.9/site-packages/plotly/express/__init__.py'>[source]
Plot a pie chart using Plotly.
- Parameters:
template_df – A dataframe with two columns: “label” and “value”
fig_size – A tuple with the size of the figure
fig_title – The title of the figure
- Returns:
A plotly pie chart
- pyBiodatafuse.analyzer.utils.plotly_barplot_chart(template_df: DataFrame, x_label: str = 'Label', y_label: str = 'Value', fig_size: tuple = (10, 10), fig_title: str = 'Bar plot') <module 'plotly.express' from '/home/docs/checkouts/readthedocs.org/user_builds/pybiodatafuse/envs/latest/lib/python3.9/site-packages/plotly/express/__init__.py'>[source]
Plot a bar plot using Plotly.
- Parameters:
template_df – A dataframe with two columns: “label” and “value”
x_label – The x-axis label
y_label – The y-axis label
fig_size – A tuple with the size of the figure
fig_title – The title of the figure
- Returns:
A bar plot
Literature Explorer
- pyBiodatafuse.analyzer.explorer.literature.get_wikidata_gene_literature(bridgedb_df: DataFrame) Dict[str, Set[str]][source]
Get PubMed articles linked to a gene or its encoded protein.
- Parameters:
bridgedb_df – BridgeDb output for creating the list of gene ids to query
- Returns:
a dictionary with the NCBI gene id as the key and the PMIDs as the value.