How kjaqaman/smi-fsm works
Project type and purpose
• The README describes its goals: extracting dynamic properties of tracks and integrating those measurements in downstream analysis.
File structure
• Top-level:
• Code/ – all MATLAB routines and helper libraries
• HowToSMIFSM.pdf – user guide
• LICENSE, README.md
• Within Code/:
• .m files – core algorithms (tracking, moment calculations, diffusion analysis, plotting)
• extern/ – third-party MATLAB helpers
• mex/ – compiled MEX functions for performance (createDistanceMatrix)
• data files (.mat) – precomputed thresholds and constants
• testScriptforPackage.m – example end-to-end run script
README for additional insights
a) Single‐molecule tracking and property extraction
b) Actin speckle tracking and property extraction
• A final integration step correlates and statistically analyzes relationships.
1. Data Input
2. Preprocessing
• Image filtering (filterGauss1D, padarrayXT)
• Mask generation (getActinMask)
3. Tracking Modules
• Single‐Molecule Tracker
– convCoord2Img → getTrackSEL → getFsmTrackNum → calcTrackMoments
• Actin Speckle Tracker
– gridActinPropPerTimeInt → smactinClean → smactinMat
4. Feature Extraction
• Spatial/temporal metrics (basicTransientDiffusionAnalysis, trackDiffusionAnalysis1)
• Classification (classifyMaskGrid, stratifySmTrackletByBoxClass)
5. Statistical Analysis
• Gaussian fitting (fitHistWithGaussians)
• Comparative tests (multiCompareAnovaIndCellsMVRG, multiCompareIndCellsMVRG)
• Confidence intervals (positionConfidence*.mat)
6. Visualization & Reporting
• Plotting functions (plotTracksDiffAnalysis2D, plotBiphasicLines, notBoxPlot)
• Summary scripts (summarizeDiffAnRes, explainIndCellsMVRG)
7. Integration & Control
• testScriptforPackage.m or runSmactinAggMovExplain.m orchestrates end-to-end workflow
8. Performance Acceleration
• MEX library (createDistanceMatrix)
9. External Helpers
• extern/padcat, extern/sigstar
b. Relationships and data flow
c. Architectural patterns & design principles
• Functional decomposition: each stage encapsulates a distinct step in the pipeline
• Modular design: helper libraries (extern/), performance modules (mex/) separated from core code
• Script orchestration: a top-level script ties together modules in sequence
d. Key technologies & frameworks
• MATLAB (core language/runtime)
• MEX (for compute-intensive routines)
• Third-party MATLAB utilities (in extern/)