Computational tools for single molecule localization / superresolution microscopy (point clouds).
OTHER License
A set of tools for processing point cloud based superresolution/single molecule localization microscopy, including but not limited to
While microscopes often have built-in or software solutions to do this for you, they may not be perfect or you may no longer have access to the microscope. You can use this software when:
Code Coverage
Automated testing
3.Usage
git clone https://github.com/bencardoen/SmlmTools.jl.git
cd SmlmTools.jl
julia --project=.
or adding as a package
julia -e 'using Pkg; Pkg.add(url="https://github.com/bencardoen/SmlmTools.jl.git")'
You can review the documentation of the code, but in short this is in plain English what will happen:
To allow you to inspect each stage, plots are saved with before/after data and for example the temporal trajectory in XYZ of the beads.
First, the bead (in point cloud) is detected and plotted. Note that it is not circular due to temporal drift, and they are not aligned across channels.
Then we plot the corrected bead
And the trajectory the beads take over time
Let F and S be the file names of the GSD bin files of either channel:
julia --project=. scripts/align.jl --f [F] --s [S] --outdir [mydirectory] --colocalize --align --segment
Adding --colocalize runs colocalization metrics.
If you have a 3D point cloud in coords3d (Nx3), project image using nm_per_px.
image, smoothed, density, beadmask = project_image(coords3d, nm_per_px; mx=nothing, remove_bead=false, log_scale=true, nm=10)
This example runs on Compute Canada
# Change to local scratch directory
cd scratch
# Copy the singularity image
cp /project/rrg-hamarneh/data/nabi-robert-ivan/software/smlmtools/SmlmTools.sif .
# Set executable
chmod u+x SmlmToools.sif
# Request resources to run from SLURM
salloc --mem=32GB --account=rrg-hamarneh --cpus-per-task=4 --time=3:00:00
# Make sure Singularity has rw access
export SINGULARITY_BINDPATH="/scratch/$USER,$SLURM_TMPDIR"
# Execute
./SmlmTools.sif -f testdata/1C8PTRF_3_1_Cav_647.bin -s testdata/1C8PTRF_3_1_PTRF_568.bin -t GSD -p 10 -a -n 10 --outdir . -c
This will produce colocalization for 7 metrics, 2D image projections and 3D alignment.
If you find this useful, consider citing
@software{cardoen_ben_2023_7632321,
author = {Cardoen, Ben},
title = {{SmlmTools: A Julia package for computational
methods for single molecule localization /
superresolution microscopy}},
month = feb,
year = 2023,
note = {https://github.com/bencardoen/SmlmTools.jl},
publisher = {Zenodo},
version = {0.1},
doi = {10.5281/zenodo.7632321},
url = {https://doi.org/10.5281/zenodo.7632321}
}