mbapy is a Python package that includes a collection of useful Python scripts as sub-modules, and it's goal is Basic for All in Python.
mbapy primarily focus on data works, including data-retrieval, data-management, data-visualization, data-analysis and data-computation. It is built for both python-users and command-line-users.
Now, mbapy only support pypi install:
pip install mbapy
mbapy is a multi-funtional package, and it does not require every third-party packages to make every sub-module work. However, it provides some requriements option to install more specified requirements to make some sub-modules work:
- bio: some packages for biology(sci).
install aspip install mbapy[bio]
- game: some packages for game(pygame).
install aspip install mbapy[game]
- full: full requirements to make almost every sub-module in mbapy work(except dl_torch).
install aspip install mbapy[full]
If you find the latest release version has some problems, you can try install the up-to-date version on github or gitee:
pip install git+https://github.com/BHM-Bob/BA_PY.git
pip install git+https://gitee.com/BHM-Bob/BA_PY.git
The documentation for mbapy can be found on read the docs or just in the docs
folder.
- open source at:
- docs at: read the docs: https://ba-py.rtfd.io
- PyPI: https://pypi.org/project/mbapy/
some version info
some utils for easier coding
imgae utils, including reading, saving and process a image into a feature tensor via pytorch.
video utils, including extract frames or unique frames from a video.
pandas.dataFrame utils for plot and some simple plot based on plt
utils for web-crawler
get a web hyml page or a selenium browser warpper for easier usage.
utils for parsing html
small task manager
a light-weight web spider architecture
BAKmeans, KOptim, KBayesian from KMeans, and a func for many cluster
pandas.dataFrame utils for stats
regression
some test func(using scipy and mostly give a support for mbapy-style data input)
pytorch utils for deeplearning
basic blocks : tiny network structures
utils for dataset loading
some loss function
model : deeplearning model constructed with basic blocks
deeplearning training utils
learning rate scheduler
sci-paper utils, contains paper searching, downloading and parsing
search papers via pubmed, baidu xueshu, wos
download papers via scihub
parse paper from a pdf file into a dict of each sections
class and funcs to calcu peptide MW, mutations
some high-level utils for bio
HPLC instrument data processing and visualization
mass spectrometry instrument data processing and visualization
some useful scripts for command user
launch by python -m mbapy.scripts.XXX
or mbapy-cli XXX
.
- chaoxin ppt multi threads downloader (jpg->pdf)
- wujin search http://www.basechem.org
- chemSub search http://chemsub.online.fr
- cnipa https://pss-system.cponline.cnipa.gov.cn/seniorSearch
- mbapy requires python 3.8~3.11 because of the use of type hint and require matplotlib>=3.7.5, and the developer do not test it on other python version.
- mbapy only requires a part of third-party packages in a specific version. This is because the developer do not want to make a big change during the installation. Bellow are the specific requirements:
matplotlib>=3.7.5
: HPLC and Mass data visualization need set legenddraggable
, this is only supported in 3.7+seaborn>=0.13.0
: plot_utils.bar_utils.plot_bar need set seaborn stripplotnative_scale
, this is only supported in 0.13+nicegui[highcharts]
: scripts/hplc: explore-hplc need a highcharts as interactive plot for manual peaking.torch any
: though dl_torch is important for mbapy, but the developer kowns torch is a big package, and do not has a specific function requirement.