gigascience / gigadb-website

Source code for running GigaDB
http://gigadb.org
GNU General Public License v3.0
9 stars 14 forks source link

Sample templates missing #393

Open only1chunts opened 4 years ago

only1chunts commented 4 years ago

Describe the bug On the Samples tab, e.g. https://gigadb-staging.gigatools.net/datasetSubmission/sampleManagement/id/340 There are no Templates in the "Choose a template" dropdown list to select from, it just says "Empty"

To Reproduce Steps to reproduce the behavior:

  1. Go to https://gigadb-staging.gigatools.net/datasetSubmission/sampleManagement/id/340
  2. Click the "Choose a Template" box
  3. See no options to choose from.

Expected behavior There should be a short list of predefined Sample templates available here. There were two example templates provided to white label: Note – ALL samples must include Sample ID, Species name, and description as mandatory fields, so they are not included in the templates here. 1. Genomic / Transcriptomic template Analyte type Geographic location- latitude (decimal degrees) Geographic location- longitude (decimal degrees) Geographic location- country and/or sea,region Alternative accession-BioSample Alternative names source material identifiers Collection date Environment- biome Environment- feature Isolate Life stage Sex Tissue Age (years) IUCN Red List Sample source Sample contact Collected by

2. Micro-CT Imaging template Geographic location- longitude (decimal degrees) Geographic location- country and/or sea,region Tissue Life stage Alternative names source material identifiers Collection date Sample source Sample contact Collected by Sample storage location

Additional context We have yet to define any other templates, but when we do, we will need a way to be able to add those to the wizard. Preference would be to have an additional page within the Admin pages to both view, edit and create new templates (see issue #403 )

pli888 commented 4 years ago

@only1chunts Based on the WL code, the template options are provided by the template_name database table which is empty in the new database setup. You provided WL with this list of sample templates.

I will added them into the template_name table but do you want to provide them with a template_description and any notes which are two other columns in the template_name table?

only1chunts commented 4 years ago

Yes please @pli888 , I include descriptions below, I dont recall if we intended the "notes" to be for curators notes or extended descriptions for public use! My preference would be for curators only so that we can add things about any updates made to the templates in future, or common misuses that need to be addressed etc... For now there are no notes to be added.

sample_template-epigenomic.txt description: For epicgenomic DNA samples we would expect to see sample metadata that complies with the Genomic Standards Consortium MIxS checklists, the most common features of which are in this template, please add other fields as required. The complete list of pre-defined sample attributes are available here, and it is possible to include bespoke attributes by communication with us.

sample_template-genomic.txt description: For genomic DNA samples we would expect to see sample metadata that complies with the Genomic Standards Consortium MIxS checklists, the most common features of which are in this template, please add other fields as required. The complete list of pre-defined sample attributes are available here, and it is possible to include bespoke attributes by communication with us.

sample_template-imaging.txt description: A template for sampling metadata for Imaging datasets, the most common attributes that we might expect to see are included in this template, please add other fields as required. The complete list of pre-defined sample attributes are available here, and it is possible to include bespoke attributes by communication with us.

sample_template-lipidomics.txt description: A template for sampling metadata for lipomic samples, the most common attributes that we would expect to see are included in this template, please add other fields as required. The complete list of pre-defined sample attributes are available here, and it is possible to include bespoke attributes by communication with us.

sample_template-metabolomics.txt description:A template for sampling metadata for metabolomic samples the most common attributes that we would expect to see are included in this template, please add other fields as required. The complete list of pre-defined sample attributes are available here, and it is possible to include bespoke attributes by communication with us.

sample_template-metagenomic.txt description: For metagenomic samples we would expect to see sample metadata that complies with the Genomic Standards Consortium MIxS checklists, the most common features of which are in this template, please add other fields as required. The complete list of pre-defined sample attributes are available here, and it is possible to include bespoke attributes by communication with us.

sample_template-transcriptomic.txt description: For RNA/transcriptomic samples we would expect to see sample metadata that complies with the Genomic Standards Consortium MIxS checklists, the most common features of which are in this template, please add other fields as required. The complete list of pre-defined sample attributes are available here, and it is possible to include bespoke attributes by communication with us.

pli888 commented 4 years ago

@only1chunts You know some attribute names begin with an upper case letter whilst other attribute names start with a lower case letter?

pli888 commented 4 years ago

@only1chunts The schema for the template_name table has to be modified with its template_description column changing from character varying(255) to character varying(500). This is to accommodate for the length of the descriptions for the templates.

only1chunts commented 4 years ago

OK, its probably best to increase it to 1000char now as its likely we'll try to extend the descriptions at some point.

only1chunts commented 4 years ago

Re: attribute names link. what is that page for/from? the ID's do not match the names according to the version in the production server! e.g. ID 1, "analyte type" is not analtye type in the database, ID 1 is "age", and most of the definitions are missing. If that is the version of attributes being used in the development it's going to be completely wrong when it is moved to production. Or its that list meant to be one of the templates? If so, its not meant to have any of those columns! its meant to just be the list of attribute IDs, those will be looked up against the database attributes table to get things like the name and description.

pli888 commented 4 years ago

Re: attribute names link. what is that page for/from? the ID's do not match the names according to the version in the production server!

That page displays the CSV file that is used to generate the attribute table and it is used to deploy a Postgresql database for development work!

Or its that list meant to be one of the templates? If so, its not meant to have any of those columns! its meant to just be the list of attribute IDs, those will be looked up against the database attributes table to get things like the name and description.

This first 47 rows are the contents of the attribute table that was in a database dump provided by WL when they left!

only1chunts commented 4 years ago

That needs updating/correcting to match the production version please. Otherwise, the attributes will be all wrong in the sample_attributes and file_attributes tables. Oddly it seems only the first 47 rows are incorrect? from sex (id200) downwards the ID numbers appear to match, but its quite likely I have updated the descriptions on things anyway (as i had a spurt of making corrections to descriptions a couple of weeks ago), so getting a whole new dump would be best.

pli888 commented 4 years ago

@only1chunts please check if these attributes are present in the attributes table and provide their database identifiers:

I cannot find them in the production database attributes table.

only1chunts commented 4 years ago

Tissue type should be tissue[ID 315] Sorry the others are all new terms that have been created by GSC but that I've not added to the database (until now): sequence quality check - just added as ID 903 annotation - just added as ID 902 number of contigs - just added as ID 904 WGA amplification approach - just added as ID 905