Name | tracking-graph JSON |
Version |
0.9.0
JSON |
| download |
home_page | None |
Summary | Algorithm to track clusters across recordings |
upload_time | 2024-08-27 22:44:57 |
maintainer | None |
docs_url | None |
author | Fernando Julian Chaure |
requires_python | <4.0,>=3.10 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Tracking_Graph
![GitHub License](https://img.shields.io/github/license/reylab/tracking_graph)
Tracking_Graph is a tool for track units across spike sorting solutions. This package is part of the PhD
This project is part of my PhD research at [University Name]
## Installation
Install Tracking_Graph using pip:
```bash
pip install tracking_graph
```
## Usage
### Creating a Graph
```python
from tracking_graph import run_tg, get_tg_groups, EuclideanClassifier
# Create a classifier
modelcreator = EuclideanClassifier.creator(std_mult=3) # Classify spikes with length > 3 std
# Run Tracking_Graph
G = run_tg(
we_list, # List of WaveformExtractor objects
outputfile='/home/user/examplefolder/tg_data.hdf5',
max_len=2, # Maximum edge length, must be at least 1
modelcreator=modelcreator
)
# Compute results programmatically (can be replaced by the GUI)
groups, sG, discarded = get_tg_groups(
G,
mintrack=3, # Minimum number of segments for a cluster
merge=True # Apply criteria to merge splits
)
# Create a final results table
import pandas as pd
df = []
for gi, g in enumerate(groups):
for c in g:
df.append({'segment': c.segment,
'cluster': c.unit,
'tg_unit': gi})
results_table = pd.DataFrame(df)
```
### Exploring Simplified Graphs with GUI
Launch the graphical interface (Streamlit server) using:
```bash
tg_gui
```
### Additional Tools
Tracking_Graph provides a wrapper to load aligned waveforms from Wave_Clus clustering results, addressing limitations in SpikeInterface's waveform interpolation:
```python
from tracking_graph.spikeinterface_addons import Waveclus_Waveforms
path_times_file = '/home/user/examplefolder/times_example.mat' # Full path to Wave_Clus result
we = Waveclus_Waveforms(path_times_file) # Object with basic WaveformExtractor interface
```
## Limitations
- Tracking_Graph requires `spikeinterface<=0.100` due to its dependency on the `WaveformExtractor` class.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## About
For more projects and information, visit my GitHub profile: [ferchaure](https://github.com/ferchaure)
Raw data
{
"_id": null,
"home_page": null,
"name": "tracking-graph",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Fernando Julian Chaure",
"author_email": "fchaure@fi.uba.ar",
"download_url": "https://files.pythonhosted.org/packages/01/59/73aba78ede0d07b45f0667a43a4f79afe7684e2b6bde61a2c66973faf8c2/tracking_graph-0.9.0.tar.gz",
"platform": null,
"description": "# Tracking_Graph\n![GitHub License](https://img.shields.io/github/license/reylab/tracking_graph)\n\nTracking_Graph is a tool for track units across spike sorting solutions. This package is part of the PhD \nThis project is part of my PhD research at [University Name]\n\n## Installation\n\nInstall Tracking_Graph using pip:\n\n```bash\npip install tracking_graph\n```\n\n## Usage\n\n### Creating a Graph\n\n```python\nfrom tracking_graph import run_tg, get_tg_groups, EuclideanClassifier\n\n# Create a classifier\nmodelcreator = EuclideanClassifier.creator(std_mult=3) # Classify spikes with length > 3 std\n\n# Run Tracking_Graph\nG = run_tg(\n we_list, # List of WaveformExtractor objects\n outputfile='/home/user/examplefolder/tg_data.hdf5',\n max_len=2, # Maximum edge length, must be at least 1\n modelcreator=modelcreator\n)\n\n# Compute results programmatically (can be replaced by the GUI)\ngroups, sG, discarded = get_tg_groups(\n G,\n mintrack=3, # Minimum number of segments for a cluster\n merge=True # Apply criteria to merge splits\n)\n\n# Create a final results table\nimport pandas as pd\n\ndf = []\nfor gi, g in enumerate(groups):\n for c in g:\n df.append({'segment': c.segment,\n 'cluster': c.unit,\n 'tg_unit': gi})\n\nresults_table = pd.DataFrame(df)\n```\n\n### Exploring Simplified Graphs with GUI\n\nLaunch the graphical interface (Streamlit server) using:\n\n```bash\ntg_gui\n```\n\n### Additional Tools\n\nTracking_Graph provides a wrapper to load aligned waveforms from Wave_Clus clustering results, addressing limitations in SpikeInterface's waveform interpolation:\n\n```python\nfrom tracking_graph.spikeinterface_addons import Waveclus_Waveforms\n\npath_times_file = '/home/user/examplefolder/times_example.mat' # Full path to Wave_Clus result\nwe = Waveclus_Waveforms(path_times_file) # Object with basic WaveformExtractor interface\n```\n\n## Limitations\n\n- Tracking_Graph requires `spikeinterface<=0.100` due to its dependency on the `WaveformExtractor` class.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## About\nFor more projects and information, visit my GitHub profile: [ferchaure](https://github.com/ferchaure)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Algorithm to track clusters across recordings",
"version": "0.9.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "edd955f19880a6bfe055e4281fdf52c28a9e8bca1b5b9d2fd1c70a9d1cf90ba2",
"md5": "8101ac271c680bc5130e3649d470a786",
"sha256": "0a9d8c0f6c2e4ff3b1d2c73de43f5ccc135512dcf0d491af5ffdc94e73fdd454"
},
"downloads": -1,
"filename": "tracking_graph-0.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8101ac271c680bc5130e3649d470a786",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 23015,
"upload_time": "2024-08-27T22:44:56",
"upload_time_iso_8601": "2024-08-27T22:44:56.303735Z",
"url": "https://files.pythonhosted.org/packages/ed/d9/55f19880a6bfe055e4281fdf52c28a9e8bca1b5b9d2fd1c70a9d1cf90ba2/tracking_graph-0.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "015973aba78ede0d07b45f0667a43a4f79afe7684e2b6bde61a2c66973faf8c2",
"md5": "1946dd6f5da9b85ce910f56cefb5c65e",
"sha256": "9227a64fbf034991f6c609ac98acdc103a939113d97bc4497ddb829cb0b2dab8"
},
"downloads": -1,
"filename": "tracking_graph-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "1946dd6f5da9b85ce910f56cefb5c65e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 21460,
"upload_time": "2024-08-27T22:44:57",
"upload_time_iso_8601": "2024-08-27T22:44:57.844983Z",
"url": "https://files.pythonhosted.org/packages/01/59/73aba78ede0d07b45f0667a43a4f79afe7684e2b6bde61a2c66973faf8c2/tracking_graph-0.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-27 22:44:57",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "tracking-graph"
}