Bioinfokit
Bioinformatics data analysis and visualization toolkit
Install / Use
/learn @reneshbedre/BioinfokitREADME
The bioinfokit toolkit aimed to provide various easy-to-use functionalities to analyze,
visualize, and interpret the biological data generated from genome-scale omics experiments.
<span style="color:#33a8ff">How to install:</span>
bioinfokit requires
- Python 3
- NumPy
- scikit-learn
- seaborn
- pandas
- matplotlib
- SciPy
- matplotlib_venn
bioinfokit can be installed using pip, easy_install and git.
Install using <a href="https://pip.pypa.io/en/stable/installing/" target="_blank">pip</a> for Python 3 (easiest way)
# install
pip install bioinfokit
# upgrade to latest version
pip install bioinfokit --upgrade
# uninstall
pip uninstall bioinfokit
Install using <a href="https://setuptools.readthedocs.io/en/latest/easy_install.html" target="_blank">easy_install</a> for Python 3 (easiest way)
# install latest version
easy_install bioinfokit
# specific version
easy_install bioinfokit==0.3
# uninstall
pip uninstall bioinfokit
Install using <a href="https://docs.conda.io/en/latest/" target="_blank">conda</a>
conda install -c bioconda bioinfokit
Install using <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git" target="_blank">git</a>
# download and install bioinfokit (Tested on Linux, Mac, Windows)
git clone https://github.com/reneshbedre/bioinfokit.git
cd bioinfokit
python setup.py install
Check the version of bioinfokit
>>> import bioinfokit
>>> bioinfokit.__version__
'0.4'
How to cite bioinfokit?
- Renesh Bedre. (2020, March 5). reneshbedre/bioinfokit: Bioinformatics data analysis and visualization toolkit. Zenodo. http://doi.org/10.5281/zenodo.3698145.
- Additionally check <a href='https://zenodo.org/record/3841708#.XyCfi-dOmUk' target='_blank'>Zenodo</a> to cite specific version of bioinfokit
Support
If you enjoy bioinfokit, consider supporting me,
<a href="https://www.buymeacoffee.com/renesh" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Getting Started
Gene expression analysis
Volcano plot
latest update v2.0.8
bioinfokit.visuz.GeneExpression.volcano(df, lfc, pv, lfc_thr, pv_thr, color, valpha, geneid, genenames, gfont, dim, r, ar, dotsize, markerdot, sign_line, gstyle, show, figtype, axtickfontsize, axtickfontname, axlabelfontsize, axlabelfontname, axxlabel, axylabel, xlm, ylm, plotlegend, legendpos, figname, legendanchor, legendlabels, theme)
Parameters | Description
------------ | -------------
df |Pandas dataframe table having atleast gene IDs, log fold change, P-values or adjusted P-values columns
lfc | Name of a column having log or absolute fold change values [string][default:logFC]
pv | Name of a column having P-values or adjusted P-values [string][default:p_values]
lfc_thr | Log fold change cutoff for up and downregulated genes [Tuple or list][default:(1.0, 1.0)]
pv_thr | p value or adjusted p value cutoff for up and downregulated genes [Tuple or list][default:(0.05, 0.05)]
color | Tuple of three colors [Tuple or list][default: color=("green", "grey", "red")]
valpha | Transparency of points on volcano plot [float (between 0 and 1)][default: 1.0]
geneid | Name of a column having gene Ids. This is necessary for plotting gene label on the points [string][default: None]
genenames | Tuple of gene Ids to label the points. The gene Ids must be present in the geneid column. If this option set to "deg" it will label all genes defined by lfc_thr and pv_thr [string, tuple, dict][default: None]
gfont | Font size for genenames [float][default: 10.0]. gfont not compatible with gstyle=2.
dim | Figure size [Tuple of two floats (width, height) in inches][default: (5, 5)]
r | Figure resolution in dpi [int][default: 300]. Not compatible with show= True
ar | Rotation of X and Y-axis ticks labels [float][default: 90]
dotsize| The size of the dots in the plot [float][default: 8]
markerdot | Shape of the dot marker. See more options at https://matplotlib.org/3.1.1/api/markers_api.html [string][default: "o"]
sign_line | Show grid lines on plot with defined log fold change (lfc_thr) and P-value (pv_thr) threshold value [True or False][default:False]
gstyle | Style of the text for genenames. 1 for default text and 2 for box text [int][default: 1]
show | Show the figure on console instead of saving in current folder [True or False][default:False]
figtype | Format of figure to save. Supported format are eps, pdf, pgf, png, ps, raw, rgba, svg, svgz [string][default:'png']
axtickfontsize | Font size for axis ticks [float][default: 9]
axtickfontname | Font name for axis ticks [string][default: 'Arial']
axlabelfontsize | Font size for axis labels [float][default: 9]
axlabelfontname | Font name for axis labels [string][default: 'Arial']
axxlabel | Label for X-axis. If you provide this option, default label will be replaced [string][default: None]
axylabel | Label for Y-axis. If you provide this option, default label will be replaced [string][default: None]
xlm | Range of ticks to plot on X-axis [float (left, right, interval)][default: None]
ylm | Range of ticks to plot on Y-axis [float (bottom, top, interval)][default: None]
plotlegend | plot legend on volcano plot [True or False][default:False]
legendpos | position of the legend on plot. For more options see loc parameter at https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.legend.html [string ][default:"best"]
figname | name of figure [string ][default:"volcano"]
legendanchor | position of the legend outside of the plot. For more options see bbox_to_anchor parameter at https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.legend.html [list][default:None]
legendlabels | legend label names. If you provide custom label names keep the same order of label names as default [list][default:['significant up', 'not significant', 'significant down']]
theme | Change background theme. If theme set to dark, the dark background will be produced instead of white [string][default:'None']
Returns:
Volcano plot image in same directory (volcano.png) <a href="https://reneshbedre.com/blog/volcano.html" target="_blank">Working example</a>
Inverted Volcano plot
latest update v2.0.8
bioinfokit.visuz.GeneExpression.involcano(table, lfc, pv, lfc_thr, pv_thr, color, valpha, geneid, genenames, gfont, gstyle, dotsize, markerdot, r, dim, show, figtype, axxlabel, axylabel, axlabelfontsize, axtickfontsize, axtickfontname, plotlegend, legendpos, legendanchor, figname, legendlabels, ar, theme)
Parameters | Description
------------ | -------------
table |Pandas dataframe table having atleast gene IDs, log fold change, P-values or adjusted P-values
lfc | Name of a column having log fold change values [default:logFC]
pv | Name of a column having P-values or adjusted P-values [default:p_values]
lfc_thr | Log fold change cutoff for up and downregulated genes [Tuple or list] [default:(1.0, 1.0)]
pv_thr | p value or adjusted p value cutoff for up and downregulated genes [Tuple or list] [default:(0.05, 0.05)]
color | Tuple of three colors [Tuple or list][default: color=("green", "grey", "red")]
valpha | Transparency of points on volcano plot [float (between 0 and 1)][default: 1.0]
geneid | Name of a column having gene Ids. This is necessary for plotting gene label on the points [string][default: None]
genenames | Tuple of gene Ids to label the points. The gene Ids must be present in the geneid column. If this option set to "deg" it will label all genes defined by lfc_thr and pv_thr [string, Tuple, dict][default: None]
gfont | Font size for genenames [float][default: 10.0]
gstyle | Style of the text for genenames. 1 for default text and 2 for box text [int][default: 1]
dotsize| The size of the dots in the plot [float][default: 8]
markerdot | Shape of the dot marker. See more options at https://matplotlib.org/3.1.1/api/markers_api.html [string][default: "o"]
dim | Figure size [Tuple of two floats (width, height) in inches][default: (5, 5)]
r | Figure resolution in dpi [int][default: 300]. Not compatible with show= True
figtype | Format of figure to save. Supported format are eps, pdf, pgf, png, ps, raw, rgba, svg, svgz [string][default:'png']
`s
Related Skills
feishu-drive
340.5k|
things-mac
340.5kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
340.5kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
postkit
PostgreSQL-native identity, configuration, metering, and job queues. SQL functions that work with any language or driver
