iqtree / piqtree2

a python library that exposes features from iqtree2 - efficient software for phylogenomic inference
GNU General Public License v2.0
10 stars 3 forks source link

ENH: expose additional IQ-TREE functions #41

Open rmcar17 opened 1 month ago

rmcar17 commented 1 month ago

Anything else?

thomaskf commented 1 week ago

ModelFinder function is now available for PiQTREE. Commit: https://github.com/iqtree/iqtree2/commit/80034a3cbc57a19fbd53b200b0e26e584c76f980

thomaskf commented 1 week ago

The function to build the JC distance matrix is now available in C+++ side. Commit: https://github.com/iqtree/iqtree2/commit/9dce368e9dd3a6a1e550f1d9cc479b1b0fed28ca

thomaskf commented 1 week ago

@rmcar17 @GavinHuttley, Could you clarify if we still need the function to report the ML distance matrix (i.e., the .mldist file) after the phylogenetic inference is completed? During the meeting, I understood that the first objective was changed to report the JC distance matrix directly from an alignment without inferring a tree. I’ve just done this.

thomaskf commented 1 week ago

The function to use Rapid-NJ to build a tree from a distance matrix is now available in C++ side. The last commit: https://github.com/iqtree/iqtree2/commit/cf47d3617480fd5f466ec6ad7aee2c7a4b9aecd6

thomaskf commented 1 week ago

The declarations of these three functions:

// Perform phylogenetic analysis with ModelFinder
// on the input alignment (in string format)
// model_set -- a set of models to consider
// freq_set -- a set of frequency types
// rate_set -- a set of RHAS models
// rand_seed -- random seed, if 0, then will generate a new random seed
// output: modelfinder results in YAML format
string modelfinder(vector<string>& names, vector<string>& seqs, int rand_seed = 0,
                   string model_set = "", string freq_set = "", string rate_set = "");

// Build pairwise JC distance matrix
// output: a phylip-formated distance matrix (in string format)
string build_distmatrix(vector<string>& names, vector<string>& seqs);

// Using Rapid-NJ to build tree from a distance matrix
// input: a phylip-formated distance matrix (in string format)
// output: a newick tree (in string format)
string build_njtree(string dist_matrix);
thomaskf commented 1 week ago

If there is any bug, please kindly let me know. I have not tested the functions extensively. Many thanks @rmcar17 !

rmcar17 commented 1 week ago

Thanks @thomaskf! I'll get to porting these over to the python side of things soon.

Re: mldist may as well keep as is for now

GavinHuttley commented 1 week ago

We don't need the ml , just the distance matrix