To be able to use CUDA acceleration (for both `PLMV_embed` and `PLMV_compare_cuda`), make sure that PyTorch is installed correctly with CUDA and that you use the python interpreter assiociated with that pytorch installation.
To test wether CUDA can be used for parallelized alignment, try importing ```alignment_cuda``` in python.
To test wether CUDA can be used for parallelized alignment, try importing ```aligner.alignment_cuda``` in python.
to your .bashrc file to call the following scripts globally.
## Simplified pipeline
Bash script to run PLMView to build the functional tree starting from sequences and to compute explanations are provided in `scripts`. Feel free to change the different constants in those scripts.
Bash script to run PLMView to build the functional tree starting from sequences and to compute explanations are provided in `scripts`.
Feel free to change the different constants in those scripts.
We highly recommend, running `PLMV_run.sh` with carefully selected `min_seq_id` and `coverage`, used for automatic anchor selection using `mmseqs easy-cluster`, based on your dataset. Optimal values may depends on factors such as variability withing sequence, multi or single domain dataset, etc...
Build functional tree from `input_fasta`, result tree is stored in `working_dir/out/out_tree_<base_name>`:
Given `<basename>` explain splits containing `<refnode>` at `[nodes]`. Explanations are centered around `<refnode>`. `<seq-of-interest>`, are used explecitly used for explanation:
We highly recommend running `PLMV_run.sh` with carefully selected `min_seq_id` and `coverage`, used for automatic anchor selection using `mmseqs easy-cluster`, based on your dataset. Optimal values may depends on factors such as variability withing sequence, multi or single domain dataset, etc...
We also recommend, using no more than a few thousand anchors, for computational effectiveness.
python PLMView/src/PLMV_infer.py --repr-space new_out_comp --tree-path out_tree/cluster_tree.pkl --out-dir out --prefix inferred_leaves
```
7. Given a Fasta alignment, you can generate scores "explaining" the importance of each position in the overall classification of the sequences contained in said alignment. Generating scores for the left and right branches in a tree can be really helpful when looking at which positions are important for the split.
8. The scores obtained in 7. are more interpretable when we substract the right branch's score to the left's. This new score highlight what differentiate the 2 branches at a given node.
10. Step 7. 8. and 9. are useful if, given a family, you are interested into the inner functional differences. However if you want to understand what makes a subfamily functionally different from the others, you can use `python <script-basename>_1vsall.py ` with `<refnode>` being your subfamily of interest. and `<script-basename>` the corresponding script from step 7. 8. or 9.
## Remarks
To use `PLMV_explain.py` and `PLMV_infer.py`, if your tree is too large try setting `sys.setrecursionlimit()` to 10000.