Getting Started with PASTa
Here you'll find the quick start guide to set up PASTa with instructions on installation and basic use of the toolbox. Once your device is set up, move to the User Guide for detailed documentation on the use of the PASTa Protocol for analysis.
Set Up and Installation
PASTa is an open-source MATLAB-based toolbox, containing a series of functions to extract, process, and analyze photometry data. Users must first install MATLAB (version 2020a or later) and add the Signal Processing Toolbox add-on. Following MATLAB installation, users can install PASTa three ways: 1) MATLAB Add-On Explorer, 2) downloading the PASTa MATLAB toolbox installation file from the PASTa GitHub, or 3) local installation of the PASTa GitHub repository.
Install MATLAB
First, users must ensure that MATLAB is installed on the local computer used for analysis. The Signal Processing Toolbox is a required dependency of PASTa.
To install MATLAB, visit the MathWorks site. Multiple license types are available, including Academic ($275/year) and student ($99/year). For more info, see MATLAB Pricing. Licensing may also be available through your university.
After installing MATLAB, ensure the Signal Processing Toolbox is installed as an Add-On. To install the Add-On:
-
At the top of the MATLAB window, select the Home tab
-
Under Environment, select Add-Ons. Click Get Add-Ons
-
In the Search bar, search for "Signal Processing Toolbox"
-
Install the Signal Processing Toolbox Add-On
Install PASTa
Option 1: MATLAB Add-On Explorer
PASTa installation as a MATLAB toolbox through the MATLAB Add-On Explorer is the recommended method to install the toolbox to ensure MATLAB is set up to properly access the functions. This guarantees version stability and accessible for newer users of MATLAB as functions will be installed and accessed similarly to built-in MATLAB functions.
To install PASTa through the MATLAB Add-On Explorer:
-
At the top of the MATLAB window, select the Home tab
-
Under Environment, select Add-Ons. Click Get Add-Ons
-
In the Search bar, search for "PASTa"
-
Install the PASTa toolbox Add-On
Option 2: MATLAB Toolbox Installation File on GitHub
Installation via the MATLAB toolbox file in the PASTa GitHub is another option and may be necessary for MATLAB users with older versions that are not compatible with the Add-On explorer or are not tied to a current MATLAB license subscription.
To install PASTa through the MATLAB Toolbox file on GitHub:
-
Navigate to the PASTa GitHub repository: https://github.com/rdonka/PASTa
-
Download the file "PASTa.mltbx"
-
Open the file "PASTa.mltbx". The toolbox will be automatically installed to MATLAB.
Option 3: Clone the PASTa GitHub Repository
To access PASTa, users can also copy the toolbox functions to a local folder of the user's choice and then add that folder to the MATLAB path. If desired, users can create a local copy of PASTa by cloning the repository via GitHub desktop. The use of GitHub desktop allows users to easily fetch updates to the repository. Installation of PASTa through cloning of the GitHub repository is more dynamic and may facilitate integration of version updates as they are released. New versions of PASTa will continue to include integration of newly developed signal processing methods, bug fixes, and analysis features as they are released.
To download and use PASTa directly via the GitHub repository:
-
Download GitHub and GitHub Desktop.
- For detailed instructions on GitHub setup, see https://docs.github.com/en/desktop/installing-and-authenticating-to-github-desktop/setting-up-github-desktop
-
Clone the PASTa repository.
-
To make it easy to locate repositories, we recommend making a folder on your desktop called "GitHubRepositories" and cloning all repositories there.
-
For detailed instructions on cloning repositories, see https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
-
-
Add the path to the cloned PASTa repository to MATLAB at the start of each analysis session.
- For instructions to add folders to the search path, see https://www.mathworks.com/help/matlab/ref/addpath.html
Note: The file main_ExampleAnalysis_Transients.m in the Example Analyses folder serves as a template for the main script to run functions described in the protocol. An example of adding the cloned PASTa repository folder to path is included at the beginning of the script.
For an overview of how to use GitHub and best practices: https://www.freecodecamp.org/news/introduction-to-git-and-github/
Get Started with an Example Analysis
To help users get started with PASTa, the repository includes a full example analysis. The example includes all stages of the pipeline from data preparation through signal processing and transient event detection and analysis. For full details, see the Example Analyses page.
Learning Resources
For users unfamiliar with MATLAB, we have compiled some helpful introductory resources on the Learning Resources page.
Time Considerations
The initial installation of PASTa is easy and quick when done through the MATLAB Add-On Explorer, or via the packaged toolbox file included in the PASTa GitHub repository. This is recommended for users less familiar with MATLAB or GitHub. For users who are comfortable with GitHub and GitHub Desktop, cloning the repository is straightforward. For newer users seeking to access the toolbox by cloning the GitHub repository, expect a few hours to get acquainted with both GitHub and the addition of the toolbox to MATLAB.
Data preparation time for initial users of PASTa will vary depending on existing data organization practices. While we recommend a specific data organization structure for initial users of PASTa (Basic Protocol 2), PASTa functions are written to be flexible to alternative data organization practices. Allot 2 hours for the data organization process.
Once data organization is complete, the remaining protocols should take limited time to apply if using PASTa default options. A full example of an analysis from data organization to signal processing and transient detection is included in the repository. Adapting the example analysis to the user’s experiment will typically take approximately 1-2 hours. Allot additional time if the user is new to MATLAB, or if experimental design requires more custom modifications.
Together, we anticipate that a new user of PASTa should be able to complete all protocols within approximately 4-5 hours. After initial set up, running the full pipeline including data extraction, signal processing, transient detection and analysis, and plot generation typically takes approximately 1 minute for each fiber photometry session.
Contact Us
Please feel free to reach out with questions, feedback, and feature requests. PASTa is actively maintained, and will continue to integrate new features into future versions. Version releases will be continually added to GitHub, and details are also available on the Version Release Notes page.
To facilitate community discussion, we are actively maintaining the Discussions Forum via GitHub, which includes channels for announcements, feature requests, troubleshooting, and general discussions. Our individual contact information is also available here.