Chado icon indicating copy to clipboard operation
Chado copied to clipboard

Stocks with multiple organisms (v1.4)

Open spficklin opened this issue 7 years ago • 5 comments

This issue imported from the Chado v1.4 requested changes google doc:

Lacey Sanderson and Ethy Cannon need to represent germplasm (stock) with more than one contributed organism (e.g. interspecific crosses). Suggestion is to add a stock_organism table but organism_id in stock table is not null, implying a primary contributor.

This is also a problem for feature maps where the landmark feature (e.g. linkage group) is from a single feature that has a single species.

Bob MacCullum says (3/10/2015): I (Bob) thought stock.organism_id was already allowed null - we certainly use it that way (organism_id is always null) and we have no documented SQL changes. However, I think that's a problem with our documentation!! Here's something I emailed to the list, but reading it again I see an unfinished sentence… I think it was supposed to end with "expect undefined behaviour when doing find_or_create on tables with multiple keys including fields with null values".

Stephen says (3/10/2015): Yes, you’re right Bob, the table does allow NULL for an organism_id, perhaps this will resolve the issue, Lacey & Ethy, and allow you to use a stock_organism table?

Sook says (3/18/2015): What about adding a type_id to the stock_organism to specify the relationship between the stock record and the organisms (e.g. derives_from).

spficklin avatar Jan 10 '18 18:01 spficklin

I would summarize this issue as "How do we put interspecific crosses into stock?"

  • Enter stock with null for organism_id
  • use stock_organism table (not yet added)
  • Describe the cross relationship somewhere (stock_organism? stockprop?)

The featuremap issue looks slightly different to me because the organism is in featuremap_organism not featuremap. In that case, would it make sense to also create a featuremap_stock table, and then people's modules could check both the featuremap_organism and featuremap_stock table and use the appropriate result?

Action items

  • Add stock_organism table to stock module with type_id
  • ?Add featuremap_stock table? also with type_id?

bradfordcondon avatar Jan 11 '18 15:01 bradfordcondon

The featuremap issue is already solved in Chado v1.3 with a stock_featuremap table (unsure why the name was switched).

The existence of a stock_organism table (with type_id) would solve our issue 👍 We already have the cross relationships stored in stock_relationship. The issue is that in cases where the parents are from difference species we can't currently indicate equal contributor for organism. Currently we have the organism set to "Lens interspecific" (fake organism) and we would likely keep that but then further describe the contributing species in the stock_organism table. This would also allow us to quickly show that a stock has a distant wild parent without having to navigate the relationship tables multiple generations to find it out.

laceysanderson avatar Jan 13 '18 18:01 laceysanderson

A question: why did you choose not to create a new organism that would be the cross of the two other organisms and link your stock to it? And then, using the phylogeny module (organism>phylonode_organism>phylonode), you could define the relationship between your organisms... ?

guignonv avatar Aug 06 '18 09:08 guignonv

Yes, an intraspecific organism that is related to two species via organism_relationship would work, and would be more tidy than multiple stock_organism links. That said, does this reflect the biology? Two different intraspecific crosses could be very different, phenotypically and genetically. I suppose in that case, a new organism record could be created for each cross.

ekcannon avatar Aug 06 '18 13:08 ekcannon

With a stock_organism table we can better describe how much each species contributes: is it an equal interspecific? skewed to the cultivated parent? back-crossed to cultivated parent multiple times? really just a hint of the wild is left? This would be harder to capture using the fake organism approach...

laceysanderson avatar Aug 07 '18 20:08 laceysanderson