msraredon / Connectome

GNU General Public License v3.0
27 stars 5 forks source link

Differential connectomes and centrality #2

Closed ajwilk closed 3 years ago

ajwilk commented 3 years ago

Hi there, Thanks for your great work on this package! I have a question/suggestion... First the suggestion: I'm interested in visualizing a differential connectome via the centrality plots you've developed. I should think this would be feasible and scientifically reasonable by simply passing a well-filtered output of DifferentialConnectome to Centrality. One issue in doing this is that the mode column of the parent connectome doesn't get passed to the output of DifferentialConnectome. Is this something that can be changed?

Second a question: it appears that the hub/authority score increases monotonically with outgoing/incoming edgeweight (and thus plotting both may be redundant). I'm wondering if you think it's reasonable to visualize a differential connectome by Centrality but plotting the mean absolute value of the receptor/ligand fold changes per cell parcellation on the x axis instead of the outgoing/incoming edgeweight.

Would love to hear your thoughts!

msraredon commented 3 years ago

1) DifferentialConnectome has now been updated to carry over the mode information.

A important thing to note when using this column: these categories are manually-curated carry-overs from 10.1126/sciadv.aaw3851, and only the mechanisms which were explored in that particular dataset have been characterized. The remaining mechanisms in the FANTOM5 database are simply labeled as "UNCAT" -- and for some, particularly non-lung, analyzes, I recommend checking to make sure that all mechanisms of interest are appropriately labeled, otherwise they will not be factored into any mode-based analysis. The easiest way to do this is to copy the species-specific ground-truth file (accessible in the repository "data" folder), edit to make sure the mode column annotation is correct for your research purposes / your dataset, and then extract from it the appropriate 3-column "custom" ligand-receptor ground-truth dataframe to pass to CreateConnectome. This workflow can also be used to group mechanisms into custom signaling family annotations in-line with a particular lab's interest.

2) This is a creative idea that I would need to wrap my head around / see in practice to understand the pros and cons. I think that analyzing differential networks with centrality measures is mathematically possible, but that it might prove difficult to interpret without careful explanation. The perturbation score column (always positive, changes in ligand and receptor each calculated first, absolute value-d, and then multiplied), and the weight.norm.lfc (fold-change of weight_norm, consequently mixture of pos and neg but easy to interpret) both reflect degree of change in network weight. Doing a centrality analysis on either of these measures no longer will reflect actual signaling importance, but rather the centrality of a network with the edge-weights defined by their degree of change. It could work, but I don't know how immediately legible it will be to "read."

Another option would be to calculate the centrality for each network separately using the weight_norm or weight_scale column (as is currently done in CompareCentrality) and then to plot the fold-change or degree of difference of centrality for each celltype. This is, I think on first glance, a more easily interpretable metric. But both approaches, I imagine, might give similar endpoint outputs. Would have to see. Let me know if there are things I could add to the software that might help this exploration. The centrality metrics are calculated using igraph, and the outputs between two networks are generally pretty easy to work with and compare. One approach would be to start with the code in CompareCentrality and modify the last lines of it so that it outputs a quantitative (rather than simply visual) comparison of centrality between the two networks.

S