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

Icf cpheapm71 72 add guidelines #1118

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ZindahFarhaICF
Copy link
Collaborator

71

  • Upload guideline table as json in the vocab app 'fixtures' folder.
  • Update the experiment model to have a "guideline profile" (charfield) with validation from above guidelines.
    72
  • Create a GuidelineProfiles model and fixture with current hawc toxref endpoints

NR = "not required", "not required"
REC = "recommended", "recommended"
REQ = "required", "required"
TR = "triggered", "triggered"
Copy link
Collaborator Author

@ZindahFarhaICF ZindahFarhaICF Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added type checking for GuidelineProfile observation status, can be changed/removed as needed

" public.vocab_term AS endpoint_category ON endpoint_type.parent_id = endpoint_category.id\n",
"WHERE\n",
" endpoint_target.type = 4 AND endpoint_target.namespace=2;\n",
"\"\"\""
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This notebook will probably be moved - mainly to demonstrate how guideline profiles were loaded (for review)

To load the model, I updated the endpoint ids in the given guideline_profiles spreadsheet to be the "endpoint target" (effect_subtype) id in the equivalent hawc vocab, and included the SQL logic for getting that here. Hopefully I didn't misunderstand the endpoints/goal here, but def let me know if I did!

to="vocab.term",
),
),
("endpoint_category", models.CharField(max_length=256)),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guideline_profile_id is the primary key, and I kept the 3 vocab name fields that make up the endpoint. If they were mainly for my benefit to load in the vocab ids, I can remove them!

@ZindahFarhaICF ZindahFarhaICF marked this pull request as ready for review October 11, 2024 18:58
@shapiromatron shapiromatron self-assigned this Nov 4, 2024
Copy link
Owner

@shapiromatron shapiromatron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good generally, unfortunately I think we wanted to add it to the bioassay-v2 schema, not the bioassy-v1 schema.

To do that, I think this PR may need to be closed and reworked and then submitted as new PR that should be merged into the bioassay-v2 branch, not the main branch.

I think a lot of the code in the hawc.apps.animal will need to be modified and adapted to hawc.apps.animalv2. Hopefully that won't be too painful?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this script needed? What's the purpose of it, and when would we call it?

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.

2 participants