Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for the BC5CDR evaluation #226

Merged
merged 9 commits into from
Oct 5, 2023
Merged

Fixes for the BC5CDR evaluation #226

merged 9 commits into from
Oct 5, 2023

Conversation

caufieldjh
Copy link
Member

No description provided.

@caufieldjh caufieldjh linked an issue Sep 29, 2023 that may be closed by this pull request
@caufieldjh
Copy link
Member Author

This will still need some checks to ensure the results are getting compared to the test set as expected.
Example output for one test object:

  - test_object:
      publication:
        id: '254'
        title: Hepatitis and renal tubular acidosis after anesthesia with methoxyflurane.
        abstract: A 69-year-old man operated for acute cholecystitis under methoxyflurane
          anesthesia developed postoperatively a hepatic insufficiency syndrome and
          renal tubular acidosis. Massive bleeding appeared during surgery which lasted
          for six hours. Postoperative evolution under supportive therapy was favourable.
          Complete recovery was confirmed by repeated controls performed over a period
          of one year after surgery.
        combined_text: N/A
        full_text: N/A
      triples:
        - subject: MESH:D008733
          predicate: induces
          object: MESH:D000141
          qualifier:
          subject_qualifier:
          object_qualifier:
        - subject: MESH:D008733
          predicate: induces
          object: MESH:D056486
          qualifier:
          subject_qualifier:
          object_qualifier:
    true_positives:
      -   - MESH:D008733 Methoxyflurane
          - MESH:D000141 Acidosis, Renal Tubular
      -   - MESH:D008733 Methoxyflurane
          - MESH:D056486 Chemical and Drug Induced Liver Injury
    num_true_positives: 2
    false_positives:
      -   - MESH:D008733 Methoxyflurane
          - MESH:D017093 Liver Failure
    num_false_positives: 1
    false_negatives: []
    num_false_negatives: 0
    scores:
      similarity:
        jaccard: 0.75
        false_positives:
          - MESH:D017093 Liver Failure
        false_negatives: []
        common:
          - MESH:D000141 Acidosis, Renal Tubular
          - MESH:D008733 Methoxyflurane
          - MESH:D056486 Chemical and Drug Induced Liver Injury
    predicted_object:
      publication:
      triples:
        - subject: MESH:D008733
          predicate: INDUCES
          object: MESH:D056486
          qualifier:
          subject_qualifier:
          object_qualifier:
        - subject: MESH:D008733
          predicate: INDUCES
          object: MESH:D000141
          qualifier:
          subject_qualifier:
          object_qualifier:
        - subject: MESH:D008733
          predicate: INDUCES
          object: MESH:D056486
          qualifier:
          subject_qualifier:
          object_qualifier:
        - subject: MESH:D008733
          predicate: INDUCES
          object: MESH:D000141
          qualifier:
          subject_qualifier:
          object_qualifier:
        - subject: MESH:D008733
          predicate: INDUCES
          object: MESH:D056486
          qualifier:
          subject_qualifier:
          object_qualifier:
        - subject: MESH:D008733
          predicate: INDUCES
          object: MESH:D000141
          qualifier:
          subject_qualifier:
          object_qualifier:
        - subject: MESH:D008733
          predicate: INDUCES
          object: MESH:D017093
          qualifier:
          subject_qualifier:
          object_qualifier:
        - subject: MESH:D008733
          predicate: INDUCES
          object: MESH:D000141
          qualifier:
          subject_qualifier:
          object_qualifier:
    named_entities:
      - id: MESH:D008733
        label: Methoxyflurane
      - id: MESH:D056486
        label: Hepatitis
      - id: MESH:D000141
        label: renal tubular acidosis
      - id: MESH:D008733
        label: Methoxyflurane
      - id: MESH:D056486
        label: Hepatitis
      - id: MESH:D000141
        label: renal tubular acidosis
      - id: MESH:D008733
        label: Methoxyflurane
      - id: MESH:D056486
        label: Hepatitis
      - id: MESH:D000141
        label: renal tubular acidosis
      - id: MESH:D008733
        label: Methoxyflurane
      - id: MESH:D056486
        label: Hepatitis
      - id: MESH:D000141
        label: renal tubular acidosis
      - id: MESH:D017093
        label: hepatic insufficiency syndrome

@cmungall
Copy link
Member

cmungall commented Oct 4, 2023 via email

@caufieldjh
Copy link
Member Author

caufieldjh commented Oct 4, 2023

I see a list of lists under TPs and FPs. That is very suspect. We didn't
have that schema before. It makes me thing there is an add happening in
place of extend

I think that's because they're lists of tuples, and in the ctd-run-2023-01-01 output they looked like this:

  true_positives:
  - !!python/tuple
    - MESH:D019386 Alendronate
    - MESH:D010146 Pain
  num_true_positives: 1
  false_positives:
  - !!python/tuple
    - MESH:D019386 Alendronate
    - MESH:D059352 Musculoskeletal Pain

Still looks strange, though it looks like the pairs are getting compared to test appropriately.

@cmungall
Copy link
Member

cmungall commented Oct 4, 2023

ah that makes sense. Everything looks in order then

@caufieldjh caufieldjh marked this pull request as ready for review October 5, 2023 15:30
@caufieldjh caufieldjh merged commit 7838cce into main Oct 5, 2023
2 checks passed
@caufieldjh caufieldjh deleted the update_bc5cdr_eval branch October 5, 2023 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pydantic ValidationError in Chemical To Disease evaluation
2 participants