AlexsLemonade / AlexsLemonade/refinebio
Expand data model to support organism strains
- Dominant language
- Python
- Stars
- 135
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
### Context
In https://github.com/AlexsLemonade/refinebio/issues/1722 we're starting to tackle the problem of strains. However our data model has no concept of strains nor does it currently have a way to support it.
### Problem or idea
Regardless of whether we decide to go with one strain per organism or multiple, we should figure out a data model to support multiple strains so that we don't lock ourselves into one-strain-per-organism.
### Solution or next step
We should figure out how to represent this in the database.
I have two initial ideas:
* One would be to create a separate Strains model and have a one-to-many relationship between organims and strains. The tricky part about this is that it apppears NCBI gives each strain a different taxonomy id, and that currently is a property of our organisms table.
* The other would be to treat each strain like a separate organism. This seems to be more in line with how NCBI handles it. We potentially could use this as an opportunity to make the organism model more robust in the following ways:
* Rather than using a `get_genus()` function to get an organism's genus, we could just store that as a separate property.
* While we're at it we could just store each of `kingdom, phylum, class, order, family, genus, species, strain` as their own property. This could be useful later for other things?
* We could even build out some additional behavior to organisms such that you could ask an organism to give experiments for the full species, or genus, rather than just the one relationship. This would let us then choose what grouping we want to work with in different places.
Here are two strains of E. coli that have different taxonomy ids for reference:
* https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=1281005&lvl=3&lin=f&keep=1&srchmode=1&unlock
* https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=1432549&lvl=3&lin=f&keep=1&srchmode=1&unlock
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the current organisms table/model and its get_genus() behavior, then compare the two proposed representations with the linked strain issue and the referenced NCBI taxonomy records. Done means choosing and documenting a database model that supports multiple strains without locking the project into one-strain-per-organism.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100