DEPP - AngusBall/The-Wailing-Somnambulant GitHub Wiki

heres a link to their git: depp
and git from the cdepp paper: cdeep git
\

Okay to use DEPP we need to 1) train DEPP on the greengenes2 tree with ASV sequence files and tree 2) then I can place our ASV files

Installing DEPP

First try DNU

You'll need to install DEPP and apples

wget --no-check-certificate ter-trees.com/data/depp/latest/depp_env.yml && conda env create -f depp_env.yml && rm depp_env.yml

Except this doesn't work. The reason seems to come down to incompatible python versions. Okay. lets create a virtual older version of python so we can run DEPP.

conda create -n py3812 python=3.8.12

Then we can...

conda activate py3812 

Or

conda deactivate

Okay, I still couldn't get it working easily. There are issues with a specific package thats not exactly backwards compatible. I solved this by running

pip install --no-dependencies depp==0.3.1

And then I would get error messages for all the dependencies that were missing and I'd just individually pip install them

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
depp 0.3.1 requires apples, which is not installed.
depp 0.3.1 requires biopython==1.79, which is not installed.
depp 0.3.1 requires dendropy==4.5.2, which is not installed.
depp 0.3.1 requires numpy==1.22.3, which is not installed.
depp 0.3.1 requires pandas==1.4.2, which is not installed.
depp 0.3.1 requires pytorch-lightning==1.5.4, which is not installed.
depp 0.3.1 requires scipy==1.7.3, which is not installed.
depp 0.3.1 requires torch==1.11.0, which is not installed.
depp 0.3.1 requires treeswift==1.1.19, which is not installed.
depp 0.3.1 requires omegaconf==2.1.0, but you have omegaconf 2.0.6 which is incompatible.

Dont forget to also download nw_ultils

conda install -c bioconda newick_utils=1.6

and gappa

conda install bioconda::gappa

But at the end of the day this didn't work, why? for whatever reason this version of depp still didn't contain cDEPP, how could I tell? uhm it threw an error about not knowing what -c was, i checked the specific python scripts and they were different and importantly when I tried training a dataset i ran out of memeory (presumably) when it was making the matrtix.

Second try

conda create -n py310 python=3.10

The main difference between the first and second try was manually installing omegaconf based on this issue.
Essentially,

git clone https://github.com/omry/omegaconf.git
cd omegaconf
python setup.py sdist
pip install dist/omegaconf-<version>.tar.gz

Dont forget to also download nw_ultils

conda install -c bioconda newick_utils=1.6

and gappa

conda install bioconda::gappa

Finally

pip install depp

But it seems to be working...

Creating a model

To train a DEPP model you need a couple things 1) the backbone tree (downloaded from greengenes2), 2) the backbone sequence file (created from the full 16S region alignment within MOTHER), 3) specificying we aren't using any gpus, 4) epochs is how many times we're running the model (The DEPP paper suggests 500 is good enough, but the default is 2000 e.g. -e 2000) 5) IMPORTANT -c tells the code to use cDEPP which is mandatory

train_cluster_depp.sh -t tree.file -s backbone.fasta -g nogpu -o outdir -c True

The code to how to do this is poorly explained and sporadic. There is the cDEPP read me file, the main git page, and the dataset_cdepp explanation

Therefore to train the V3 region...

train_cluster_depp.sh -t greengenes2_tree.nwk -s GG2_aligned_v3.fasta -g nogpu -o outdir_v3 -c True

Giving up

Look the DEPP "Documentation" is minimal at best and contains differenting opinions train_depp versus train_cluster_depp ect. It does nto appear to be maintained and no ones answering the issues. Shame, I tried training the v3 model and I maxed out to 200 gb ram a couple times enough to know I probably can't train the model. One othe rperson had a similiar issue so Im giving up and moving to SEPP or something. Shame depp seemed cool

⚠️ **GitHub.com Fallback** ⚠️