resendislab / corda

An implementation of genome-scale model reconstruction using Cost Optimization Reaction Dependency Assessment by Schultz et. al
http://resendislab.github.io/corda
MIT License
23 stars 8 forks source link

Understading the difference between low and medium confidence #15

Closed Ben-Strain closed 2 years ago

Ben-Strain commented 3 years ago

Hello,

Sorry if this is not the appropriate place to ask this. I am trying to understand if reactions classed as low confidence (1) are treated differently to reactions classed as medium (2) or if they are ultimately lumped together in the algorithm?

If they are lumped could they be separated so that they are treated differently (i.e. medium confidence preferentially inserted over low confidence)?

Thank you for your help,

Ben

cdiener commented 3 years ago

Hi, sorry for the delayed reply. You are absolutely right that low and medium confidence is treated exactly the same in CORDA as this was just adapted from the original publication here (https://doi.org/10.1371/journal.pcbi.1004808). In theory, it would be possible to set different penalties for low and medium confidence reactions in the first step of CORDA. It would require some changes to the codebase though. Basically, CORDA would take a list of penalty factors and use those. In the CORDA paper they both get the same confidence so I would probably try that first. However, the second phase of CORDA (that uses the support factor) does not penalize low and medium reactions, rather it includes a set of LC and MC reactions that can be added by using a small amount of NC reactions.

Ben-Strain commented 3 years ago

Thank you for your response, this is very helpful. Would changing the penalties for each category be as simple as altering this for loop within CORDA so that reactions classed as '1' were given (for instance) a penalty of 50?

penalties = {} for r in m.reactions: if penalize_medium and conf[r.id] in [1, 2]: pen = 1 elif conf[r.id] == -1: pen = self.pf else: continue penalties[r.forward_variable] = pen penalties[r.reverse_variable] = pen

cdiener commented 3 years ago

For the first step in CORDA? Yes, adding an additional elif to handle 1 and 2 confidences separately would be enough here.