This repository holds the code to reproduce the analysis in our Lause, Berens & Kobak (2024) preprint and contains the main and supplementary figures.
To reproduce our analysis, follow the steps below. We assume you have git
and conda
installed.
- Clone this repository.
git clone [email protected]:berenslab/elephant-in-the-room.git
- Inside the main folder of the repo, go to the
src
folder. - In
src
, clone our Picasso fork. - Go back to main folder.
cd src
git clone [email protected]:berenslab/picasso.git
cd ..
- Install the conda environment for Picasso.
conda env create -f src/picasso/env/env3.7_LINUX.yml
- From the main folder of the
elephant-in-the-room
repo, activate thepicasso_env
environment and install our Picasso fork withpip
.
conda activate picasso_env
pip install -e .
- Install our conda analysis environment.
conda env create -f environment.yml
- Activate our conda analysis environment.
- Start jupyter lab to run notebooks 1&2 in the
scripts
folder. This will download the data, run preprocesing and compute PCA, t-SNE and UMAP embeddings.
conda activate elephant_analysis_env
jupyter lab
- After that, activate the Picasso anvironment and start jupyter notebook to run notebook 3. This will run Picasso and create the elephant embeddings.
conda activate picasso_env
jupyter notebook
- After that, again activate our analysis environment.
- Start jupyter lab to run the remaining notebooks 4&5. This will run the evaluations and prepare the plots.
conda activate elephant_analysis_env
jupyter lab
We used conda 23.11.0
on a recent laptop with 16GB RAM running LINUX 6.5.0-18-generic #18~22.04.1-Ubuntu
. See environment.yml for more information on the analysis environment, and env3.7_LINUX.yml for more information on the Picasso environment.
Notebook 1 and notebook 3 use code adapted from the github repository CP_2023 by Chari & Pachter, which is subject to the following licence:
BSD 2-Clause License
Copyright (c) 2021, Pachter Lab
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.