Skip to content

Repository files navigation

PpaPred

Prediction Pipeline for foraging behaviours of Pristionchus pacificus based on PharaGlow

Steps:

  1. Download git repository:
    with ssh: git clone git@github.com:scholz-lab/PpaPred.git

  2. Install environmnet:
    conda env create -f requirements.txt -n PpaPred or conda env create -f environment.yml

  3. Edit config and config_batch files, to specifiy path to your PharaGlow files, etc.

  4. predict files from your terminal...
    a. either individually without slurm:
    conda activate PpaPred or source activate PpaPred
    python -u predict.py -p "pattern"
    b. individually with slurm:
    sbatch Predict.sh "pattern"
    c. or multiple with slurm script (edit multiPredict.sh by providing name patterns of folders)
    c. sh multiPredict.sh

If you want to use the provided jupyter notebook for batch analysis:

  1. Activate ipykernel for env (only once):
    conda activate PpaPred or source activate PpaPred
    Then python -m ipykernel install --user --name PpaPred

  2. Edit config_batch.yml and provide patterns of files you want to analyse.

  3. Connect to jupyter notebook and run BatchAnalysis_combined.ipynb step by step.

Happy Predicting :D

Folder Structure

This program uses patterns in the file and folder names to find files. Thus, the easiest way to handle predictions and pull data recorded at different days for comparison, is to have unique ids that can be used for identifcation: e.g. an id for the experiment (e.g. LB001), or specify condition and experiment id within the folder names (e.g. Exp01_WT, or LB001_WT). Alternatively, place files or folders in uniquely identifable folders, which can be specified as path in the config file.

Update

If you want to pull changes from origin, you might encounter problems with BatchAnalysis_combined.ipynb. This is likely due to the output generated in this file. The easiest solution for this is to stash changes before pull.
git stash
git pull
git stash pop

About

This repository provides code to run the predation prediction model described in https://www.biorxiv.org/content/10.1101/2024.08.02.606321v1

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages