Skip to content
DessimozLabPublic

About

foldtree2

Resources

Stars

15 stars

Watchers

7 watching

Forks

Latest commit

 

History

491 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FoldTree2 Logo

FoldTree2

Infer maximum-likelihood phylogenetic trees from protein structures. FoldTree2 encodes structures into a learned discrete alphabet, aligns the tokens with MAFFT, and estimates a tree with RAxML-NG using model-specific matrices.

Your PDB structures -> residue graphs -> trained encoder -> structural tokens
                   -> MAFFT alignment -> RAxML-NG -> Newick tree

Start here: install, obtain a matching model bundle, then build a tree below. The supported release target is Linux x86_64, glibc >=2.34; macOS, Windows and ARM are not supported by the bundled native executables. Model weights and datasets are distributed separately from the Python/conda code package.

Quick start: build a tree from structures

Use at least four usable PDB files, unique filename stems, and a new output folder. The following illustrates an existing local 30-character bundle, not a public download or a claim that 30 states is optimal:

foldtree2 \
  --encoder models/production/30char_minimal_decoder/final_30char_contacts_aa_encoder_full_epoch_52.pt \
  --decoder models/production/30char_minimal_decoder/final_30char_contacts_aa_decoder_full_epoch_52.pt \
  --mafftmat models/production/30char_minimal_decoder/final_30char_contacts_aa_encoder_full_epoch_52_mafftmat.mtx \
  --submat models/production/30char_minimal_decoder/final_30char_contacts_aa_encoder_full_epoch_52_submat.txt \
  --charmaps models/production/30char_minimal_decoder/final_30char_contacts_aa_encoder_full_epoch_52_pair_counts.pkl \
  --structures "/path/to/structures/*.pdb" \
  --device cpu --ncores 4 --outdir results/new_run

The final inferred tree is results/new_run/*_.raxml.bestTree in Newick format. It is unrooted and does not automatically contain bootstrap support. Tree CLI guide covers inputs, outputs, rooting, ancestral inference and safe reruns.

Install

For development, start with a CPU environment and install from the checkout:

conda create -n foldtree2-cpu -c conda-forge -c bioconda python=3.10 pip mafft
conda activate foldtree2-cpu
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install .
foldtree2 --help

See the installation guide for validation status, CUDA, PyPI and conda release installation, executable checks and troubleshooting. Registry publishing is a release gate, not an assertion that the current development revision is already available there.

Other inference and training

Documentation

Command-line tools

foldtree2 and ft2treebuilder are aliases for tree inference. pdbs-to-graphs creates training datasets; makesubmat estimates matrices. hex2maffttext and maffttext2hex convert token representations. raxml-ng and mad wrap bundled native tools; MAFFT itself must be installed separately. Most Python CLIs have --help; native/conversion tools have their own usage conventions.

License and contact

Project code: MIT License. Bundled/derived third-party components retain their own licenses; see release licensing gates. Dave Moi (dmoi@unil.ch).

About

foldtree2

Resources

Stars

15 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors

Languages