SysBioChalmers / Mouse-GEM

Genome-scale model for Mus musculus
Creative Commons Attribution 4.0 International
7 stars 5 forks source link

evalGeneEssentialityPred erro #25

Closed zrf492174 closed 1 year ago

zrf492174 commented 1 year ago

Hello, I am using the newest version of mouseGEM(1.16) to test if my steps is right,when calculate the Matthews correlation coefficient (MCC). I used the metabolicTasks_Essential and gene essentiality data set which the paper provided as inputs tothe funcation evalGeneEssentialityPred's, but I received an error-Could not find all outputs in "[IC] Glyceraldehyde 3-phosphate de novo synthesis". Do you know what is the problem?

Thanks in advance.

Runfeng

mihai-sysbio commented 1 year ago

Hi @zrf492174, thank you for reporting this.

Looking at the essential tasks in Human-GEM, it appears to be about:

ID DESCRIPTION SHOULD FAIL IN IN LB IN UB OUT OUT LB
IC Glyceraldehyde 3-phosphate de novo synthesis O2[e];glucose[e];Pi[e] D-glyceraldehyde 3-phosphate[c] 1

I couldn't find any metabolite changes in the recent versions that could cause issues, so then I wondered if there have been any changes to the tasks themselves. And bingo 🎯 there has been a change in the latest Human-GEM 1.16 from which Mouse-GEM 1.6 is derived:

https://github.com/SysBioChalmers/Human-GEM/blame/da072baab38137863fa954906f9ef149ad300628/data/metabolicTasks/metabolicTasks_Essential.txt#L47

@haowang-bioinfo, what would be the best fix? and how can this be avoided in the future?

haowang-bioinfo commented 1 year ago

@haowang-bioinfo, what would be the best fix? and how can this be avoided in the future?

before fixing, good to know what are the code and dependencies used? @zrf492174

zrf492174 commented 1 year ago

Hi @zrf492174, thank you for reporting this.

Looking at the essential tasks in Human-GEM, it appears to be about:

ID DESCRIPTION SHOULD FAIL IN IN LB IN UB OUT OUT LB IC Glyceraldehyde 3-phosphate de novo synthesis O2[e];glucose[e];Pi[e] D-glyceraldehyde 3-phosphate[c] 1 I couldn't find any metabolite changes in the recent versions that could cause issues, so then I wondered if there have been any changes to the tasks themselves. And bingo 🎯 there has been a change in the latest Human-GEM 1.16 from which Mouse-GEM 1.6 is derived:

https://github.com/SysBioChalmers/Human-GEM/blame/da072baab38137863fa954906f9ef149ad300628/data/metabolicTasks/metabolicTasks_Essential.txt#L47

@haowang-bioinfo, what would be the best fix? and how can this be avoided in the future?

Thank you very much, I used the newest metabolicTasks_Essential file and it works. My results and function are as followed:

[metricsM, modelEssentialM] = evalGeneEssentialityPred(mouseGEM, expdataM, task)

expdataM is from the origin paper, mouseGEM and task are the newest version. metrics results are sensitivity: 0, specificity: 1, accuracy: 0.4872, F1: 0, MCC: NaN, p_hyper: 1 I think the reason may be the fun just detect 3 essential gene:'Dtymk', 'Guk1' and 'Tpk1', I wonder what did i do wrong

zrf492174 commented 1 year ago

@haowang-bioinfo, what would be the best fix? and how can this be avoided in the future?

before fixing, good to know what are the code and dependencies used? @zrf492174

Thanks for your reply, the code and dependencies' version are as followed: raven toolbox version is 2.80 task file and evalGeneEssentialityPred code are from human-GEM repositories which version is 1.14 mouseGEM 1.16 gurobi solver 9.52

haowang-bioinfo commented 1 year ago

@zrf492174 thanks for providing the code and dependencies

then what's the error message when running evalGeneEssentialityPred? or you just got NaN for MCC value?

zrf492174 commented 1 year ago

@zrf492174 thanks for providing the code and dependencies

then what's the error message when running evalGeneEssentialityPred? or you just got NaN for MCC value?

Before I used the newest task file, I got an error that 'Model failed task(s) before gene deletion!'. After using the latest one, the error disappeared and got NaN for MCC value. Is this normal?

haowang-bioinfo commented 1 year ago

I think it's normal to get NaN for MCC in your case.

if sensitivity = 0, specificity = 1, then TP = FP = 0. In other words TP + FP = 0, this would lead to infinity MCC, or Not a Number (NaN), given the formula below:

Screenshot 2023-08-07 at 10 11 57
zrf492174 commented 1 year ago

I think it's normal to get NaN for MCC in your case.

if sensitivity = 0, specificity = 1, then TP = FP = 0. In other words TP + FP = 0, this would lead to infinity MCC, or Not a Number (NaN), given the formula below:

Screenshot 2023-08-07 at 10 11 57

Thanks a lot, HaoWANG and Mihail. I think I understand the meaning of MCC and it runs well if using metabolic tasks after version 1.16 and GEM after version 1.6.

haowang-bioinfo commented 1 year ago

very good!