UofS-Pulse-Binfo / rawphenotypes

A Tripal module for storing raw phenotypic data. Specifically meant to help researchers contribute raw data, visualize summaries and download for further analysis.
2 stars 2 forks source link

Issue #12 stock names look up #16

Closed reynoldtan closed 2 months ago

reynoldtan commented 7 years ago

Stock names look up - limits the list of stocks used to verify name column header in data collection spreadsheet file.

I have created a function to check if a given project has a genus set in project admin by searching a record in projectprop. It can return project genus, as well as the organisms in a project genus or return nothing when none is found.

In validation process, the function will return the organisms (organism_id) which will then become part of the sql query (IN() clause) to limit the stocks to only the organisms in a project genus.

To test this validation:

  1. AGILE collecting for Lens - in a blank agile spreadsheet add a row and set the name to Divine. This should return an non-existent organism because Divine belongs to Vicia genus.

  2. Create a project set genus to Pisum add one existing trait - in a blank spreadsheet in instructions page, add a row and set the name to a Pisum stock: Racer. I have inserted the same stock but into Lotus genus. Although we both have 2 copies of the same stock, uploading the spreadsheet should be error free since Racer is unique to Pisum and Lotus.

  3. In the same project with Pisum genus - in a blank spreadsheet in instructions page, add a row and set the name to stockxyz. This specific stock is a Pisum stock but is in both Fulvum and Sativum organisms (both Pisum organism). The result should instruct user that germplasm is not unique.

Hope my terminologies make sense :)