GLYCAM-Web / website

A bare-bones repo to contain public website stuff and issues related to the GLYCAM Web Django apps.
4 stars 0 forks source link

DGlcpa1-1DGlcpa never completes. #164

Closed gitoliver closed 1 week ago

gitoliver commented 7 months ago

Tool: build via text: glycam.org/txt

Bug Description: This sequence won't build: DGlcpa1-1DGlcpa image

A default structure is created if I make this in gmml. But the website never shows me one, and the status stays as Project Status : Minimizing structures...

I wonder if the database entry for this is corrupted somehow? Or it's failing in minimization, but then why isn't the default showing up?

gitoliver commented 7 months ago

Looks like a gmml issue: "payload": "DGlcpa1-1DGlcpa", "format": "GlycamCondensed" ... "outputs": { "sequenceEvaluationOutput": { "sequenceIsValid": true, "sequenceVariants": { "indexOrdered": "DGlcpa1-1DGlcp", "longestChainOrdered": "Currently unavailble in gmml. Request if needed!", "userOrdered": "DGlcpa1-1DGlcp", It's chopping the "a" off at the end somewhere along the way. If I just give it to the carb builder in gmml it builds it fine. Also, why no error?

gitoliver commented 7 months ago

If I try to directly build DGlcpa1-1DGlcp in the gmml tests or on actual it throws a good error. Why isn't this happening here if the chopping of the "a" is the issue? In my gems logs when I build via my dev website, I see this: 2023-11-28 06:36:26 AM - gemsModules.deprecated.sequence.build - ERROR - Something went wrong in gems when creating the carbohydrate.

There are 3 different bugs here.

Bug 1 (Gems) the code isn't logging the gmml error properly because of the loglog typo: https://github.com/GLYCAM-Web/gems/blob/d10e01284f4ad8eb3742099d4d6e163d8167f08d/gemsModules/deprecated/sequence/build.py#L95

Bug 2 (Gems) The raised error seems to just be ignored. If you do fix the log line, you see that it is indeed complaining about: ERROR - Did not find prep entry for DGlcp with glycam residue code: 1G Which leads me to the conclusion that gems is indeed using the ordered version of the sequence, which is what we want as it has to have a consistent ordering to get the sequence id correct. The issue is the 3rd bug (below). But we need to figure out why the raised error (see line after the one linked in Bug 1) isn't getting to the user and fix that.

Bug 3 (Gmml) Gmml is losing the trailing a from the sequence as reducing terminals don't have a linkage, they are linked to. The reason that the a is missing is that in gmml the SequenceManipulator Print() function gets the name for the residue and appends the linkage name. As the 1-1 linkage belongs to the leftmost residue, and we don't normally print anomericity in the residue name, the rightmost "DGlcp" is printed as it is. This is wrong and should be fixed in gmml.

Lachele commented 7 months ago

Re Bug 2: We want to get the error message packaged into a proper Notice so that the website can find/parse it easily. Doing this is less straightforward in the deprecated code, but it's not terrible.

GRAYgoose124 commented 7 months ago

it was already known, but I confirmed bug 3 is related to the sequence variant generation:

import gmml
gmml.Sequence("DGlcpa1-1DGlcpa").getIndexOrdered()
'DGlcpa1-1DGlcp'

2nd bug is likely because a process boundary is crossed. When a notice is appended by the catching caller or is appended to the transaction in the new process, it's not affecting the original transaction.

This seems to be a general issue we have across processes. For instance, a request made over gRPC must return a transaction response instantly even though the service could fail on the remote side.

danwentworthart commented 1 week ago

I was able to build DGlcpa1-1DGlcpa just now. Does that mean these issues are resolved?

gitoliver commented 1 week ago

Yes, here is the working output from test.glycam.org "hope-hockney" DGlcpa1-1DGlcpa.zip