Site concordance factors don't sum to 100

50 views
Skip to first unread message

Benjamin Anderson

unread,
Apr 10, 2024, 1:51:40 AM4/10/24
to IQ-TREE
Hi,

I posted about this two years ago (https://groups.google.com/g/iqtree/c/vUOgIs6lw2Q/m/EaINi8orAgAJ), but received no response. I'm running similar analyses again and I am again encountering the strange behaviour that site concordance factors (sCF, sDF1, sDF2) do not sum to 100.

It is possible my dataset doesn't have enough informative sites for those branches, but the behaviour of the program seems odd (even with IQ-TREE 2.3.1). This is using the "--scf" option.

I'll attach the new stat file again to illustrate.

Cheers,

Ben
concord.cf.stat

rob.l...@gmail.com

unread,
Apr 15, 2024, 8:04:46 PM4/15/24
to IQ-TREE
Hi Ben,

I will chat with Minh today about this - it's certainly true that usually the sCFs should sum to 1. I suspect that this is due to the very low number of informative sites present on most of your branches (e.g. on many branches the average number of informative sites you have is <1 across all quartets). Indeed, if you order your data by the number of informative sites, you can see that when you have >5 informative sites on a branch the numbers do indeed sum to 100.

I'm aware that this doesn't answer your question yet, but hopefully I'll follow up on that soon.

In the mean time please also run the scfl option - this will do the newer likelihood-based site concordance factor, which doesn't not average over quartets, but averages over ancestral state reconstructions instead. It will be helpful if you could run that and post the output that you get. This will help us figure out if the issue is common to both methods or just one of them.

Yours,

Rob 

Benjamin Anderson

unread,
Apr 16, 2024, 3:15:56 AM4/16/24
to IQ-TREE
Hi Rob,

Thanks for that! I agree that it is odd to have so few sites supporting the branches and that may be part of why there is odd behaviour. I'll provide some context for these datasets:

The trees are output from SVDQuartets, and the input alignment contains a single SNP per locus concatenated together, but only about 2800 SNPs of a potentially >300 kbp alignment of full loci. The samples are from a species complex, so there may be limited variation between them in some cases.

The output trees from SVDQuartets do not have branch lengths, so in order to get IQ-TREE to run I manually make all branch lengths = 1:

sed "s/,/:1,/g" input.tre | sed "s/)/:1)/g" > output.tre

I also collapse branches with <60% bootstrap support to polytomies using Newick Utilities:

nw_ed input.tre "i & b < 60" o > output.tre

In order to provide a comparison for this troubleshooting, I retain the un-collapsed tree as well.

The normal "--scf" option works for both trees (IQ-TREE v. 2.3.2), but gives odd concordance factors for both the tree with collapsed branches and the one without.

iqtree -s input.nex -t output.tre --scf 100000 -T 8 --prefix concord

When attempting to use the new "--scfl" option, I hit the following error for both the tree with collapsed branches and the un-collapsed tree:

Reading input tree file qfm_boots_collapsed_mod.tre ...
Perform fast likelihood tree search using GTR+I+G model...
Estimate model parameters (epsilon = 5.000)
Perform nearest neighbor interchange...
ERROR: phylotree.cpp:4070: virtual NNIMove PhyloTree::getBestNNIForBran(PhyloNode*, PhyloNode*, NNIMove*): Assertion `node1->degree() == 3 && node2->degree() == 3' failed.
ERROR: STACK TRACE FOR DEBUGGING:
ERROR:
ERROR: *** IQ-TREE CRASHES WITH SIGNAL ABORTED
ERROR: *** For bug report please send to developers:
ERROR: ***    Log file: concord_collapsed_likelihood.log
ERROR: ***    Alignment files (if possible)


Perhaps this is because I have artificially added branch lengths of 1? Maybe when it tries to put a model on the tree it falls down?
Let me know if you would like me to send you any of the alignments, logs, or trees.

Cheers,

Ben

rob.l...@gmail.com

unread,
Apr 16, 2024, 5:24:39 AM4/16/24
to IQ-TREE
Hi Ben,

This is a fairly roundabout way of estimating a tree and concordance factors. The issue with the scfl is to do with trying to use a collapsed tree.

We've also figured out the issue with the parsimony scf values. In the (usually rare, but quite common in your dataset) case that you have so so few informative sites on a branch, what happens is that a lot of the randomly selected quartets have zero decisive sites. This means that when the sCFs are averaged across quartets, there are a lot of zeros in the quartets themselves. This means that the statement in the paper that the sCF + sDF1 + sDF2 will *always* equal 1 is incorrect in the current formulation. Regardless, when you have so few informative sites (I suspect that if you estimate parsimony branch lengths on your tree, you'd see that some of them contain just a single change) site concordance factors are close to meaningless. Whatever number you get is a point estimate based on placing perhaps a single site into one of three bins (sCF, sDF1, sDF2) so it is not interpretable in any sensible way. 

To put it another way, you get point estimates, but if you had confidence intervals, they'd probably go from 0 to 1 for all three values. 

I hope some of that helps!

Rob

Benjamin Anderson

unread,
Apr 16, 2024, 6:06:31 AM4/16/24
to IQ-TREE
Hi Rob,

Thanks for digging into this for me! I really appreciate it.

My original intention was to assess how many of my SNPs were concordant with the tree inferred by SVDQuartets, but perhaps my approach is not appropriate. SVDQuartets gives an overall indication (e.g. 25% of quartets were discordant), but I wanted per branch. I also did a separate ML concatenation tree (full alignment), which I can try running concordance on as well and which might be more appropriate/informative.

Your explanation makes more sense, so my previous interpretation of the concordance factors (as proportional) is not good. I guess I will probably drop this analysis from these kinds of datasets.

As an aside, I don't think the scfl error is because of a collapsed tree, because I got the same error when running on the un-collapsed tree.

Cheers,

Ben
Reply all
Reply to author
Forward
0 new messages