/SmlmTools.jl

Computational tools for single molecule localization / superresolution microscopy (point clouds). Mirror of https://github.com/bencardoen/SmlmTools.jl

Primary LanguageJuliaOtherNOASSERTION

SmlmTools

A set of tools for processing point cloud based superresolution/single molecule localization microscopy, including but not limited to

  • point cloud to image conversion
  • fiducial tracking
  • cross-channel alignment

Code Coverage codecov

DOI

Automated testing CircleCI

Installation

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")'

Usage

2-channel alignment

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.

Point cloud to image

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)

Using on cluster

  • Log in

Get resources

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

Run

# 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.

Cite

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}
}

See also