AFMSlicer is a package for processing images from Atomic Force Microscopy of bacterial cell walls. From a single image of heights a user defined number of masks that "slice" through the image at regular intervals are taken. Each slice is segmented to identify areas and the distribution of these areas across slices, which typically approximates a Gaussian distribution, is used to select the Full-width Half-max range of slices to subset for summarisation.
For the full documentation please refer to AFMSlicer Docs which are also mirrored at ReadTheDocs.
Currently AFMSlicer is only available via GitHub, although a release to the Python Package Index (PyPI) is planned. There are two options for installing from GitHub.
- Install directly from GitHub.
- Clone and install from a local copy.
Which you use depends on your use case. If you are going to just be using AFMSlicer then Option 1 will suffice. If you will be developing and making contributions to the code base then Option 2 is recommended. In either case it is recommended that use use uv to setup a virtual environment in which to install AFMSlicer.
pip has support for installing packages directly from GitHub.
mkdir afmslicer
cd afmslicer
uv venv --python 3.11
source .venv/bin/activate # This command works on GNU/Linux and OSX but will not under Windows, see output from
previous step
uv pip install git+https://github.com/AFM-SPM/AFMSlicer.git@mainYou can replace @main in the last command to any git commit hash or tag if you want to install a specific version of
the code.
If developing or contributing to AFMSlicer then this is the recommended method. You will need to have Git installed on your computer in order to clone the repository (Windows users are recommended to use Git Bash).
The following installs the package along with all development dependencies that are required for working on the code base.
git clone git@github.com:AFM-SPM/AFMSlicer.git
cd AFMSlicer
uv venv --python 3.11
source .venv/bin/activate # This command works on GNU/Linux and OSX but will not under Windows, see output from previous step
uv pip install -e. --group devThis software is licensed under the GNU GPLv3 License.