ClinGen / gene-and-variant-curation-tools

ClinGen's gene and variant curation interfaces (GCI & VCI). Developed by Stanford ClinGen team.
https://curation.clinicalgenome.org/
MIT License
3 stars 1 forks source link

Make disease required for publishing in the VCI #273

Closed cgpreston closed 10 months ago

cgpreston commented 1 year ago

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:

  1. This same logic should NOT apply to the MOI, the proxies were able to think of multiple use cases where a MOI not being added was desired.
  2. To minimize the burden on non-ClinGen affiliations and for a few use cases the proxies felt that blocking publishing (but not approval) was the correct step for this logic.
wrightmw commented 1 year 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

liammulh commented 1 year ago

I believe I have a fix in https://github.com/ClinGen/gci-vci-aws/commit/59885e767023bcacbd1c014b282e66bd9eafd890.

liammulh commented 11 months ago

Note to self. if something related to this comes up again, here is how to test this manually:

  1. Navigate to a variant that doesn't have an associated disease.
  2. Click "View Summary".
  3. Scroll down a bit and there should be a teal button to either un-publish from the evidence repository or publish to the evidence repository. See the screenshot below.

gavct-issue-273

liammulh commented 11 months ago

This seems to be working on the test site.

liammulh commented 11 months ago

This is now in prod.

liammulh commented 11 months ago

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:

  1. 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.
  2. [...]

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.

liammulh commented 11 months ago

I added the same disease:

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.

liammulh commented 11 months ago

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.

liammulh commented 11 months ago

I need to manually test my patch:

liammulh commented 10 months ago

So far as I know, there have been no further issues from our users. Closing.