Skip to main content

Tracking_Graph

GitHub License

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:

pip install tracking_graph

Usage

Creating a Graph

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:

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:

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

Release files for tracking-graph 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracking-graph 0.9.0
File Size Uploaded
tracking_graph-0.9.0.tar.gz 21.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tracking-graph 0.9.0
File Interpreter ABI Platform
tracking_graph-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.5 kB

Release files / tracking_graph-0.9.0.tar.gz

Download URL tracking_graph-0.9.0.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9227a64fbf034991f6c609ac98acdc103a939113d97bc4497ddb829cb0b2dab8
BLAKE2b-256 checksum
How to use checksums
015973aba78ede0d07b45f0667a43a4f79afe7684e2b6bde61a2c66973faf8c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / tracking_graph-0.9.0-py3-none-any.whl

Download URL tracking_graph-0.9.0-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a9d8c0f6c2e4ff3b1d2c73de43f5ccc135512dcf0d491af5ffdc94e73fdd454
BLAKE2b-256 checksum
How to use checksums
edd955f19880a6bfe055e4281fdf52c28a9e8bca1b5b9d2fd1c70a9d1cf90ba2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page