SysBioChalmers / Mouse-GEM

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

It seems the annotation is empty in Mouse-GEM - causes problems in addRxns #12

Closed johan-gson closed 2 years ago

johan-gson commented 2 years ago

Description of the issue:

mouseGEM.annotation gives:

ans =

struct with fields:

  authorList: ''
       email: ''
organization: ''
    taxonomy: ''
   sourceUrl: ''
        note: ''
   defaultLB: ''
   defaultUB: ''

the defaultLB and UB are used in addRxns, and generates a messed up vector for model.ub, it looks like incorrect memory or something, or that the whole vector is casted to char.

Expected feature/value/output:

Fill these in, -1000 and 1000 is used in Human-GEM

Current feature/value/output:

empty

Reproducing these results:

I hereby confirm that I have:

johan-gson commented 2 years ago

I loaded the model from the .mat file.

mihai-sysbio commented 2 years ago

The default fields seem to be particular to the .mat file, as they do not show up in any of the other file formats. Also, this issue seems to be stemming from Human-GEM, so perhaps it should be transferred there?

johan-gson commented 2 years ago

Hmm, ok. The problem doesn't exist in Human-GEM. An alternative is to fix it in RAVEN (i.e. check these fields more carefully before using them).

mihai-sysbio commented 2 years ago

Right, it doesn't exist in Human-GEM. My thinking is that whatever is done there with these default fields is not really robust since it is inconsistent across the different file formats. But you're right, it might be that the fix belongs in RAVEN. I'm pinging @edkerk in case he knows something about this, if it would make sense to report this in RAVEN.

johan-gson commented 2 years ago

I think I know how to fix it, it would be a small change in AddRxns. It looks like this (see below). So, an additional check if isempty(newModel.annotation.defaultLB) would probably do the trick. I have not tested if isempty catches this, but I would think so. The same needs to be done for defaultUB.

if isfield(newModel,'annotation') & isfield(newModel.annotation,'defaultLB') newLb=newModel.annotation.defaultLB; else newLb=-inf; end

haowang-bioinfo commented 2 years ago

will look into this when making new release of Mouse-GEM

haowang-bioinfo commented 2 years ago

this has been fixed in v1.3