A detailed protocol for the installation, use and modifcation of this software can be found in Current Protocols in Neuroscience at: https://doi.org/10.1002/cpz1.763
New Users: Follow the instructions below to install the GUI
Our code utilizes Python and numerous packages within it, if you do not already have Python installed on your device, please refer to these links before continuing:
https://wiki.python.org/moin/BeginnersGuide/Download
https://docs.anaconda.com/anaconda/install/
https://pip.pypa.io/en/stable/installation/
Note: this application was developed and tested with Python version 3.9, so it is recommended to install this version or higher in your environment.
Download Code
- Navigate to https://github.com/donaldsonlab/PhAT
- Click on the green button labeled “Code” located at the top right corner of the repository, then click on “Download ZIP” (Ensure that this file is saved locally on your device i.e., not on any cloud environments).
- Locate the downloaded zip file on your device and place it somewhere convenient to easily navigate to it again. Avoid cloud storage.
- Unzip the file by right clicking on it and selecting unzip or use an unzipping utility (e.g., WinRAR on Windows systems).
- Take note of the FiberPho_Main folder location (folder path needed later).
a. Mac/Unix: Right click on the folder, Hold the Option key, and copy “PhAT” as Pathname.
b. Windows: Right click on the folder, select Properties, and take note of the text written next to Location on your computer, this is the folder’s path.
Create Virtual Environment Using Anaconda (Option 1: Recommended)
- Open a new terminal window (Mac/Unix) or Anaconda Prompt (not Anaconda Navigator) (Windows).
- Navigate to the location of the “PhAT” folder (noted in Step 3) using the command:
“cd [path_to_PhAT_folder]”
Ex: cd Desktop/DonaldsonLab/PhAT - Create a virtual environment:
“conda create -n [your_env_name] python=[version] pip”
Ex: conda create -n my_gui_env python=3.9 pip - Activate the virtual environment with the following command:
“conda activate [your_env_name]”
Ex: conda activate my_gui_env - Update conda with the following command:
"conda update -n base -c defaults conda" - Install jupyter lab or jupyter notebook using the following commands:
"conda install -c conda-forge jupyterlab" and/or "conda install -c conda-forge notebook" - Execute the following command to install dependencies:
“pip install -r requirements.txt” - Optional* Add the tmac package (https://github.com/Nondairy-Creamer/tmac) for motion correction:
"cd Fiberpho_main"
"git clone https://github.com/Nondairy-Creamer/tmac"
"cd tmac"
"pip install -e ."
cd ..\.. - Launch jupyter lab or notebook from the terminal by typing one of the following commands:
"jupyter lab"
"jupyter notebook"
Note: If you choose to launch these applications of Anaconda Navigator be sure to change the environment on the Anaconda Navigator from base(root) to your new environment.
Using PIP/PyPI (Option 2)
- Open a new terminal window (command prompt for Windows)
- Navigate to the location of the “PhAT” folder (noted in Step 3) following command:
“cd [path_to_PhAT_folder]”
Ex: cd Desktop/DonaldsonLab/PhAT - Create a virtual environment and give it a name (e.g. “my_gui_env”) using one of the following commands.
i. Mac/Unix: “python3 -m venv [your_env_name]”
ii. Windows: “py -m venv [your_env_name]” - Activate the virtual environment.
i. Mac/Unix: “source [your_env_name]/bin/activate”
ii. Windows: “.[your_env_name]\Scripts\activate” - Execute the following commands to install dependencies.
“pip install -r requirements.txt” - Launch the GUI by executing the following bash script in your terminal:
"bash gui_script.sh" - Optional* Add the tmac package (https://github.com/Nondairy-Creamer/tmac) for motion correction with the following commands:
"cd Fiberpho_main"
"git clone https://github.com/Nondairy-Creamer/tmac"
"cd tmac"
"pip install -e ."
cd ..\..