For my blog post this week, I thought I would share, as the title suggests, a small collection of tools and packages that I found to make my work a bit easier over the last few months (mainly python based). I might add to this list as I find new tools that I think deserve a shout-out.
Biopandas
Reading in .pdb files for processing and writing your own parser (while being a good exercise to familiarize yourself with the format) is a pain and clutters your code with boilerplate.
Luckily for us, Sebastian Raschka has written a neat package called biopandas [1] which enables quick I/O of .pdb files via the pandas DataFrame class.
The best feature of this package: You do not have to look up the column numbers of the .pdb entry categories anymore.
Example usage (from the package github page: https://rasbt.github.io/biopandas/)
# Initialize a new PandasPdb object # and fetch the PDB file from rcsb.org from biopandas.pdb import PandasPdb ppdb = PandasPdb().fetch_pdb('3eiy') print(ppdb.df['ATOM'].head())
Joblib
Joblib is a python package that wraps around the python multiprocessing package, providing a much more readable code layout for multiprocessing alongside with meaningful progression information printed to stdout.
Example usage:
#!/usr/bin/env python def foo(arg1, arg2): return arg1, arg2 list_of_args = [...] output = [] for i in range(len(list_of_args)): output.append(foo(list_of_args[i], 'some_other_argument')
becomes
#!/usr/bin/env python from joblib import Parallel, delayed def foo(arg1, arg2): return arg1, arg2 list_of_args = [...] with Parallel(n_jobs=n) as parallel: output = parallel(delayed(foo)(arg2='some_other_argument') for item in list_of_args)
Jupyter Lab
Not quite as well known (yet) as its predecessor (jupyer notebook), jupyter lab is in my opinion an essential tool for anyone using ipython or jupyter notebooks in their data processing workflow. With the addition of a filebrowser, an easy overview of running kernels and maybe most importantly, a separate tab-bar for your notebooks so they do not crowd your browser anymore, it improves pretty much every aspect of using jupyter notebooks on their own, upgrading them to a browser-based IDE.
Spotify
Because Apple Music does not have a Linux or a web-browser application.
Looyat off-brand nerf darts
They are much cheaper than Nerf brand darts.
References
[1] Sebastian Raschka. Biopandas: Working with molecular structures in pandas dataframes. The Journal of Open Source Software, 2(14), jun 2017. doi: 10.21105/joss.00279. URL http://dx.doi.org/10.21105/joss.00279.