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.
NB The instructions below are only a brief guide, please refer to the official installation instructions for more detailed information.
There are three options for installing AFMSlicer, the options and reasons for using different releases are..
- Install from Python Package Index (PyPI) - use this if you only want to use a stable version AFMSlicer.
- Install directly from GitHub - use this if you want to try out the latest features.
- Clone and install from a local copy - use this if you wish to develop and contribute to AFMSlicer.
Regardless of which version you choose it is recommended that use use uv to setup a virtual environment in which to install AFMSlicer. The following instructions include creating a virtual environment with uv.
cd path/to/work
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 afmslicerpip 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.