Coder Social home page Coder Social logo

skrackow / pathfinder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matthewbcooke/pathfinder

0.0 0.0 0.0 51.38 MB

Search Strategy analysis and more for spatial navigation data in rodents

Home Page: https://matthewbcooke.github.io/Pathfinder/

License: GNU General Public License v3.0

MATLAB 0.77% Python 99.23%

pathfinder's Introduction

Pathfinder DOI

Morris Water Maze search strategy and entropy analysis.

Created by Matthew Cooke at The University of British Columbia, Jason Snyder Lab

For a more detailed overview of Pathfinder please visit our Wiki

Synopsis

The Pathfinder package is a search strategy analysis tool for the Morris Water Maze, and can be expanded for other spatial navigation tasks. The program analyses X-Y coordinate data exported from commercially available tracking software. Pathfinder currently supports outputs from: Ethovision, Anymazy, WaterMaze, and ezTrack. We then calculate the best-fit search strategy for the trial. Trials are fit into one of: Direct Swim, Directed Search, Focal Search, Spatial indirect, Chaining, Scanning, Thigmotaxis, and Random Search.

Citing

If you use Pathfinder, please cite: Cooke MB, O'Leary TP, Harris P et al. (2019) Pathfinder: open source software for analyzing spatial navigation search strategies. F1000Research, 8:1521. https://doi.org/10.12688/f1000research.20352.1

Usage Example

  1. The program can be opened by calling pathfinder (type pathfinder into a terminal window) if installed through PyPi or by navigating to your install location and calling (typing into terminal) python pathfinder.py in a terminal window. See Installation for install instructions.

  2. This will open up the main GUI window.

    Window Preview

  3. You can select an inividual file or a directory containing export files from the File drop-down menu.

  4. From here you can choose to either (A) generate heatmaps for the chosen trials, or to (B) calculate search strategies.

(A) Generating Heatmaps

The Pathfinder package allows for the efficient generation of heatmaps. To do so, follow these steps.

  1. Once a directory or file has been imported, select File -> Generate Heatmaps

  2. A parameters panel will appear:

    Heatmap parameters

  3. The parameters panel lets you tailor the output to your needs:

    1. Grid size. This roughly translates into how many bins to put the data in. For more information on grid size see matplotlib documentation (here).

    2. Maximum Value. This will allow you to change at which value the points in the heatmap will become their most saturated (dark red). Setting 'Auto' will dynamically assign the maximum value to be equal to the value of the maximum grid.

    3. Day: A day or range of days to use for calculating the heatmaps. (E.g. 1 or 3-6 or All)

    4. Trial: A trial or range of trials on the above selected days. (E.g. All or 1-4 or 2)

  4. You can then click generate, and our software will plot a heatmap of your trial data.

    heatmap display

(B) Search Strategy Analysis

  1. For search strategy analysis we have multiple options. To set your own strategy parameters, click settings.

  2. The settings button will spawn a parameters panel:

    settings parameters

  3. In the settings parameters pane, you can select and deselect any of the search strategies. Deselecting Strategies will remove them from consideration. You can also define the cutoff values for each strategy. For definitions of these values see Cooke et al., 2019, in preparation.

  4. Once you have chosen your parameters, be sure to select your tracking software. Ethovision, Anymaze, WaterMaze, and ezTrack are currently supported.

  5. You may then alter the main values to suit your data. Platform position, pool centre, and pool diameter can be automatically calculated for groups of trials with a consistent single platform location. For all other data, you must manually define these values (Example: Platform Position (x,y) | 6.53,-17.3). For more in-depth explanations of these values, see Cooke et al., 2019, in preparation.

  6. There are 4 checkboxes above the Calculate button. The first, Scale Values is used to automatically scale the default values in an attempt to better match your data. This uses the Pixels/cm and the pool diameter to determine a constant C with which to multiply some parameters. (Note: If you are using custom values, it is best to disable scaling) The two following checkboxes enable manual categorization. Manual categorization can be used for trials in which our algorithm was unable to make a determination (Manual categorization for uncategorized trials) or for all trials (Manual categorization for all trials). The last checkbox enables the calculation of entropy for the trial. This requires MATLAB.

    manual categorization

  7. Once you are satisfied with your parameters, click calculate. This will begin the process of determining search strategies for the trials. Once calculation is complete, you will be shown a display of the results.

    display

  8. Your results will be saved as a .csv file with whatever name was chosen in the Output File field. You will also receive a log file of the excecution, and any generated paths saved in your present working directory. The CSV file will automatically open with whatever default CSV software you use.

Motivation

This program was developed in order to simplify as well as remove inconsistencies in Morris Water Maze search strategy analysis.

Installation

Installing the program is easy for both macOS and Windows users.

Pathfinder requires you to have Python 3.6 or later. We highly recommend installing Conda for python via the Anaconda ๐Ÿ package https://www.anaconda.com/distribution/. Once installed, the installation of Pathfinder is easy.

For the most recent stable version, cloning the GitHub repository or installing via PyPi is possible. For the most recent beta version of the software, the develop branch of the GitHub repository will host the version currently being worked on.

Installation Instructions:

Windows:

Installing from the Python Package Index: Launch a CMD window by launching run from the start menu, and typing CMD in Run.

Once the CMD shell has opened, type pip install jsl-pathfinder

Press enter

Installing from GitHub

Download and install Git here: https://git-scm.com

Open Git Bash.

Change the current working directory to the location where you want the cloned directory to be made.

Type git clone https://github.com/MatthewBCooke/Pathfinder

Press enter


Mac:

Installing from the Python Package Index:

Open a terminal window (located in your utilities folder under the Applications directory.

Type pip install jsl-pathfinder

Press return

Installing from GitHub

Open a terminal window Navigate to the folder you wish to install Pathfinder into

Type git clone https://github.com/MatthewBCooke/Pathfinder/

press return

License

GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.