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

Feat 309: Updates TARS Mappings #342

Merged
merged 5 commits into from
Feb 14, 2025
Merged

Feat 309: Updates TARS Mappings #342

merged 5 commits into from
Feb 14, 2025

Conversation

mekhlakapoor
Copy link
Contributor

@mekhlakapoor mekhlakapoor commented Feb 10, 2025

closes #309

  • Creates model ViralMaterialInformation to allow extra field "stock_titer" to hold Titer data from TARS
  • Also updates mappings for Virus identifiers using TARS Virus endpoint
  • Stock titer is only available in the TARS endpoint result, the procedures response integrates a ViralMaterial object with titer from NSB

@mekhlakapoor mekhlakapoor marked this pull request as draft February 10, 2025 23:41
@mekhlakapoor
Copy link
Contributor Author

Converting to draft until we clarify some things with @saskiad

@mekhlakapoor mekhlakapoor requested a review from saskiad February 12, 2025 03:47
@mekhlakapoor mekhlakapoor marked this pull request as ready for review February 13, 2025 01:22
class ViralMaterialInformation(ViralMaterial):
"""Viral Material with Stock Titer from SLIMS"""

stock_titer: Optional[List[int]] = Field(default=None)
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the stock titer a List?

Copy link
Contributor Author

@mekhlakapoor mekhlakapoor Feb 13, 2025

Choose a reason for hiding this comment

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

In TARS, a user can technically add more than one Titer object (each having a value for "result"). In the example below, you can see the + sign on the top right to add more than one. Right now the stock_titer list is all of these titers (Preferred and not). If we only want the preferred value let me know.
image

Copy link
Contributor

@saskiad saskiad Feb 13, 2025

Choose a reason for hiding this comment

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

If we have a list of titers, we need to know what they map to. A single plasmid can only have one titer, so then we need a matching list for the plasmids.

It doesn’t make sense to have a “preferred” titer vs non-preferred, so that suggests to me that some of this is TARS functionality that they are just duplicating between modules. But if multiple titers is a thing for a prep lot, then we have to map plasmids differently than we do. E.g. titer and plasmids need to be linked directly.

Copy link
Contributor Author

@mekhlakapoor mekhlakapoor Feb 13, 2025

Choose a reason for hiding this comment

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

Right now, I'm just returning the Preferred plasmid alias for plasmid_tars_alias. @dyf suggested we update the schema in a later ticket to handle the titers/plasmids list. This PR change the tars endpoint to return a custom model dictionary.

Copy link
Contributor

@saskiad saskiad Feb 13, 2025

Choose a reason for hiding this comment

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

I think we need to do it right and have the plasmid being it’s own class.
But right now looking at TARS I don’t see a link between plasmids and titer, which means nobody has the information. Can we find an actual example of a prep lot with multiple plasmids. We’re doing all this work to accomodate what I understand is an uncommon (but real) use case and it would really help to have an actual example to work with rather than trying to build for hypotheticals.

Copy link
Contributor

Choose a reason for hiding this comment

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

I talked with Aaron. (a) no examples exist in TARS and (b) there will only be one titer because the plasmids are packed in one capsid. So make titer not a list and we’re good to go.

@@ -67,16 +65,18 @@ def setUp(self, mock_credential):
resource="https://some_resource",
)
tars_virus_identifiers = TarsVirusIdentifiers(
virus_tars_id="AiV456",
plasmid_tars_alias="AiP123",
virus_tars_id="AiP123",
Copy link
Contributor

@saskiad saskiad Feb 13, 2025

Choose a reason for hiding this comment

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

I know this is for a text, but since virus_tars_id are usualy AiVXXX and plasmid_tars_aliases are usually AiPXXX it would be better to not have the virus_tars_id use AiP here to prevent confusion for someone reading it.

virus_tars_id="AiV456",
plasmid_tars_alias="AiP123",
tars_virus_identifiers = TarsVirusIdentifiers(
virus_tars_id="AiP123",
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto above

Copy link
Contributor

@saskiad saskiad left a comment

Choose a reason for hiding this comment

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

couple of minor comments

@mekhlakapoor mekhlakapoor requested a review from saskiad February 13, 2025 17:41
@mekhlakapoor mekhlakapoor merged commit 40455b0 into dev Feb 14, 2025
2 checks passed
@mekhlakapoor mekhlakapoor deleted the feat-309-titer branch February 14, 2025 17:57
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.

Fill in titer and virus name from TARS
2 participants