Closed cgpreston closed 10 months ago
When a user attempts to publish the ERepo, we need to check if there is an associated disease. If there is no disease, then publishing to the ERepo is stopped and the following warning message is displayed: A disease must be associated with a classification in order to publish to the ClinGen Evidence Repository
I believe I have a fix in https://github.com/ClinGen/gci-vci-aws/commit/59885e767023bcacbd1c014b282e66bd9eafd890.
Note to self. if something related to this comes up again, here is how to test this manually:
This seems to be working on the test site.
This is now in prod.
There is probably an issue with the patch I added. Here is a help desk email:
I am trying to submit a variant NM_000162.5(GCK):c.1121T>A (p.Val374Glu) from the Monogenic Diabetes affiliation. I am having two issues:
- I am getting a message that a classification is needed, but there is a classification, likely pathogenic. I can't submit the variant. This may be because we have previously modified the classification, and then changed back to automatic. So I tried manually selecting likely pathogenic and I'm still getting a message that I need a classification.
- [...]
Now having the same issue with NM_000162.5(GCK):c.1113C>A (p.Cys371Ter) and realizing the issue may be that the VCI thinks the disease is missing. (Actual message: "A disease must be associated with a classification in order to publish to the ClinGen Evidence Repository"). But the disease is not missing. It is monogenic diabetes (MONDO:00015967). Please advise. Thank you.
I added the same disease:
And then I added some log statements to my hasDisease
function:
const hasDisease = interpretation => {
console.log(`interpretation?.disease !== undefined is: ${interpretation?.disease !== undefined}`);
console.log(`interpretation?.disease !== null is: ${interpretation?.disease !== null}`);
console.log(`typeof interpretation?.disease === 'object' is: ${typeof interpretation?.disease === 'object'}`);
console.log(`Object.keys(interpretation?.disease).length > 0 is: ${Object.keys(interpretation?.disease).length > 0}`);
return interpretation?.disease !== undefined
&& interpretation?.disease !== null
&& typeof interpretation?.disease === 'object'
&& Object.keys(interpretation?.disease).length > 0;
};
I'm seeing the following in the console:
interpretation?.disease !== undefined is: false
interpretation?.disease !== null is: true
typeof interpretation?.disease === 'object' is: false
Uncaught TypeError: Cannot convert undefined or null to object
So it seems like interpretation.disease
is undefined
.
I think I've discovered the problem. There's a line that indicates the interpretation object is actually in props. I am not sure why I thought it was in state.
I need to manually test my patch:
So far as I know, there have been no further issues from our users. Closing.
After discussion with the VCI proxies on 12/5/22:
A disease should be required for curations being published to the ERepo, the suggestion is to block ERepo publishing (and have a user notification explaining why) for ClinGen affiliation curations lacking a MONDO/disease term.
Notes: