Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: Michael-shannon
- License: mit
- Language: Python
- Default Branch: main
- Size: 1.65 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
SPTnano
Single particle tracking analysis with machine learning. This package combines traditional trajectory analysis with transformer-based deep learning to classify motion patterns.
About
Project Team
Michael Shannon (m.j.shannon@pm.me)
The structure for this repo was made using a cookiecutter from the Centre for Advanced Research Computing, University College London.
Installation
Quick Install (Recommended)
bash
pip install git+https://github.com/Michael-shannon/SPTnano.git
For Development
bash
git clone https://github.com/Michael-shannon/SPTnano.git
cd SPTnano
pip install -e .
If you get dependency errors, try installing them first:
bash
pip install numpy pandas matplotlib seaborn scikit-learn torch trackpy
Getting Started
```python import SPTnano as spt import pandas as pd
Load your trajectory data
df = pd.readcsv("yourtrajectories.csv")
Calculate motion features
metrics = spt.ParticleMetrics(df, timebetweenframes=0.01) metrics.calculatetimewindowedmetrics(windowsize=60, overlap=30)
Train a transformer model
results = spt.trainmotiontransformer(df, epochs=25, use_tensorboard=True)
Analyze results
windoweddf = metrics.gettimewindoweddf() spt.plottracksbymotionclass(windoweddf, metrics.gettimeaverageddf()) ```
Data Format
Your CSV should have these columns:
unique_id- Unique identifier for each trackframe- Frame numberx,y- Coordinatestime_s- Time in secondscondition- Experimental condition (optional)
Configuration
Set your data directory:
```python
Edit this line in src/SPTnano/config.py
MASTER = '/path/to/your/data/' ```
Or change it programmatically:
python
import SPTnano as spt
spt.config.MASTER = '/path/to/your/data/'
Features
- Traditional Analysis: MSD, diffusion coefficients, motion classification
- Transformer Models: Deep learning on trajectory windows
- Visualization: Track plotting, clustering, UMAP embeddings
- TensorBoard: Training monitoring and visualization
Examples
Check out the notebooks/ folder for examples:
Troubleshooting
Import errors? Make sure you installed the package: pip install -e .
Missing dependencies? Install them: pip install torch numpy pandas matplotlib
Path issues? Check your config: print(spt.config.MASTER)
Contributing
This is research software - expect rough edges. Pull requests welcome.
License
MIT License
Owner
- Name: Michael Shannon
- Login: Michael-shannon
- Kind: user
- Location: New York City
- Company: Columbia University Medical Center
- Repositories: 1
- Profile: https://github.com/Michael-shannon
Image analyst, Columbia University
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
authors:
- family-names: "Shannon"
given-names: "Michael"
email: "m.j.shannon@pm.me"
repository-code: "https://github.com/Michael-shannon/SPTnano"
title: "SPTnano: Pipeline for easy single particle detection, linking/tracking, and analysis"
license: "MIT"
GitHub Events
Total
- Member event: 2
- Push event: 59
Last Year
- Member event: 2
- Push event: 59
Dependencies
- actions/cache 0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 composite
- actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
- actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
- peaceiris/actions-gh-pages 4f9cc6602d3f66b9c108549d475ec49e8ef4d45e composite
- actions/cache 0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 composite
- actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
- actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
- actions/cache 0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 composite
- actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
- actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite