geneontology / pathways2GO

Code for converting between BioPAX pathways and Gene Ontology Causal Activity Models (GO-CAM)
8 stars 0 forks source link

Change all 'transports_or_maintains_localization_of' relations to 'has_primary_input' #200

Closed ukemi closed 1 year ago

ukemi commented 1 year ago

The ontology group recently decided to retire the 'transports_or_maintains_localization_of' relation and replace it with 'has_primary_input'. We need to update the import code to reflect this and be consistent with the way transporters are represented in the ontology and in manually generated GO-CAM models. In addition, if there is already a 'has_input' of the same entity, then we should remove it.

For example, in this model: gomodel:R-HSA-8949215

The individual shown here: image

should have the 'transports or maintains localization' of Ca2+ changed to 'has primary input' Ca2+ and the 'has input' Ca2+ should be removed.

In fact, since transporter activities do not have the more generic 'has input' and 'has output' relations wrt the transported molecules in ontology definitions, these relations can be removed from the imported models. For transported molecules, the only relationship will be 'transporter activity' has_primary_input some 'transported molecule'.

deustp01 commented 1 year ago

Should now be easy change before v 82 GO-CAMs because it's simply a swap of "transports or maintains relation" (old) for "has primary input" (new) @dustine32 , to keep us in synch with what we understand the current state of GO to be, as illustrated e.g. by the current logical definition of GO:0015369 calcium:proton antiporter activity.

Even if this has problems (see next comment), this change keeps pathways2GO in synch with GO - we all sink or swim together, good for sanity.

deustp01 commented 1 year ago

But what about antiporters? Will it be sufficient to have two primary inputs, in the example here Ca++ [here] and H+ [there]. Note that Ben didn't handle the H+ in this reaction. We should investigate why - looks like a bug, see #203. @ukemi @vanaukenk

No outputs specified. In principle, if an event is purely transport, outputs can be reliably inferred from the list of primary inputs and their locations without a need to specify them explicitly. For a future task, would it make sense to specify primary inputs and outputs along with their nested locations? For example in the above model would the primary inputs be some (Ca+2 located_in some mitochondrial matrix), (H+ located_in some mitochondrial intermembrane space) the primary outputs be (Ca+2 located_in some mitochondrial intermembrane space), (H+ located_in some mitochondrial matrix)? Not necessary for this round of imports but something to think about for the future.

ukemi commented 1 year ago

Also see #174

ukemi commented 1 year ago

Checking:

ukemi commented 1 year ago

In model R-HSA-9759218, we somehow missed the transported CHEBI:140785 as a primary inputon the R-HSA-9759206 reaction. Instead, it is an input and an output.

But what's weird, is that it worked in one model but not another. It worked in R-HSA-9758890. But in that model, :R-HSA-5223313 shows the same behavior as the previous example. Could it have to do with these transporter activities not being part of the process?

Fortunately since primary input is a subclass of input, the generated construct is not logically incorrect, just not as specific. This isn't a show-stopper but should be investigated.

ukemi commented 1 year ago

@dustine32 Other than the (small) bug in the reactions that are not part of the pathway mentioned above, this works according to the current GO specs for transporters.

ukemi commented 1 year ago

I think based on the discussion on June 19, 2023 and commented on in #204, we can close this ticket.

ukemi commented 1 year ago

Checking:

ukemi commented 1 year ago

@dustine32 This still looks like it's not working correctly. Even models I checked before (see above) seem to be reverted. Model gomodel:R-HSA-9758890 has reactions that are part of the process that still have the transports_or_maintains_localization_of relations.

ukemi commented 1 year ago

WAIT!!!!! My bad. I somehow started looking on production. Sorry @dustine32!

ukemi commented 1 year ago

I'm glad you have a good sense of humor. THis all looks good with the known caveat about the reactions not in the pathway that we decided would let slide on Monday's call.