Easing script writing on Google Colab with structural biology snippets
Blaine H. M. Mooers · Acta Crystallographica Section A Foundations and Advances · 2022
The ColabFold project has popularized the use of a variant of the Jupyter notebook by biologists to run AlphaFold2 on Google Colab (Mirdita et al. 2021). The ColabFold project provides a notebook with an easy-to-use interface for one main workflow. The computer code is hidden from view but can be exposed with the click of a button. Scientists with little programming skill can easily run these notebooks. Not so well known is that Colab notebook also supports the use of snippet libraries stored in additional Colab notebooks. The snippet notebooks can be made accessible from the active notebook. The main drawback to using Colab notebooks is the removal of all userinstalled software at the end of each session. Google Colab does not provide access to most structural biology software, so users must install this software at the start of each session. The installation steps are several and can be complex. The steps generally take 3-10 minutes. We developed Colab snippet library notebooks to ease the installation of PyMOL, py3dmol, nglview, cctbx, rdkit, and other structural biology software packages on Colab by providing the required installation code in the first cells of the library notebook. Our objective is to ease the running of several complementary structural biology software packages in the same notebook on Colab via the use of codefragment or snippet libraries to ease the assembly of Colab notebooks with standard or novel workflows. Users retrieve the snippets by scrolling through a list or by using tags. A GUI supports the easy addition of new snippets by users. For example, the colabpymolpysnips (https://github.com/MooersLab/colabpymolpysnips) notebook installs PyMOL from an Anaconda and provides over 250 snippets that labeled with tags to ease their retrieval and insertion in code blocks (Mooers 2021). A second library notebook supports the installation of open-source PyMOL for those workers who lack a PyMOL license, (https://github.com/MooersLab/colabOpenSourcePyMOLpySnips).