nclark-lab / RERconverge

Analysis of convergence between organismal traits and DNA/protein sequences
GNU General Public License v3.0
46 stars 26 forks source link

How to get the RERs of ancestral nodes? #98

Open zhxh233 opened 2 months ago

zhxh233 commented 2 months ago

Hi there!

I'm using RERconverge to caculate the relative evolving rates of a gene sets. As I seen in the turorial, when I want to analyze the correlation between a trait and RERs, I can set a parameter named clade to determine whether it's a terminal trait or inherited from the common ancestor. But how can I get the RERs of ancestor node? I can see there are many columns named NA in the result table and I think that's what I want, but I can't determine the ancestor-descent relationship since there are so many NA, even if I rename the ancestor nodes in the input file. Could you please help me?

Best Regards, XH

zhxh233 commented 2 months ago

@nclark-lab Hi Nathan, could you please help me?

nclark-lab commented 2 months ago

Hello, we've discussed this among the group, and the short answer is that there is no function to perform analysis of specific ancestral branches. We have done this in some limited instances, but each study created custom task-specific solutions. One successful option was to use the returnRersAsTree() function, since it provides a single RER for each branch (as the branch length actually) in a format that can then be used to pull out specific ancestral branches. This would be done by using the node connectivity information embedded in all tree objects. It saddens me that we cannot offer this functionality yet in a general and user-friendly way. It is something I'd like to do soon. When we do, I will reach out again.

zhxh233 commented 2 months ago

Thank you Nathan! Using returnRersAsTree() is sufficient for me, as generating scripts in bulk and running them in parallel are not troublesome. The most important thing is, I can still achieve the results I'm aiming for.

All the Best! Xiaohang