Skip to main content

A python package to estimate anatomical location using iEEG probes

Project description

LFP-LOC

Code associated to the method presented in the paper: "LFP-LOC: an LFP power–based method for the anatomical localization of high-density neural probes" (in-review).

Estimate a probe's anatomical location using the power spectral features present in canonical LFP bands. Recording and probe parsing directly handled through SpikeInterface.

image
Overview of the LFP-LOC algorithm

How to install

In the Python environment you plan on using, run the following command:

pip install lfploc

How to use

  1. Initialize the recording you intend to use with spikeinterface

    # example for SiNAPS recording
    from spikeinterface.extractors.sinapsrecordingextractors import read_sinaps_research_platform_h5
    
    rec_path = r"D:\recording.h5"
    rec = read_sinaps_research_platform_h5(rec_path)
    
  2. Import the LFP-LOC library and initialize a new instance of the Lfploc class

    from lfploc import Lfploc
    
    loc = Lfploc(rec)
    
  3. Run an analysis using loc.run()

    cluster_labels = loc.run(
        feature_extraction_method="PCA",
        clustering_method="hierarchical",
        end_time=50,
        save_report_dir=r"E:\lfploc_report",
        ap=-2.3,
        ml=-2.6,
        dv=-2.5
    )
    

Extra information

Report

To skip generating the report and extract just the cluster labels, simply skip passing the save_report_dir argument.

Report generation (toggled by passing the save_report_dir argument) is required when providing ap, ml, and dv coordinates in order to save the plot of the probe overlapped to the atlas.

Atlas

Any atlas included with brainglobe-atlasapi should work by default. The atlas used for running the analyses and creating the plots included in the paper is kim_mouse_isotropic_20um (also the default parameter). Testing was only performed on the 20um version of this atlas, so changing atlas is highly experimental.

Stereotactic coordinates on Atlas

DV is always adjusted to include the offset between the top margin of the image (bregma coordinate) and the start of the cortex on the same coronal plane. This was done since DV coordinates are generally calculated from the surface of the brain rather than from the bregma.

Just the stereotactic coordinates can be plotted on the atlas by running the loc.place_coordinates_on_atlas(ap, ml, dv, save_report_dir) method and passing the coordinates and path to where to save the plot generated.

How to cite

Paper in-review

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lfploc-0.0.2.tar.gz (130.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lfploc-0.0.2-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file lfploc-0.0.2.tar.gz.

File metadata

  • Download URL: lfploc-0.0.2.tar.gz
  • Upload date:
  • Size: 130.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for lfploc-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5a956f40c17ee0b05bd8d02fbee0b0ed1ff0850fc91e2b5a4f626ae14d16e6e6
MD5 52bc4ac3169cde99c476b7b3d18685d2
BLAKE2b-256 c69ac3e8215ee58788cc70110c8fe8009680bdc0d293ff6c9775cb5cfc8ba4e9

See more details on using hashes here.

File details

Details for the file lfploc-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: lfploc-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for lfploc-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb313e8f1d63f3f851fc8212f90b341ff502ffc8a187cdea8c521d8cc3a629d7
MD5 1413174526dc255f96ed039e80c41f8d
BLAKE2b-256 3ef0f4c7f8bdadb56658d355587b72948a0a695b374008ebe1f796d2c189ffa4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page