🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

synapse-selector

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

synapse-selector

Small internal package for post-selection of Glutmate/Calcium signal responses.

0.2.13
92

Supply Chain Security

100

Vulnerability

98

Quality

100

Maintenance

100

License

Maintainers
1

Synapse Selector

Table of Contents

Overview

Lorem ipsum

Installation

You will need Anaconda to be installed. If Anaconda is installed, open the "Anaconda Prompt" (Windows) or a terminal (Linux + Mac).

  • Create a conda enviorment:

       conda create -n synapse_selector python=3.10 pip
       conda activate synapse_selector
    
  • Install synapse selector:

       pip install synapse_selector
    

Alternatively, you can also clone this repository and install it from there

   git clone https://github.com/s-weissbach/synapse_selector.git
   cd synapse_selector
   pip install -e .

Getting Started

The mean traces should be stored in a .csv or an excel file .xls, .xlsx. Ensure that the mean traces are organized with one trace per column. You can have columns with meta information (e.g. Time) that will be carried over to the output files.

Example input file

Time (ms)Trace 1Trace 2(...)
023.518.7(...)
125.120.3(...)
222.817.6(...)
321.419.2(...)
4(...)(...)(...)

[!Tip] Meta columns won't be included for analysis, but will be carried over to the output files.

Run Synapse Selector

To run Synapse Selector, follow these steps:

  • conda activate synapse_selector
    
  • Launch the Synapse Selector using the following command:
    python -m synapse_selector
    

Adapt the Settings

To access the settings, press the settings symbol in the top icon bar. The settings are organized in the Tabs General, Detection, Threshold Settings, and Stimulation.

General

In the general settings section, you can configure the following options:

  • Set Output Path: Specify the directory where you want the output files to be saved.
  • Export as XLSX: Choose whether to export the results in XLSX format, otherwise .csv files will be created.
  • Add/Remove Meta Columns: Customize the meta columns based on your requirements.

Detection

[!NOTE] Rolling window z-normalization will be applied for detection.

Configure the detection settings according to your analysis preferences:

  • Selection Methods: Choose between ML-based and Thresholding.
  • Deep Learning Model: If ML-based selection is chosen, specify the deep learning model specific for the sensor you used.
  • Time Window for Tau Computation: Set the time window for tau computation, which determines the decay estimate.
  • Show Normalized Trace (Toggle): Toggle this option to display z-normalized traces in the output.
  • Compute PPR (Toggle): If stimulation was used, enable this option to compute the paired pulse ratio (PPR).

Threshold Settings

  • Baseline Start: Specify the start point of the baseline for threshold calculation.
  • Baseline Stop: Define the stop point of the baseline for threshold calculation.
  • Threshold Multiplier: Set the multiplier used in the

[!NOTE] Threshold is calculated witht the formula: $$\text{threshold} = (\text{multiplier} * std_{baseline}) + mean_{baseline}$$

Stimulation

  • Enable Stimulation (Toggle): Toggle this option when you used stimulation in this recording.
  • Start Frame for Stimulation: Specify the starting frame for stimulation. Stimulation frames will be infered automatically.
  • Step Size for Stimulation: Set the step size for stimulation. Stimulation frames will be infered automatically.
  • Patience: Define the duration for which a response should be counted as a valid response to the stimulation.
  • Use Manual Stimulation Frames: Input stimulation frames manually

[!IMPORTANT] When entering stimulation frames manually, separate the frames by commas without spaces.

Usage

Shortcuts and brief overview

CommandButtonShortcutDescription
Open FileCtrl + OOpen a file
Save FileCtrl + SSave all traces up to this point and discard the rest
SettingsSOpen the settings
BackBGo one trace back
DiscardQDiscard trace from analysis
AcceptEAccept trace and keep for analysis
Modify ResponsesWAdd or remove responses

Detailed explanation

  • Open a File pressing the open button in the top bar.

    • Synapse Selector will visualize the first column of the file that is not a meta column.
    • All detected responses will be annotated.
    • If specified in the settings, a horizontal, red dashed line will be shown
  • Modify responses pressing the modify response button in the top bar

    • A window with all detected responses will be opened
    • Deselect false-positive responses
    • Add false-negative responses
  • Accept or Discard a trace

    • To accept a trace and subsequently include it in the analysis:
    • To discard a trace from analysis:
  • Change certantiy threshold (only when using ML-based detection):

    • Use the slider at the bottom to adjust the certantiy threshold used in the model. A lower threshold will lead to more detections, possibly, to more false-positives.
  • Save and skip rest: press the save button in the top bar. All remaining traces of the file will be discarded.

Train a custom Model

See the Synapse Selector Detect for detailed tutorial on how to train a custom model.

[!Tip] You can share your model with the community - submit it to Synapse Selector Modelzoo.GitHub - s-weissbach/synapse_selector_modelzoo.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts