different branch IDs in gcf and scfl for the same species tree #478
|
Hello, I am interested in comparing the gcf and scfl for some nodes of a species tree that is interest to me. For example as shown here: https://www.robertlanfear.com/blog/files/concordance_factors.html What I want to explore is how scf and gcf relative to branch length and branch support as the example here: However, instead of -scf I am using -scfl option which is recommended in the documentation. The commands I use are: compute gene concordance factorsiqtree2 -t ${SPECIES_TREE} --gcf ${TREE_FILE} --prefix concord.gcf compute site concordance factor using likelihoodiqtree2 -te ${SPECIES_TREE} -s ${CONCAT_FASTA} --scfl 100 --prefix concord.scfl where ${SPECIES_TREE} is the species tree; ${TREE_FILE} are the gene trees and ${CONCAT_FASTA} is the supermatrix alignment. When I explore the outputs of the above two analyses, however, I note that the branch IDs are different in the two cases. For example see below: Since the branch IDs are different I cannot visualize the relationship between gcf and scfl relative to branch length and branch support I am not exactly sure why I am getting two different branch IDs in gcf and scfl outputs because I am using the same species tree. I would be very much grateful, if you could let me know how to fix this? Thank you very much! |
Replies: 3 comments 5 replies
|
Hi Hiranya, This is interesting, thanks for noticing this. @bqminh will be the person who might know how to fix the problem as asked, (and now you've pointed it out I'll need to double check my code for this https://iqtree.github.io/doc/recipes/concordance-vector. However, even without that there is a fix. If you follow the code here: https://iqtree.github.io/doc/recipes/concordance-vector, you'll see that one of the trees I produce has the sCF and gCF labels on the same tree. This way you can easily compare them using the tree file itself. Just search for the bit that says "Each internal branch in gcf.cf.tree will be annotated like this:", and you should be able to recreate the necessary steps to do the same. That way you don't need branch IDs at all. Rob |
|
@HiranyaSudasinghe, I've also double checked things and I find the same. With my code the branch IDs are consistent. I suspect the key difference is that in my code I compute the species tree first, and then fix it with In your code, when you are just supplying the species tree as a starting tree with You could try re-doing your code using Rob |
|
Thanks all. I'm going to close this one now. To re-iterate for anyone finding this discussion, this is the expected behaviour. In other words - if you set a starting tree with Of course, I do understand that this feels like a nuanced point, particularly if you're not used to it. Hopefully the existence of this thread will help disambiguate things for people! Rob |





Dear Rob,
Thank you for your reply!
So, I followed: https://iqtree.github.io/doc/recipes/concordance-vector
and calculated gcf as follows:
iqtree2 -te concord.scfl.cf.tree --gcf ${TREE_FILE} --prefix concord.gcf.new
where concord.scfl.cf.tree is the tree output from: iqtree2 -te ${SPECIES_TREE} -s ${CONCAT_FASTA} --scfl 100 --prefix concord.scfl
Then I compared the branch IDs again and now they are consistent!
concord.scfl.cf.branch
concord.gcf.new.cf.branch
So, now it should be possible to compare the scfl and gcf as I wanted.
However, if I follow the iqtree documentation as:
compute gene concordance factors
iqtree3 -t concat.treefile --gcf loci.treefile --prefix concord
compute site c…