From 9b52eb4d8e4082050b29fe9dcb84e2d08bb0c639 Mon Sep 17 00:00:00 2001 From: Jasper Koehorst Date: Sat, 16 Aug 2025 14:17:18 +0200 Subject: [PATCH 1/5] Added program, not yet able to link it with the project Added observation unit and enabled it in the config Fixed issue with Assay (Last is not correct as it now has stream assay?) user / person replacement from main? --- db/seeds/example_data/example_data.seeds.rb | 128 ++++++++++++-------- 1 file changed, 80 insertions(+), 48 deletions(-) diff --git a/db/seeds/example_data/example_data.seeds.rb b/db/seeds/example_data/example_data.seeds.rb index df6194f33c..29d7a84d59 100644 --- a/db/seeds/example_data/example_data.seeds.rb +++ b/db/seeds/example_data/example_data.seeds.rb @@ -1,5 +1,6 @@ # Project, Institution, Workgroup -project = Project.where(title: 'Default Project').first_or_create +program = Programme.where(title: 'Default Programme').first_or_create(web_page: 'http://www.seek4science.org', funding_details: 'Funding H2020X01Y001', description: 'This is a test programme for the SEEK sandbox.') +project = Project.where(title: 'Default Project').first_or_create(:programme_id => program.id) # TODO this link is not working institution = Institution.where(title: 'Default Institution').first_or_create(country: 'United Kingdom') workgroup = WorkGroup.where(project_id: project.id, institution_id: institution.id).first_or_create @@ -35,41 +36,64 @@ investigation = Investigation.new(title: 'Central Carbon Metabolism of Sulfolobus solfataricus', description: 'An investigation in the CCM of S. solfataricus with a focus on the unique temperature adaptations and regulation; using a combined modelling and experimental approach.') investigation.projects = [project] -investigation.contributor = guest_user +investigation.contributor = guest_person investigation.policy = Policy.create(name: 'default policy', access_type: 1) investigation.save puts 'Seeded 1 investigation.' study = Study.new(title: 'Carbon loss at high T') -study.contributor = guest_user +study.contributor = guest_person study.policy = Policy.create(name: 'default policy', access_type: 1) study.investigation = investigation study.save puts 'Seeded 1 study.' +## Observation unit +observation_unit = ObservationUnit.new(title: 'Large scale bioreactor') +observation_unit.contributor = guest_person +observation_unit.policy = Policy.create(name: 'default policy', access_type: 1) +observation_unit.study = study +disable_authorization_checks { observation_unit.save } +puts 'Seeded 1 observation unit' + +## Assays ## + +## Experimental assay? exp_assay = Assay.new(title: 'Reconstituted system reference state', description: 'The four purified enzymes were incubated in assay buffer and consumption of 3PG and production of F6P were measured in time, together with GAP and DHAP concentrations.') exp_assay.contributor = guest_person exp_assay.policy = Policy.create(name: 'default policy', access_type: 1) exp_assay.study = study -exp_assay.assay_class = AssayClass.first +exp_assay.assay_class = AssayClass.experimental exp_assay.save -puts 'Seeded 1 experimental assay.' +puts "exp_assay: Seeded 1 #{exp_assay.assay_class.long_key.downcase}." +# Modeling assay? model_assay = Assay.new(title: 'Model reconstituted system', description: 'Mathematical model for the reconstituted system with PGK, GAPDH, TPI and FBPAase.') model_assay.contributor = guest_person model_assay.policy = Policy.create(name: 'default policy', access_type: 1) model_assay.study = study -model_assay.assay_class = AssayClass.last +model_assay.assay_class = AssayClass.modelling model_assay.save -puts 'Seeded 1 modelling analysis.' +puts "Seeded 1 #{model_assay.assay_class.long_key.downcase}." +# Assay stream +assay_stream = Assay.new(title: 'Assay stream', + description: 'A stream of assays? This is a test assay stream for the example data.',) +assay_stream.contributor = guest_person +assay_stream.policy = Policy.create(name: 'default policy', access_type: 1) +assay_stream.study = study +assay_stream.assay_class = AssayClass.assay_stream +assay_stream.save +puts "Seeded 1 assay stream #{model_assay.assay_class.long_key.downcase}." +# +####### # Assets # TODO check filesize data_file1 = DataFile.new(title: 'Metabolite concentrations during reconstituted enzyme incubation', description: 'The purified enzymes, PGK, GAPDH, TPI and FBPAase were incubated at 70 C en conversion of 3PG to F6P was followed.') -data_file1.contributor = guest_user +data_file1.contributor = guest_person data_file1.projects = [project] relationship = RelationshipType.where(title: 'Validation data').first data_file1.policy = Policy.create(name: 'default policy', access_type: 1) @@ -88,7 +112,7 @@ data_file2 = DataFile.new(title: 'Model simulation and Exp data for reconstituted system', description: 'Experimental data for the reconstituted system are plotted together with the model prediction.') -data_file2.contributor = guest_user +data_file2.contributor = guest_person data_file2.projects = [project] data_file2.policy = Policy.create(name: 'default policy', access_type: 1) data_file2.content_blob = ContentBlob.new(original_filename: 'combinedPlot.jpg', @@ -109,7 +133,7 @@ model = Model.new(title: 'Mathematical model for the combined four enzyme system', description: 'The PGK, GAPDH, TPI and FBPAase were modelled together using the individual rate equations. Closed system.') model.model_format = ModelFormat.find_by_title('SBML') -model.contributor = guest_user +model.contributor = guest_person model.projects = [project] model.assays = [model_assay] model.policy = Policy.create(name: 'default policy', access_type: 1) @@ -131,7 +155,7 @@ content_type: 'text/xml') model.content_blobs = [cb1, cb2, cb3, cb4, cb5, cb6] disable_authorization_checks { model.save } -AssetsCreator.create(asset_id: model.id, creator_id: guest_user.id, asset_type: model.class.name) +AssetsCreator.create(asset_id: model.id, creator_id: guest_person.id, asset_type: model.class.name) # copy file model.content_blobs.each do |blob| FileUtils.cp File.dirname(__FILE__) + '/' + blob.original_filename, blob.filepath @@ -144,7 +168,7 @@ sop = Sop.new(title: "Default title", description: "Default description" ) -sop.contributor = guest_user +sop.contributor = guest_person sop.projects = [project] sop.assays = [exp_assay] sop.policy = Policy.create(name: 'default policy', access_type: 1) @@ -152,54 +176,60 @@ content_type: 'text' ) disable_authorization_checks {sop.save} -AssetsCreator.create(asset_id: sop.id, creator_id: guest_user.id, asset_type: sop.class.name) +AssetsCreator.create(asset_id: sop.id, creator_id: guest_person.id, asset_type: sop.class.name) #copy file FileUtils.cp File.dirname(__FILE__) + '/' + sop.content_blob.original_filename, sop.content_blob.filepath puts "Seeded 1 sop." =end # publication -publication = Publication.new(pubmed_id: '23865479', - title: 'Intermediate instability at high temperature leads to low pathway efficiency for an in vitro reconstituted system of gluconeogenesis in Sulfolobus solfataricus', - abstract: "Four enzymes of the gluconeogenic pathway in Sulfolobus solfataricus were purified and kinetically characterized. The enzymes were reconstituted in vitro to quantify the contribution of temperature instability of the pathway intermediates to carbon loss from the system. - The reconstituted system, consisting of phosphoglycerate kinase, glyceraldehyde 3-phosphate dehydrogenase, triose phosphate isomerase and the fructose 1,6-bisphosphate aldolase/phosphatase, maintained a constant consumption rate of 3-phosphoglycerate and production of - fructose 6-phosphate over a 1-h period. Cofactors ATP and NADPH were regenerated via pyruvate kinase and glucose dehydrogenase. A mathematical model was constructed on the basis of the kinetics of the purified enzymes and the measured half-life times of the pathway intermediates. - The model quantitatively predicted the system fluxes and metabolite concentrations. Relative enzyme concentrations were chosen such that half the carbon in the system was lost due to degradation of the thermolabile intermediates dihydroxyacetone phosphate, glyceraldehyde 3-phosphate - and 1,3-bisphosphoglycerate, indicating that intermediate instability at high temperature can significantly affect pathway efficiency.", - published_date: '2015', - journal: 'FEBS J') - -publication.contributor = guest_user -publication.projects = [project] -publication.policy = Policy.create(name: 'default policy', access_type: 1) -publication_author1 = PublicationAuthor.new(first_name: 'T.', - last_name: 'Kouril', - author_index: 1) -publication_author2 = PublicationAuthor.new(first_name: 'D.', - last_name: 'Esser', - author_index: 1) -publication_author3 = PublicationAuthor.new(first_name: 'J.', - last_name: 'Kort', - author_index: 1) -publication_author4 = PublicationAuthor.new(first_name: 'H. V.', - last_name: 'Westerhoff', - author_index: 1) -publication_author5 = PublicationAuthor.new(first_name: 'B.', - last_name: 'Siebers', - author_index: 1) -publication_author6 = PublicationAuthor.new(first_name: 'J.', - last_name: 'Snoep', - author_index: 1) - -publication.publication_authors = [publication_author1, publication_author2, publication_author3, publication_author4, publication_author5, publication_author6] +publication = Publication.new( + publication_type_id: PublicationType.where(title:"Journal").first.id, + pubmed_id: '23865479', + title: 'Intermediate instability at high temperature leads to low pathway efficiency for an in vitro reconstituted system of gluconeogenesis in Sulfolobus solfataricus', + abstract: "Four enzymes of the gluconeogenic pathway in Sulfolobus solfataricus were purified and kinetically characterized. The enzymes were reconstituted in vitro to quantify the contribution of temperature instability of the pathway intermediates to carbon loss from the system. + The reconstituted system, consisting of phosphoglycerate kinase, glyceraldehyde 3-phosphate dehydrogenase, triose phosphate isomerase and the fructose 1,6-bisphosphate aldolase/phosphatase, maintained a constant consumption rate of 3-phosphoglycerate and production of + fructose 6-phosphate over a 1-h period. Cofactors ATP and NADPH were regenerated via pyruvate kinase and glucose dehydrogenase. A mathematical model was constructed on the basis of the kinetics of the purified enzymes and the measured half-life times of the pathway intermediates. + The model quantitatively predicted the system fluxes and metabolite concentrations. Relative enzyme concentrations were chosen such that half the carbon in the system was lost due to degradation of the thermolabile intermediates dihydroxyacetone phosphate, glyceraldehyde 3-phosphate + and 1,3-bisphosphoglycerate, indicating that intermediate instability at high temperature can significantly affect pathway efficiency.", + published_date: '2015', + journal: 'FEBS J' +) + +# Set contributor and projects +publication.contributor = guest_person +publication.projects << project + +# Build policy through the association +publication.build_policy(name: 'default policy', access_type: 1) + +# Build publication authors +authors = [ + { first_name: 'T.', last_name: 'Kouril', author_index: 1 }, + { first_name: 'D.', last_name: 'Esser', author_index: 2 }, + { first_name: 'J.', last_name: 'Kort', author_index: 3 }, + { first_name: 'H. V.', last_name: 'Westerhoff', author_index: 4 }, + { first_name: 'B.', last_name: 'Siebers', author_index: 5 }, + { first_name: 'J.', last_name: 'Snoep', author_index: 6 } +] + +authors.each do |author_attrs| + publication.publication_authors.build(author_attrs) +end + +# Save publication with all associations disable_authorization_checks do - publication.save + publication.save! # raises an error if something is invalid publication.associate(exp_assay) publication.associate(model_assay) end -AssetsCreator.create(asset_id: publication.id, creator_id: guest_user.id, asset_type: publication.class.name) + +# Create asset +AssetsCreator.create(asset_id: publication.id, creator_id: guest_person.id, asset_type: publication.class.name) + puts 'Seeded 1 publication.' +# Log activity [project, investigation, study, exp_assay, model_assay, data_file1, data_file2, model, publication].each do |item| ActivityLog.create(action: 'create', culprit: guest_user, @@ -213,6 +243,8 @@

For more information about SEEK and to see a video, please visit our Website.

' Seek::Config.solr_enabled = true +Seek::Config.isa_enabled = true +Seek::Config.observation_units_enabled = true Seek::Config.programmes_enabled = true Seek::Config.programme_user_creation_enabled = true Seek::Config.noreply_sender = 'no-reply@fair-dom.org' From 6fda9138a930543917b7b44c94e65401327100d4 Mon Sep 17 00:00:00 2001 From: Jasper Koehorst Date: Sat, 16 Aug 2025 15:24:55 +0200 Subject: [PATCH 2/5] - added some comments - program now has administrators and a project associated with it. - skipped authorization checks to add project to programme. --- db/seeds/example_data/example_data.seeds.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/db/seeds/example_data/example_data.seeds.rb b/db/seeds/example_data/example_data.seeds.rb index 29d7a84d59..9343ec73ed 100644 --- a/db/seeds/example_data/example_data.seeds.rb +++ b/db/seeds/example_data/example_data.seeds.rb @@ -4,13 +4,15 @@ institution = Institution.where(title: 'Default Institution').first_or_create(country: 'United Kingdom') workgroup = WorkGroup.where(project_id: project.id, institution_id: institution.id).first_or_create +## Create an admin and a guest user + +# Admin admin_user = User.where(login: 'admin').first_or_create( login: 'admin', email: 'admin@test1000.com', password: 'adminadmin', password_confirmation: 'adminadmin' ) -# Admin and guest admin_user.activate admin_user.build_person(first_name: 'Admin', last_name: 'User', email: 'admin@test1000.com') unless admin_user.person admin_user.save! @@ -19,6 +21,7 @@ admin_person.save puts 'Seeded 1 admin.' +## Guest guest_user = User.where(login: 'guest').first_or_create( login: 'guest', email: 'guest@test1000.com', @@ -238,6 +241,16 @@ data: item.title) end +# Updating programme +disable_authorization_checks do + program.programme_administrators = [guest_person, admin_person] + program.projects = [project] + # program.funding_codes_as_text = ['123456789'] # TODO cannot set funding codes + # Discussion links... + program.save! + end + + Seek::Config.home_description = '

Welcome to the SEEK Sandbox

You can log in with the username: guest and password: guest

For more information about SEEK and to see a video, please visit our Website.

' From 820df8bcf23bcd1921a8f16c738f09b0e24d1a83 Mon Sep 17 00:00:00 2001 From: Jasper Koehorst Date: Sun, 17 Aug 2025 16:19:03 +0200 Subject: [PATCH 3/5] expanded the example_data further - added strain information - added organism - updated project description, web page, pals - updated institution using ROR - added annotate_with (tags) - observation unit description, creators and tags - added organism to exp_assay - sop corrections with a fake file - publication citation added and date --- db/seeds/example_data/example_data.seeds.rb | 80 +++++++++++++++++---- db/seeds/example_data/test_sop.txt | 0 2 files changed, 65 insertions(+), 15 deletions(-) create mode 100644 db/seeds/example_data/test_sop.txt diff --git a/db/seeds/example_data/example_data.seeds.rb b/db/seeds/example_data/example_data.seeds.rb index 9343ec73ed..d5822007a5 100644 --- a/db/seeds/example_data/example_data.seeds.rb +++ b/db/seeds/example_data/example_data.seeds.rb @@ -1,9 +1,29 @@ # Project, Institution, Workgroup program = Programme.where(title: 'Default Programme').first_or_create(web_page: 'http://www.seek4science.org', funding_details: 'Funding H2020X01Y001', description: 'This is a test programme for the SEEK sandbox.') -project = Project.where(title: 'Default Project').first_or_create(:programme_id => program.id) # TODO this link is not working +project = Project.where(title: 'Default Project').first_or_create(:programme_id => program.id, description: 'A description for the default project') # TODO this link is not working institution = Institution.where(title: 'Default Institution').first_or_create(country: 'United Kingdom') workgroup = WorkGroup.where(project_id: project.id, institution_id: institution.id).first_or_create + +# Create a strain +strain = Strain.where(title: 'Sulfolobus solfataricus strain 98/2').first_or_create() +strain.projects = [project] +strain.policy = Policy.create(name: 'default policy', access_type: 1) +strain.organism = Organism.where(title: 'Sulfolobus solfataricus').first_or_create() +strain.provider_name = 'BacDive' +strain.provider_id = '123456789' +strain.synonym = '98/2' +strain.comment = 'This is a test strain.' +strain.save! +puts 'Seeded 1 strain.' + +# Create an organism +organism = Organism.where(title: 'Sulfolobus solfataricus').first_or_create() +organism.projects = [project] +organism.strains = [strain] +organism.save! +puts 'Seeded 1 organism.' + ## Create an admin and a guest user # Admin @@ -35,12 +55,35 @@ guest_person.save puts 'Seeded 1 guest.' +# Update project +disable_authorization_checks do + project.description = 'This is a test project for the SEEK sandbox.' + project.web_page = 'http://www.seek4science.org' + project.pals = [guest_person] + project.save! + puts 'Seeded 1 project.' +end + +# Update institution +disable_authorization_checks do + institution.country = 'United Kingdom' + institution.city = 'Manchester' # Overridden by ROR + institution.web_page = 'http://www.seek4science.org' # Overridden by ROR + institution.ror_id = '027m9bs27' + institution.address = '10 Downing Street' # Stays the same + institution.department = 'Department of SEEK for Science' + # Logo? + institution.save! + puts 'Seeded 1 institution.' +end + # ISA investigation = Investigation.new(title: 'Central Carbon Metabolism of Sulfolobus solfataricus', description: 'An investigation in the CCM of S. solfataricus with a focus on the unique temperature adaptations and regulation; using a combined modelling and experimental approach.') investigation.projects = [project] investigation.contributor = guest_person investigation.policy = Policy.create(name: 'default policy', access_type: 1) +investigation.annotate_with(['metabolism', 'thermophile'], 'tag', guest_person) investigation.save puts 'Seeded 1 investigation.' @@ -48,13 +91,17 @@ study.contributor = guest_person study.policy = Policy.create(name: 'default policy', access_type: 1) study.investigation = investigation +study.annotate_with(['thermophile', 'high temperature'], 'tag', guest_person) study.save puts 'Seeded 1 study.' ## Observation unit observation_unit = ObservationUnit.new(title: 'Large scale bioreactor') +observation_unit.description = 'A large scale bioreactor with a 1000 mL reservoir.' +observation_unit.other_creators = [admin_person.name, 'Jane Doe'] observation_unit.contributor = guest_person observation_unit.policy = Policy.create(name: 'default policy', access_type: 1) +observation_unit.annotate_with(['bioreactor'], 'tag', guest_person) observation_unit.study = study disable_authorization_checks { observation_unit.save } puts 'Seeded 1 observation unit' @@ -67,7 +114,9 @@ exp_assay.contributor = guest_person exp_assay.policy = Policy.create(name: 'default policy', access_type: 1) exp_assay.study = study +# exp_assay.observation_units = [observation_unit] # TODO ActiveRecord::HasManyThroughNestedAssociationsAreReadonly: Cannot modify association 'Assay#observation_units' because it goes through more than one other association. (ActiveRecord::HasManyThroughNestedAssociationsAreReadonly) exp_assay.assay_class = AssayClass.experimental +exp_assay.organisms = [organism] exp_assay.save puts "exp_assay: Seeded 1 #{exp_assay.assay_class.long_key.downcase}." @@ -90,7 +139,7 @@ assay_stream.assay_class = AssayClass.assay_stream assay_stream.save puts "Seeded 1 assay stream #{model_assay.assay_class.long_key.downcase}." -# + ####### # Assets # TODO check filesize @@ -166,24 +215,22 @@ end puts 'Seeded 1 model.' -# sop -=begin -sop = Sop.new(title: "Default title", - description: "Default description" -) +# Sop creation +sop = Sop.new(title: 'Reconstituted Enzyme System Protocol', + description: 'Standard operating procedure for reconstituting the gluconeogenic enzyme system from Sulfolobus solfataricus to study metabolic pathway efficiency at high temperatures.') sop.contributor = guest_person sop.projects = [project] -sop.assays = [exp_assay] +sop.assays = [exp_assay, model_assay] sop.policy = Policy.create(name: 'default policy', access_type: 1) sop.content_blob = ContentBlob.new(original_filename: 'test_sop.txt', - content_type: 'text' -) -disable_authorization_checks {sop.save} + content_type: 'text') AssetsCreator.create(asset_id: sop.id, creator_id: guest_person.id, asset_type: sop.class.name) -#copy file FileUtils.cp File.dirname(__FILE__) + '/' + sop.content_blob.original_filename, sop.content_blob.filepath -puts "Seeded 1 sop." -=end + +disable_authorization_checks {sop.save!} +sop.annotate_with(['protocol', 'enzymology', 'thermophile'], 'tag', guest_person) +puts 'Seeded 1 SOP.' + # publication publication = Publication.new( @@ -205,7 +252,8 @@ # Build policy through the association publication.build_policy(name: 'default policy', access_type: 1) - +# Publication date +publication.published_date = Date.today.to_s # Build publication authors authors = [ { first_name: 'T.', last_name: 'Kouril', author_index: 1 }, @@ -215,6 +263,8 @@ { first_name: 'B.', last_name: 'Siebers', author_index: 5 }, { first_name: 'J.', last_name: 'Snoep', author_index: 6 } ] +# Citation +publication.citation = "Kouril, T. et al. Intermediate instability at high temperature leads to low pathway efficiency for an in vitro reconstituted system of gluconeogenesis in Sulfolobus solfataricus. FEBS J. 2015;687:100-108." authors.each do |author_attrs| publication.publication_authors.build(author_attrs) diff --git a/db/seeds/example_data/test_sop.txt b/db/seeds/example_data/test_sop.txt new file mode 100644 index 0000000000..e69de29bb2 From 5a773bbd13898e2b3ee3e444be0f1e5894b2acb2 Mon Sep 17 00:00:00 2001 From: Jasper Koehorst Date: Mon, 18 Aug 2025 21:13:45 +0200 Subject: [PATCH 4/5] i was having trouble with the inference due to the "large" file size so i broke it up into smaller parts. - added samples to the list as well - added a presentation with a single example slide --- db/seeds/example_data/example_config_seeds.rb | 43 +++ db/seeds/example_data/example_data.seeds.rb | 332 +----------------- .../example_data_files_and_models_seeds.rb | 95 +++++ .../example_isa_structure_seeds.rb | 70 ++++ .../example_projects_and_basic_setup_seeds.rb | 32 ++ ...le_publications_and_presentations_seeds.rb | 85 +++++ .../example_data/example_samples_seeds.rb | 230 ++++++++++++ db/seeds/example_data/example_users_seeds.rb | 59 ++++ db/seeds/example_data/presentation.pptx | Bin 0 -> 34698 bytes db/seeds/example_data/test_sop.txt | 79 +++++ 10 files changed, 701 insertions(+), 324 deletions(-) create mode 100644 db/seeds/example_data/example_config_seeds.rb create mode 100644 db/seeds/example_data/example_data_files_and_models_seeds.rb create mode 100644 db/seeds/example_data/example_isa_structure_seeds.rb create mode 100644 db/seeds/example_data/example_projects_and_basic_setup_seeds.rb create mode 100644 db/seeds/example_data/example_publications_and_presentations_seeds.rb create mode 100644 db/seeds/example_data/example_samples_seeds.rb create mode 100644 db/seeds/example_data/example_users_seeds.rb create mode 100644 db/seeds/example_data/presentation.pptx diff --git a/db/seeds/example_data/example_config_seeds.rb b/db/seeds/example_data/example_config_seeds.rb new file mode 100644 index 0000000000..852baf6d93 --- /dev/null +++ b/db/seeds/example_data/example_config_seeds.rb @@ -0,0 +1,43 @@ +# Activity Logging and Configuration + +# Log activity +[$project, $investigation, $study, $exp_assay, $model_assay, $data_file1, $data_file2, $model, $publication].each do |item| + ActivityLog.create(action: 'create', + culprit: $guest_user, + controller_name: item.class.name.underscore.pluralize, + activity_loggable: item, + data: item.title) +end + +# Updating programme +disable_authorization_checks do + $program.programme_administrators = [$guest_person, $admin_person] + $program.projects = [$project] + # $program.funding_codes_as_text = ['123456789'] # TODO cannot set funding codes + # Discussion links... + $program.save! +end + +# Configuration +Seek::Config.home_description = '

Welcome to the SEEK Sandbox

+

You can log in with the username: guest and password: guest

+

For more information about SEEK and to see a video, please visit our Website.

' + +Seek::Config.solr_enabled = true +Seek::Config.isa_enabled = true +Seek::Config.observation_units_enabled = true +Seek::Config.programmes_enabled = true +Seek::Config.programme_user_creation_enabled = true +Seek::Config.noreply_sender = 'no-reply@fair-dom.org' +Seek::Config.instance_name = 'SEEK SANDBOX' +Seek::Config.application_name = 'FAIRDOM-SEEK' +Seek::Config.exception_notification_enabled = true +Seek::Config.exception_notification_recipients = ['errors@fair-dom.org'] +Seek::Config.datacite_url = 'https://mds.test.datacite.org/' +Seek::Config.doi_prefix = '10.5072' +Seek::Config.doi_suffix = 'seek.5' +Seek::Config.tag_threshold = 0 # TODO set to 0 or 1 so the tags created in this example_data seeds will be visiblw on the front page. +puts 'Finish configuration' +puts 'Please visit admin site for further configuration, e.g. site_base_host, pubmed_api_email, crossref_api_email, bioportal_api_key, email, doi, admin email' +puts 'Admin account: username admin, password adminadmin. You might want to change admin password.' +puts 'Then make sure solr, workers are running' \ No newline at end of file diff --git a/db/seeds/example_data/example_data.seeds.rb b/db/seeds/example_data/example_data.seeds.rb index d5822007a5..1903add756 100644 --- a/db/seeds/example_data/example_data.seeds.rb +++ b/db/seeds/example_data/example_data.seeds.rb @@ -1,324 +1,8 @@ -# Project, Institution, Workgroup -program = Programme.where(title: 'Default Programme').first_or_create(web_page: 'http://www.seek4science.org', funding_details: 'Funding H2020X01Y001', description: 'This is a test programme for the SEEK sandbox.') -project = Project.where(title: 'Default Project').first_or_create(:programme_id => program.id, description: 'A description for the default project') # TODO this link is not working -institution = Institution.where(title: 'Default Institution').first_or_create(country: 'United Kingdom') -workgroup = WorkGroup.where(project_id: project.id, institution_id: institution.id).first_or_create - - -# Create a strain -strain = Strain.where(title: 'Sulfolobus solfataricus strain 98/2').first_or_create() -strain.projects = [project] -strain.policy = Policy.create(name: 'default policy', access_type: 1) -strain.organism = Organism.where(title: 'Sulfolobus solfataricus').first_or_create() -strain.provider_name = 'BacDive' -strain.provider_id = '123456789' -strain.synonym = '98/2' -strain.comment = 'This is a test strain.' -strain.save! -puts 'Seeded 1 strain.' - -# Create an organism -organism = Organism.where(title: 'Sulfolobus solfataricus').first_or_create() -organism.projects = [project] -organism.strains = [strain] -organism.save! -puts 'Seeded 1 organism.' - -## Create an admin and a guest user - -# Admin -admin_user = User.where(login: 'admin').first_or_create( - login: 'admin', - email: 'admin@test1000.com', - password: 'adminadmin', password_confirmation: 'adminadmin' -) - -admin_user.activate -admin_user.build_person(first_name: 'Admin', last_name: 'User', email: 'admin@test1000.com') unless admin_user.person -admin_user.save! -admin_user.person.work_groups << workgroup -admin_person = admin_user.person -admin_person.save -puts 'Seeded 1 admin.' - -## Guest -guest_user = User.where(login: 'guest').first_or_create( - login: 'guest', - email: 'guest@test1000.com', - password: 'guestguest', password_confirmation: 'guestguest' -) -guest_user.activate -guest_user.build_person(first_name: 'Guest', last_name: 'User', email: 'guest@example.com') unless guest_user.person -guest_user.save! -guest_user.person.work_groups << workgroup -guest_person = guest_user.person -guest_person.save -puts 'Seeded 1 guest.' - -# Update project -disable_authorization_checks do - project.description = 'This is a test project for the SEEK sandbox.' - project.web_page = 'http://www.seek4science.org' - project.pals = [guest_person] - project.save! - puts 'Seeded 1 project.' -end - -# Update institution -disable_authorization_checks do - institution.country = 'United Kingdom' - institution.city = 'Manchester' # Overridden by ROR - institution.web_page = 'http://www.seek4science.org' # Overridden by ROR - institution.ror_id = '027m9bs27' - institution.address = '10 Downing Street' # Stays the same - institution.department = 'Department of SEEK for Science' - # Logo? - institution.save! - puts 'Seeded 1 institution.' -end - -# ISA -investigation = Investigation.new(title: 'Central Carbon Metabolism of Sulfolobus solfataricus', - description: 'An investigation in the CCM of S. solfataricus with a focus on the unique temperature adaptations and regulation; using a combined modelling and experimental approach.') -investigation.projects = [project] -investigation.contributor = guest_person -investigation.policy = Policy.create(name: 'default policy', access_type: 1) -investigation.annotate_with(['metabolism', 'thermophile'], 'tag', guest_person) -investigation.save -puts 'Seeded 1 investigation.' - -study = Study.new(title: 'Carbon loss at high T') -study.contributor = guest_person -study.policy = Policy.create(name: 'default policy', access_type: 1) -study.investigation = investigation -study.annotate_with(['thermophile', 'high temperature'], 'tag', guest_person) -study.save -puts 'Seeded 1 study.' - -## Observation unit -observation_unit = ObservationUnit.new(title: 'Large scale bioreactor') -observation_unit.description = 'A large scale bioreactor with a 1000 mL reservoir.' -observation_unit.other_creators = [admin_person.name, 'Jane Doe'] -observation_unit.contributor = guest_person -observation_unit.policy = Policy.create(name: 'default policy', access_type: 1) -observation_unit.annotate_with(['bioreactor'], 'tag', guest_person) -observation_unit.study = study -disable_authorization_checks { observation_unit.save } -puts 'Seeded 1 observation unit' - -## Assays ## - -## Experimental assay? -exp_assay = Assay.new(title: 'Reconstituted system reference state', - description: 'The four purified enzymes were incubated in assay buffer and consumption of 3PG and production of F6P were measured in time, together with GAP and DHAP concentrations.') -exp_assay.contributor = guest_person -exp_assay.policy = Policy.create(name: 'default policy', access_type: 1) -exp_assay.study = study -# exp_assay.observation_units = [observation_unit] # TODO ActiveRecord::HasManyThroughNestedAssociationsAreReadonly: Cannot modify association 'Assay#observation_units' because it goes through more than one other association. (ActiveRecord::HasManyThroughNestedAssociationsAreReadonly) -exp_assay.assay_class = AssayClass.experimental -exp_assay.organisms = [organism] -exp_assay.save -puts "exp_assay: Seeded 1 #{exp_assay.assay_class.long_key.downcase}." - -# Modeling assay? -model_assay = Assay.new(title: 'Model reconstituted system', - description: 'Mathematical model for the reconstituted system with PGK, GAPDH, TPI and FBPAase.') -model_assay.contributor = guest_person -model_assay.policy = Policy.create(name: 'default policy', access_type: 1) -model_assay.study = study -model_assay.assay_class = AssayClass.modelling -model_assay.save -puts "Seeded 1 #{model_assay.assay_class.long_key.downcase}." - -# Assay stream -assay_stream = Assay.new(title: 'Assay stream', - description: 'A stream of assays? This is a test assay stream for the example data.',) -assay_stream.contributor = guest_person -assay_stream.policy = Policy.create(name: 'default policy', access_type: 1) -assay_stream.study = study -assay_stream.assay_class = AssayClass.assay_stream -assay_stream.save -puts "Seeded 1 assay stream #{model_assay.assay_class.long_key.downcase}." - -####### -# Assets -# TODO check filesize -data_file1 = DataFile.new(title: 'Metabolite concentrations during reconstituted enzyme incubation', - description: 'The purified enzymes, PGK, GAPDH, TPI and FBPAase were incubated at 70 C en conversion of 3PG to F6P was followed.') -data_file1.contributor = guest_person -data_file1.projects = [project] -relationship = RelationshipType.where(title: 'Validation data').first -data_file1.policy = Policy.create(name: 'default policy', access_type: 1) -data_file1.content_blob = ContentBlob.new(original_filename: 'ValidationReference.xlsx', - content_type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') -disable_authorization_checks do - data_file1.save - exp_assay.associate(data_file1) - model_assay.associate(data_file1, relationship: relationship) -end -AssetsCreator.create(asset_id: data_file1.id, creator_id: guest_user.id, asset_type: data_file1.class.name) -# copy file -FileUtils.cp File.dirname(__FILE__) + '/' + data_file1.content_blob.original_filename, data_file1.content_blob.filepath -disable_authorization_checks { data_file1.content_blob.save } -puts 'Seeded data file 1.' - -data_file2 = DataFile.new(title: 'Model simulation and Exp data for reconstituted system', - description: 'Experimental data for the reconstituted system are plotted together with the model prediction.') -data_file2.contributor = guest_person -data_file2.projects = [project] -data_file2.policy = Policy.create(name: 'default policy', access_type: 1) -data_file2.content_blob = ContentBlob.new(original_filename: 'combinedPlot.jpg', - content_type: 'image/jpeg') -disable_authorization_checks do - data_file2.save - exp_assay.associate(data_file2) - model_assay.associate(data_file2, relationship: relationship) -end - -AssetsCreator.create(asset_id: data_file2.id, creator_id: guest_user.id, asset_type: data_file2.class.name) -# copy file -FileUtils.cp File.dirname(__FILE__) + '/' + data_file2.content_blob.original_filename, data_file2.content_blob.filepath -disable_authorization_checks { data_file2.content_blob.save } -puts 'Seeded data file 2.' - -# model -model = Model.new(title: 'Mathematical model for the combined four enzyme system', - description: 'The PGK, GAPDH, TPI and FBPAase were modelled together using the individual rate equations. Closed system.') -model.model_format = ModelFormat.find_by_title('SBML') -model.contributor = guest_person -model.projects = [project] -model.assays = [model_assay] -model.policy = Policy.create(name: 'default policy', access_type: 1) -model.model_type = ModelType.where(title: 'Ordinary differential equations (ODE)').first -model.model_format = ModelFormat.where(title: 'SBML').first -model.recommended_environment = RecommendedModelEnvironment.where(title: 'JWS Online').first -model.organism = Organism.where(title: 'Sulfolobus solfataricus').first -cb1 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisOpenAnn.dat', - content_type: 'text/x-uuencode') -cb2 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisOpenAnn.xml', - content_type: 'text/xml') -cb3 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisOpenAnn.xml', - content_type: 'text/xml') -cb4 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisAnn.xml', - content_type: 'text/xml') -cb5 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisClosed.xml', - content_type: 'text/xml') -cb6 = ContentBlob.new(original_filename: 'ssolfGluconeogenesis.xml', - content_type: 'text/xml') -model.content_blobs = [cb1, cb2, cb3, cb4, cb5, cb6] -disable_authorization_checks { model.save } -AssetsCreator.create(asset_id: model.id, creator_id: guest_person.id, asset_type: model.class.name) -# copy file -model.content_blobs.each do |blob| - FileUtils.cp File.dirname(__FILE__) + '/' + blob.original_filename, blob.filepath - blob.save -end -puts 'Seeded 1 model.' - -# Sop creation -sop = Sop.new(title: 'Reconstituted Enzyme System Protocol', - description: 'Standard operating procedure for reconstituting the gluconeogenic enzyme system from Sulfolobus solfataricus to study metabolic pathway efficiency at high temperatures.') -sop.contributor = guest_person -sop.projects = [project] -sop.assays = [exp_assay, model_assay] -sop.policy = Policy.create(name: 'default policy', access_type: 1) -sop.content_blob = ContentBlob.new(original_filename: 'test_sop.txt', - content_type: 'text') -AssetsCreator.create(asset_id: sop.id, creator_id: guest_person.id, asset_type: sop.class.name) -FileUtils.cp File.dirname(__FILE__) + '/' + sop.content_blob.original_filename, sop.content_blob.filepath - -disable_authorization_checks {sop.save!} -sop.annotate_with(['protocol', 'enzymology', 'thermophile'], 'tag', guest_person) -puts 'Seeded 1 SOP.' - - -# publication -publication = Publication.new( - publication_type_id: PublicationType.where(title:"Journal").first.id, - pubmed_id: '23865479', - title: 'Intermediate instability at high temperature leads to low pathway efficiency for an in vitro reconstituted system of gluconeogenesis in Sulfolobus solfataricus', - abstract: "Four enzymes of the gluconeogenic pathway in Sulfolobus solfataricus were purified and kinetically characterized. The enzymes were reconstituted in vitro to quantify the contribution of temperature instability of the pathway intermediates to carbon loss from the system. - The reconstituted system, consisting of phosphoglycerate kinase, glyceraldehyde 3-phosphate dehydrogenase, triose phosphate isomerase and the fructose 1,6-bisphosphate aldolase/phosphatase, maintained a constant consumption rate of 3-phosphoglycerate and production of - fructose 6-phosphate over a 1-h period. Cofactors ATP and NADPH were regenerated via pyruvate kinase and glucose dehydrogenase. A mathematical model was constructed on the basis of the kinetics of the purified enzymes and the measured half-life times of the pathway intermediates. - The model quantitatively predicted the system fluxes and metabolite concentrations. Relative enzyme concentrations were chosen such that half the carbon in the system was lost due to degradation of the thermolabile intermediates dihydroxyacetone phosphate, glyceraldehyde 3-phosphate - and 1,3-bisphosphoglycerate, indicating that intermediate instability at high temperature can significantly affect pathway efficiency.", - published_date: '2015', - journal: 'FEBS J' -) - -# Set contributor and projects -publication.contributor = guest_person -publication.projects << project - -# Build policy through the association -publication.build_policy(name: 'default policy', access_type: 1) -# Publication date -publication.published_date = Date.today.to_s -# Build publication authors -authors = [ - { first_name: 'T.', last_name: 'Kouril', author_index: 1 }, - { first_name: 'D.', last_name: 'Esser', author_index: 2 }, - { first_name: 'J.', last_name: 'Kort', author_index: 3 }, - { first_name: 'H. V.', last_name: 'Westerhoff', author_index: 4 }, - { first_name: 'B.', last_name: 'Siebers', author_index: 5 }, - { first_name: 'J.', last_name: 'Snoep', author_index: 6 } -] -# Citation -publication.citation = "Kouril, T. et al. Intermediate instability at high temperature leads to low pathway efficiency for an in vitro reconstituted system of gluconeogenesis in Sulfolobus solfataricus. FEBS J. 2015;687:100-108." - -authors.each do |author_attrs| - publication.publication_authors.build(author_attrs) -end - -# Save publication with all associations -disable_authorization_checks do - publication.save! # raises an error if something is invalid - publication.associate(exp_assay) - publication.associate(model_assay) -end - -# Create asset -AssetsCreator.create(asset_id: publication.id, creator_id: guest_person.id, asset_type: publication.class.name) - -puts 'Seeded 1 publication.' - -# Log activity -[project, investigation, study, exp_assay, model_assay, data_file1, data_file2, model, publication].each do |item| - ActivityLog.create(action: 'create', - culprit: guest_user, - controller_name: item.class.name.underscore.pluralize, - activity_loggable: item, - data: item.title) -end - -# Updating programme -disable_authorization_checks do - program.programme_administrators = [guest_person, admin_person] - program.projects = [project] - # program.funding_codes_as_text = ['123456789'] # TODO cannot set funding codes - # Discussion links... - program.save! - end - - -Seek::Config.home_description = '

Welcome to the SEEK Sandbox

-

You can log in with the username: guest and password: guest

-

For more information about SEEK and to see a video, please visit our Website.

' - -Seek::Config.solr_enabled = true -Seek::Config.isa_enabled = true -Seek::Config.observation_units_enabled = true -Seek::Config.programmes_enabled = true -Seek::Config.programme_user_creation_enabled = true -Seek::Config.noreply_sender = 'no-reply@fair-dom.org' -Seek::Config.instance_name = 'SEEK SANDBOX' -Seek::Config.application_name = 'FAIRDOM-SEEK' -Seek::Config.exception_notification_enabled = true -Seek::Config.exception_notification_recipients = ['errors@fair-dom.org'] -Seek::Config.datacite_url = 'https://mds.test.datacite.org/' -Seek::Config.doi_prefix = '10.5072' -Seek::Config.doi_suffix = 'seek.5' -puts 'Finish configuration' -puts 'Please visit admin site for further configuration, e.g. site_base_host, pubmed_api_email, crossref_api_email, bioportal_api_key, email, doi, admin email' -puts 'Admin account: username admin, password adminadmin. You might want to change admin password.' -puts 'Then make sure solr, workers are running' +# Load modular seed files in order +require_relative 'example_projects_and_basic_setup_seeds' +require_relative 'example_users_seeds' +require_relative 'example_isa_structure_seeds' +require_relative 'example_samples_seeds' +require_relative 'example_data_files_and_models_seeds' +require_relative 'example_publications_and_presentations_seeds' +require_relative 'example_config_seeds' diff --git a/db/seeds/example_data/example_data_files_and_models_seeds.rb b/db/seeds/example_data/example_data_files_and_models_seeds.rb new file mode 100644 index 0000000000..28d123ebba --- /dev/null +++ b/db/seeds/example_data/example_data_files_and_models_seeds.rb @@ -0,0 +1,95 @@ +# Assets - Data files, Models, SOPs +# TODO check filesize +data_file1 = DataFile.new(title: 'Metabolite concentrations during reconstituted enzyme incubation', + description: 'The purified enzymes, PGK, GAPDH, TPI and FBPAase were incubated at 70 C en conversion of 3PG to F6P was followed.') +data_file1.contributor = $guest_person +data_file1.projects = [$project] +relationship = RelationshipType.where(title: 'Validation data').first +data_file1.policy = Policy.create(name: 'default policy', access_type: 1) +data_file1.content_blob = ContentBlob.new(original_filename: 'ValidationReference.xlsx', + content_type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') +disable_authorization_checks do + data_file1.save + $exp_assay.associate(data_file1) + $model_assay.associate(data_file1, relationship: relationship) +end +AssetsCreator.create(asset_id: data_file1.id, creator_id: $guest_user.id, asset_type: data_file1.class.name) +# copy file +FileUtils.cp File.dirname(__FILE__) + '/' + data_file1.content_blob.original_filename, data_file1.content_blob.filepath +disable_authorization_checks { data_file1.content_blob.save } +puts 'Seeded data file 1.' + +data_file2 = DataFile.new(title: 'Model simulation and Exp data for reconstituted system', + description: 'Experimental data for the reconstituted system are plotted together with the model prediction.') +data_file2.contributor = $guest_person +data_file2.projects = [$project] +data_file2.policy = Policy.create(name: 'default policy', access_type: 1) +data_file2.content_blob = ContentBlob.new(original_filename: 'combinedPlot.jpg', + content_type: 'image/jpeg') +disable_authorization_checks do + data_file2.save + $exp_assay.associate(data_file2) + $model_assay.associate(data_file2, relationship: relationship) +end + +AssetsCreator.create(asset_id: data_file2.id, creator_id: $guest_user.id, asset_type: data_file2.class.name) +# copy file +FileUtils.cp File.dirname(__FILE__) + '/' + data_file2.content_blob.original_filename, data_file2.content_blob.filepath +disable_authorization_checks { data_file2.content_blob.save } +puts 'Seeded data file 2.' + +# model +model = Model.new(title: 'Mathematical model for the combined four enzyme system', + description: 'The PGK, GAPDH, TPI and FBPAase were modelled together using the individual rate equations. Closed system.') +model.model_format = ModelFormat.find_by_title('SBML') +model.contributor = $guest_person +model.projects = [$project] +model.assays = [$model_assay] +model.policy = Policy.create(name: 'default policy', access_type: 1) +model.model_type = ModelType.where(title: 'Ordinary differential equations (ODE)').first +model.model_format = ModelFormat.where(title: 'SBML').first +model.recommended_environment = RecommendedModelEnvironment.where(title: 'JWS Online').first +model.organism = Organism.where(title: 'Sulfolobus solfataricus').first +cb1 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisOpenAnn.dat', + content_type: 'text/x-uuencode') +cb2 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisOpenAnn.xml', + content_type: 'text/xml') +cb3 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisOpenAnn.xml', + content_type: 'text/xml') +cb4 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisAnn.xml', + content_type: 'text/xml') +cb5 = ContentBlob.new(original_filename: 'ssolfGluconeogenesisClosed.xml', + content_type: 'text/xml') +cb6 = ContentBlob.new(original_filename: 'ssolfGluconeogenesis.xml', + content_type: 'text/xml') +model.content_blobs = [cb1, cb2, cb3, cb4, cb5, cb6] +disable_authorization_checks { model.save } +AssetsCreator.create(asset_id: model.id, creator_id: $guest_person.id, asset_type: model.class.name) +# copy file +model.content_blobs.each do |blob| + FileUtils.cp File.dirname(__FILE__) + '/' + blob.original_filename, blob.filepath + blob.save +end +puts 'Seeded 1 model.' + +# Sop creation +sop = Sop.new(title: 'Reconstituted Enzyme System Protocol', + description: 'Standard operating procedure for reconstituting the gluconeogenic enzyme system from Sulfolobus solfataricus to study metabolic pathway efficiency at high temperatures.') +sop.contributor = $guest_person +sop.projects = [$project] +sop.assays = [$exp_assay, $model_assay] +sop.policy = Policy.create(name: 'default policy', access_type: 1) +sop.content_blob = ContentBlob.new(original_filename: 'test_sop.txt', + content_type: 'text') +AssetsCreator.create(asset_id: sop.id, creator_id: $guest_person.id, asset_type: sop.class.name) +FileUtils.cp File.dirname(__FILE__) + '/' + sop.content_blob.original_filename, sop.content_blob.filepath + +disable_authorization_checks {sop.save!} +sop.annotate_with(['protocol', 'enzymology', 'thermophile'], 'tag', $guest_person) +puts 'Seeded 1 SOP.' + +# Store references for other seed files +$data_file1 = data_file1 +$data_file2 = data_file2 +$model = model +$sop = sop \ No newline at end of file diff --git a/db/seeds/example_data/example_isa_structure_seeds.rb b/db/seeds/example_data/example_isa_structure_seeds.rb new file mode 100644 index 0000000000..e54625809a --- /dev/null +++ b/db/seeds/example_data/example_isa_structure_seeds.rb @@ -0,0 +1,70 @@ +# ISA - Investigation, Study, Assays, Observation Units +investigation = Investigation.new(title: 'Central Carbon Metabolism of Sulfolobus solfataricus', + description: 'An investigation in the CCM of S. solfataricus with a focus on the unique temperature adaptations and regulation; using a combined modelling and experimental approach.') +investigation.projects = [$project] +investigation.contributor = $guest_person +investigation.policy = Policy.create(name: 'default policy', access_type: 1) +investigation.annotate_with(['metabolism', 'thermophile'], 'tag', $guest_person) +investigation.save +puts 'Seeded 1 investigation.' + +study = Study.new(title: 'Carbon loss at high T') +study.contributor = $guest_person +study.policy = Policy.create(name: 'default policy', access_type: 1) +study.investigation = investigation +study.annotate_with(['thermophile', 'high temperature'], 'tag', $guest_person) +study.save +puts 'Seeded 1 study.' + +## Observation unit +observation_unit = ObservationUnit.new(title: 'Large scale bioreactor') +observation_unit.description = 'A large scale bioreactor with a 1000 mL reservoir.' +observation_unit.other_creators = [$admin_person.name, 'Jane Doe'] +observation_unit.contributor = $guest_person +observation_unit.policy = Policy.create(name: 'default policy', access_type: 1) +observation_unit.annotate_with(['bioreactor'], 'tag', $guest_person) +observation_unit.study = study +disable_authorization_checks { observation_unit.save } +puts 'Seeded 1 observation unit' + +## Assays ## + +## Experimental assay? +exp_assay = Assay.new(title: 'Reconstituted system reference state', + description: 'The four purified enzymes were incubated in assay buffer and consumption of 3PG and production of F6P were measured in time, together with GAP and DHAP concentrations.') +exp_assay.contributor = $guest_person +exp_assay.policy = Policy.create(name: 'default policy', access_type: 1) +exp_assay.study = study +# exp_assay.observation_units = [observation_unit] # TODO ActiveRecord::HasManyThroughNestedAssociationsAreReadonly: Cannot modify association 'Assay#observation_units' because it goes through more than one other association. (ActiveRecord::HasManyThroughNestedAssociationsAreReadonly) +exp_assay.assay_class = AssayClass.experimental +exp_assay.organisms = [$organism] +exp_assay.save +puts "exp_assay: Seeded 1 #{exp_assay.assay_class.long_key.downcase}." + +# Modeling assay? +model_assay = Assay.new(title: 'Model reconstituted system', + description: 'Mathematical model for the reconstituted system with PGK, GAPDH, TPI and FBPAase.') +model_assay.contributor = $guest_person +model_assay.policy = Policy.create(name: 'default policy', access_type: 1) +model_assay.study = study +model_assay.assay_class = AssayClass.modelling +model_assay.save +puts "Seeded 1 #{model_assay.assay_class.long_key.downcase}." + +# Assay stream +assay_stream = Assay.new(title: 'Assay stream', + description: 'A stream of assays? This is a test assay stream for the example data.',) +assay_stream.contributor = $guest_person +assay_stream.policy = Policy.create(name: 'default policy', access_type: 1) +assay_stream.study = study +assay_stream.assay_class = AssayClass.assay_stream +assay_stream.save +puts "Seeded 1 assay stream #{model_assay.assay_class.long_key.downcase}." + +# Store references for other seed files +$investigation = investigation +$study = study +$observation_unit = observation_unit +$exp_assay = exp_assay +$model_assay = model_assay +$assay_stream = assay_stream \ No newline at end of file diff --git a/db/seeds/example_data/example_projects_and_basic_setup_seeds.rb b/db/seeds/example_data/example_projects_and_basic_setup_seeds.rb new file mode 100644 index 0000000000..d851f1174c --- /dev/null +++ b/db/seeds/example_data/example_projects_and_basic_setup_seeds.rb @@ -0,0 +1,32 @@ +# Project, Institution, Workgroup, Program, Strains, Organisms +program = Programme.where(title: 'Default Programme').first_or_create(web_page: 'http://www.seek4science.org', funding_details: 'Funding H2020X01Y001', description: 'This is a test programme for the SEEK sandbox.') +project = Project.where(title: 'Default Project').first_or_create(:programme_id => program.id, description: 'A description for the default project') # TODO this link is not working +institution = Institution.where(title: 'Default Institution').first_or_create(country: 'United Kingdom') +workgroup = WorkGroup.where(project_id: project.id, institution_id: institution.id).first_or_create + +# Create a strain +strain = Strain.where(title: 'Sulfolobus solfataricus strain 98/2').first_or_create +strain.projects = [project] +strain.policy = Policy.create(name: 'default policy', access_type: 1) +strain.organism = Organism.where(title: 'Sulfolobus solfataricus').first_or_create +strain.provider_name = 'BacDive' +strain.provider_id = '123456789' +strain.synonym = '98/2' +strain.comment = 'This is a test strain.' +strain.save! +puts 'Seeded 1 strain.' + +# Create an organism +organism = Organism.where(title: 'Sulfolobus solfataricus').first_or_create +organism.projects = [project] +organism.strains = [strain] +organism.save! +puts 'Seeded 1 organism.' + +# Store references for other seed files +$program = program +$project = project +$institution = institution +$workgroup = workgroup +$strain = strain +$organism = organism \ No newline at end of file diff --git a/db/seeds/example_data/example_publications_and_presentations_seeds.rb b/db/seeds/example_data/example_publications_and_presentations_seeds.rb new file mode 100644 index 0000000000..9f2feb119c --- /dev/null +++ b/db/seeds/example_data/example_publications_and_presentations_seeds.rb @@ -0,0 +1,85 @@ +# Publications, Presentations and Events + +# publication +publication = Publication.new( + publication_type_id: PublicationType.where(title:"Journal").first.id, + pubmed_id: '23865479', + title: 'Intermediate instability at high temperature leads to low pathway efficiency for an in vitro reconstituted system of gluconeogenesis in Sulfolobus solfataricus', + abstract: "Four enzymes of the gluconeogenic pathway in Sulfolobus solfataricus were purified and kinetically characterized. The enzymes were reconstituted in vitro to quantify the contribution of temperature instability of the pathway intermediates to carbon loss from the system. + The reconstituted system, consisting of phosphoglycerate kinase, glyceraldehyde 3-phosphate dehydrogenase, triose phosphate isomerase and the fructose 1,6-bisphosphate aldolase/phosphatase, maintained a constant consumption rate of 3-phosphoglycerate and production of + fructose 6-phosphate over a 1-h period. Cofactors ATP and NADPH were regenerated via pyruvate kinase and glucose dehydrogenase. A mathematical model was constructed on the basis of the kinetics of the purified enzymes and the measured half-life times of the pathway intermediates. + The model quantitatively predicted the system fluxes and metabolite concentrations. Relative enzyme concentrations were chosen such that half the carbon in the system was lost due to degradation of the thermolabile intermediates dihydroxyacetone phosphate, glyceraldehyde 3-phosphate + and 1,3-bisphosphoglycerate, indicating that intermediate instability at high temperature can significantly affect pathway efficiency.", + published_date: '2015', + journal: 'FEBS J' +) + +# Set contributor and projects +publication.contributor = $guest_person +publication.projects << $project + +# Build policy through the association +publication.build_policy(name: 'default policy', access_type: 1) +# Publication date +publication.published_date = Date.today.to_s +# Build publication authors +authors = [ + { first_name: 'T.', last_name: 'Kouril', author_index: 1 }, + { first_name: 'D.', last_name: 'Esser', author_index: 2 }, + { first_name: 'J.', last_name: 'Kort', author_index: 3 }, + { first_name: 'H. V.', last_name: 'Westerhoff', author_index: 4 }, + { first_name: 'B.', last_name: 'Siebers', author_index: 5 }, + { first_name: 'J.', last_name: 'Snoep', author_index: 6 } +] +# Citation +publication.citation = "Kouril, T. et al. Intermediate instability at high temperature leads to low pathway efficiency for an in vitro reconstituted system of gluconeogenesis in Sulfolobus solfataricus. FEBS J. 2015;687:100-108." + +authors.each do |author_attrs| + publication.publication_authors.build(author_attrs) +end + +# Save publication with all associations +disable_authorization_checks do + publication.save! # raises an error if something is invalid + publication.associate($exp_assay) + publication.associate($model_assay) +end + +# Create asset +AssetsCreator.create(asset_id: publication.id, creator_id: $guest_person.id, asset_type: publication.class.name) +puts 'Seeded 1 publication.' + +# Presentation +presentation = Presentation.new( + title: 'Intermediate instability at high temperature leads to low pathway efficiency for an in vitro reconstituted system of gluconeogenesis in Sulfolobus solfataricus', + description: "Four enzymes of the gluconeogenic pathway in Sulfolobus solfataricus were purified and kinetically characterized. The enzymes were reconstituted in vitro to quantify the contribution of temperature instability of the pathway intermediates to carbon loss from the system. + The reconstituted system, consisting of phosphoglycerate kinase, glyceraldehyde 3-phosphate dehydrogenase, triose phosphate isomerase and the fructose 1,6-bisphosphate aldolase/phosphatase, maintained a constant consumption rate of 3-phosphoglycerate and production of + ", +) +presentation.projects = [$project] +presentation.contributor = $guest_person +presentation.policy = Policy.create(name: 'default policy', access_type: 1) +presentation.content_blob = ContentBlob.new(original_filename: 'presentation.pptx', content_type: 'application/vnd.openxmlformats-officedocument.presentationml.presentation') +AssetsCreator.create(asset_id: presentation.id, creator_id: $guest_person.id, asset_type: presentation.class.name) +FileUtils.cp File.dirname(__FILE__) + '/' + presentation.content_blob.original_filename, presentation.content_blob.filepath # TODO results in "This version is not available" +presentation.version = 1 +presentation.save! +puts 'Seeded 1 presentation.' + +# Create an event +event = Event.new(title: 'Event for publication', description: 'Event for publication', start_date: Date.today, end_date: Date.today + 1.day) +event.projects = [$project] +event.contributor = $guest_person +event.policy = Policy.create(name: 'default policy', access_type: 1) +# event.website = 'http://www.seek4science.org' +event.city = 'London' +event.country = 'United Kingdom' +event.address = 'Dunmore Terrace 123' + +event.save! +puts 'Seeded 1 event.' + +# Store references for other seed files +$publication = publication +$presentation = presentation +$event = event \ No newline at end of file diff --git a/db/seeds/example_data/example_samples_seeds.rb b/db/seeds/example_data/example_samples_seeds.rb new file mode 100644 index 0000000000..053ba2be15 --- /dev/null +++ b/db/seeds/example_data/example_samples_seeds.rb @@ -0,0 +1,230 @@ +# Sample Types and Samples + +# First, we need to create sample attribute types +string_attr_type = SampleAttributeType.where(title: 'String').first_or_create(base_type: 'String') +float_attr_type = SampleAttributeType.where(title: 'Real number').first_or_create(base_type: 'Float') +integer_attr_type = SampleAttributeType.where(title: 'Integer').first_or_create(base_type: 'Integer') +boolean_attr_type = SampleAttributeType.where(title: 'Boolean').first_or_create(base_type: 'Boolean') + +# Create a sample type for bacterial culture samples +culture_sample_type = SampleType.new( + title: 'Bacterial Culture', + description: 'Sample type for bacterial culture experiments related to thermophile studies' +) +culture_sample_type.projects = [$project] +culture_sample_type.contributor = $guest_person +culture_sample_type.policy = Policy.create(name: 'default policy', access_type: 1) + +# Add attributes to the sample type +culture_sample_type.sample_attributes.build( + title: 'Culture Name', + sample_attribute_type: string_attr_type, + required: true, + is_title: true +) + +culture_sample_type.sample_attributes.build( + title: 'Strain Used', + sample_attribute_type: string_attr_type, + required: true, + description: 'The bacterial strain used for this culture' +) + +culture_sample_type.sample_attributes.build( + title: 'Growth Temperature (°C)', + sample_attribute_type: float_attr_type, + required: true, + description: 'Temperature at which the culture was grown' +) + +culture_sample_type.sample_attributes.build( + title: 'Culture Volume (mL)', + sample_attribute_type: float_attr_type, + required: false, + description: 'Volume of the bacterial culture' +) + +culture_sample_type.sample_attributes.build( + title: 'pH', + sample_attribute_type: float_attr_type, + required: false, + description: 'pH of the culture medium' +) + +culture_sample_type.sample_attributes.build( + title: 'Growth Phase Complete', + sample_attribute_type: boolean_attr_type, + required: false, + description: 'Whether the culture has reached stationary phase' +) + +disable_authorization_checks { culture_sample_type.save! } +culture_sample_type.annotate_with(['bacterial culture', 'thermophile', 'microbiology'], 'tag', $guest_person) +puts 'Seeded bacterial culture sample type.' + +# Create a sample type for enzyme preparations +enzyme_sample_type = SampleType.new( + title: 'Enzyme Preparation', + description: 'Sample type for purified enzyme preparations used in reconstituted systems' +) +enzyme_sample_type.projects = [$project] +enzyme_sample_type.contributor = $guest_person +enzyme_sample_type.policy = Policy.create(name: 'default policy', access_type: 1) + +enzyme_sample_type.sample_attributes.build( + title: 'Enzyme Name', + sample_attribute_type: string_attr_type, + required: true, + is_title: true +) + +enzyme_sample_type.sample_attributes.build( + title: 'EC Number', + sample_attribute_type: string_attr_type, + required: false, + description: 'Enzyme Commission number' +) + +enzyme_sample_type.sample_attributes.build( + title: 'Concentration (mg/mL)', + sample_attribute_type: float_attr_type, + required: true, + description: 'Protein concentration of the enzyme preparation' +) + +enzyme_sample_type.sample_attributes.build( + title: 'Specific Activity (U/mg)', + sample_attribute_type: float_attr_type, + required: false, + description: 'Specific enzymatic activity' +) + +enzyme_sample_type.sample_attributes.build( + title: 'Storage Temperature (°C)', + sample_attribute_type: integer_attr_type, + required: false, + description: 'Temperature for enzyme storage' +) + +enzyme_sample_type.sample_attributes.build( + title: 'Purification Steps', + sample_attribute_type: integer_attr_type, + required: false, + description: 'Number of purification steps performed' +) + +disable_authorization_checks { enzyme_sample_type.save! } +enzyme_sample_type.annotate_with(['enzyme', 'protein', 'purification'], 'tag', $guest_person) +puts 'Seeded enzyme preparation sample type.' + +# Now create actual samples + +# Bacterial culture samples +culture1 = Sample.new(title: 'S. solfataricus Culture #1') +culture1.sample_type = culture_sample_type +culture1.projects = [$project] +culture1.contributor = $guest_person +culture1.policy = Policy.create(name: 'default policy', access_type: 1) +culture1.set_attribute_value('Culture Name', 'S. solfataricus Culture #1') +culture1.set_attribute_value('Strain Used', 'Sulfolobus solfataricus strain 98/2') +culture1.set_attribute_value('Growth Temperature (°C)', 80.0) +culture1.set_attribute_value('Culture Volume (mL)', 500.0) +culture1.set_attribute_value('pH', 2.5) +culture1.set_attribute_value('Growth Phase Complete', true) +disable_authorization_checks { culture1.save! } +puts 'Seeded bacterial culture sample 1.' + +culture2 = Sample.new(title: 'S. solfataricus Culture #2') +culture2.sample_type = culture_sample_type +culture2.projects = [$project] +culture2.contributor = $guest_person +culture2.policy = Policy.create(name: 'default policy', access_type: 1) +culture2.set_attribute_value('Culture Name', 'S. solfataricus Culture #2') +culture2.set_attribute_value('Strain Used', 'Sulfolobus solfataricus strain 98/2') +culture2.set_attribute_value('Growth Temperature (°C)', 75.0) +culture2.set_attribute_value('Culture Volume (mL)', 1000.0) +culture2.set_attribute_value('pH', 2.8) +culture2.set_attribute_value('Growth Phase Complete', false) +disable_authorization_checks { culture2.save! } +puts 'Seeded bacterial culture sample 2.' + +# Enzyme samples +enzyme1 = Sample.new(title: 'Phosphoglycerate Kinase') +enzyme1.sample_type = enzyme_sample_type +enzyme1.projects = [$project] +enzyme1.contributor = $guest_person +enzyme1.policy = Policy.create(name: 'default policy', access_type: 1) +enzyme1.set_attribute_value('Enzyme Name', 'Phosphoglycerate Kinase') +enzyme1.set_attribute_value('EC Number', 'EC 2.7.2.3') +enzyme1.set_attribute_value('Concentration (mg/mL)', 2.5) +enzyme1.set_attribute_value('Specific Activity (U/mg)', 125.0) +enzyme1.set_attribute_value('Storage Temperature (°C)', -20) +enzyme1.set_attribute_value('Purification Steps', 4) +disable_authorization_checks { enzyme1.save! } +puts 'Seeded enzyme sample 1.' + +enzyme2 = Sample.new(title: 'Glyceraldehyde-3-phosphate Dehydrogenase') +enzyme2.sample_type = enzyme_sample_type +enzyme2.projects = [$project] +enzyme2.contributor = $guest_person +enzyme2.policy = Policy.create(name: 'default policy', access_type: 1) +enzyme2.set_attribute_value('Enzyme Name', 'Glyceraldehyde-3-phosphate Dehydrogenase') +enzyme2.set_attribute_value('EC Number', 'EC 1.2.1.12') +enzyme2.set_attribute_value('Concentration (mg/mL)', 1.8) +enzyme2.set_attribute_value('Specific Activity (U/mg)', 89.3) +enzyme2.set_attribute_value('Storage Temperature (°C)', -20) +enzyme2.set_attribute_value('Purification Steps', 3) +disable_authorization_checks { enzyme2.save! } +puts 'Seeded enzyme sample 2.' + +enzyme3 = Sample.new(title: 'Triose Phosphate Isomerase') +enzyme3.sample_type = enzyme_sample_type +enzyme3.projects = [$project] +enzyme3.contributor = $guest_person +enzyme3.policy = Policy.create(name: 'default policy', access_type: 1) +enzyme3.set_attribute_value('Enzyme Name', 'Triose Phosphate Isomerase') +enzyme3.set_attribute_value('EC Number', 'EC 5.3.1.1') +enzyme3.set_attribute_value('Concentration (mg/mL)', 3.2) +enzyme3.set_attribute_value('Specific Activity (U/mg)', 210.5) +enzyme3.set_attribute_value('Storage Temperature (°C)', -20) +enzyme3.set_attribute_value('Purification Steps', 2) +disable_authorization_checks { enzyme3.save! } +puts 'Seeded enzyme sample 3.' + +enzyme4 = Sample.new(title: 'Fructose-1,6-bisphosphate Aldolase/Phosphatase') +enzyme4.sample_type = enzyme_sample_type +enzyme4.projects = [$project] +enzyme4.contributor = $guest_person +enzyme4.policy = Policy.create(name: 'default policy', access_type: 1) +enzyme4.set_attribute_value('Enzyme Name', 'Fructose-1,6-bisphosphate Aldolase/Phosphatase') +enzyme4.set_attribute_value('EC Number', 'EC 4.1.2.13') +enzyme4.set_attribute_value('Concentration (mg/mL)', 1.5) +enzyme4.set_attribute_value('Specific Activity (U/mg)', 67.8) +enzyme4.set_attribute_value('Storage Temperature (°C)', -20) +enzyme4.set_attribute_value('Purification Steps', 5) +disable_authorization_checks { enzyme4.save! } +puts 'Seeded enzyme sample 4.' + +# Associate samples with the experimental assay +disable_authorization_checks do + $exp_assay.samples = [culture1, culture2, enzyme1, enzyme2, enzyme3, enzyme4] + $exp_assay.save! +end + +# Associate sample types with the study +disable_authorization_checks do + $study.sample_types = [culture_sample_type, enzyme_sample_type] + $study.save! +end + +# Store references for other seed files +$culture_sample_type = culture_sample_type +$enzyme_sample_type = enzyme_sample_type +$culture1 = culture1 +$culture2 = culture2 +$enzyme1 = enzyme1 +$enzyme2 = enzyme2 +$enzyme3 = enzyme3 +$enzyme4 = enzyme4 + +puts 'Seeded sample types and samples - 2 sample types with 6 total samples.' \ No newline at end of file diff --git a/db/seeds/example_data/example_users_seeds.rb b/db/seeds/example_data/example_users_seeds.rb new file mode 100644 index 0000000000..806d107f34 --- /dev/null +++ b/db/seeds/example_data/example_users_seeds.rb @@ -0,0 +1,59 @@ +# Create an admin and a guest user + +# Admin +admin_user = User.where(login: 'admin').first_or_create( + login: 'admin', + email: 'admin@test1000.com', + password: 'adminadmin', password_confirmation: 'adminadmin' +) + +admin_user.activate +# TODO, check if admin really has access to the admin environment +admin_user.build_person(first_name: 'Admin', last_name: 'User', email: 'admin@test1000.com') unless admin_user.person +admin_user.save! +admin_user.person.work_groups << $workgroup +admin_person = admin_user.person +admin_person.save +puts 'Seeded 1 admin.' + +## Guest +guest_user = User.where(login: 'guest').first_or_create( + login: 'guest', + email: 'guest@test1000.com', + password: 'guestguest', password_confirmation: 'guestguest' +) +guest_user.activate +guest_user.build_person(first_name: 'Guest', last_name: 'User', email: 'guest@example.com') unless guest_user.person +guest_user.save! +guest_user.person.work_groups << $workgroup +guest_person = guest_user.person +guest_person.save +puts 'Seeded 1 guest.' + +# Update project +disable_authorization_checks do + $project.description = 'This is a test project for the SEEK sandbox.' + $project.web_page = 'http://www.seek4science.org' + $project.pals = [guest_person] + $project.save! + puts 'Seeded 1 project.' +end + +# Update institution +disable_authorization_checks do + $institution.country = 'United Kingdom' + $institution.city = 'Manchester' # Overridden by ROR + $institution.web_page = 'http://www.seek4science.org' # Overridden by ROR + # $institution.ror_id = '027m9bs27' # Only works with active internet connection + $institution.address = '10 Downing Street' # Stays the same + $institution.department = 'Department of SEEK for Science' + # Logo? + $institution.save! + puts 'Seeded 1 institution.' +end + +# Store references for other seed files +$admin_user = admin_user +$admin_person = admin_person +$guest_user = guest_user +$guest_person = guest_person \ No newline at end of file diff --git a/db/seeds/example_data/presentation.pptx b/db/seeds/example_data/presentation.pptx new file mode 100644 index 0000000000000000000000000000000000000000..108dd474af2f3464a2d48a60de40bc570f2c7695 GIT binary patch literal 34698 zcmeFZW0WP$wk}+@ZQFJix@_CF?dmSuwryKowr$&0UH+=yeeb#ZeES_^pZoWmyT(|V z85y~Lju+%w3SYYrvSsgJU z_&GMtpSD-$88AN$|12NLpy2>U9uz%uQm*k0l}j^^;ko zEPD+P8Dxi;)QQRylnANru(#5H4^rZ3Ml^&6vnCw6iP{ zW8NlW?iuks64{Ix!Rdt?sAtm=*|Wn9GvNFwK5X6OVsr(hv!T?}E83~oId|%5q{!-U zfJO6jui{tVYqgX!eCp&kqqggqlUc!{pkOIgJSNt!_G3(`$^+tQch^3}l&cQU6V~r< z{pT@hrPNrFJse%`eCe)2XPw}%E6?mdjD&5|K0zD0zp(uI2@D|jpHOc0+bI|Lt7rEM z#L!(>*F-yH_Thwkg_-M@pO!@2_ zV6sqf3HozdIu+SwLUe-eHH_ikZ`6BxaIOl*JqUtZp<=yGoCrDh9i%!VO15gqTg%R{ zQ+=3nQW*voDa14#LG!)|z2Iwd8L$jfIEyueluD5|8Kch_oQ9&NpWnUeoC7?yXHBO~BBnYm`WX;#b(qRU(0QujVQ#s*+&j916gE9 zjGL6G%`_88Vw5k5Cp-j|q`fOaTGho7_hy-pKQILzpG4`Li}76g*P`uA@?Ur+&ai-q8N=)0B#THIjJZfs|7xFd!GQuU*d(|h zJNo_m%~#jUrS?q2Rx;2^jqff$e)`EwR&C=Rp84|$7pV10Jn$8(xuTfaSGLgC{^NZO zGkdh@(aDLv*zK@7ad(a&#z>l*Mi!&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=T9iZ6 Date: Wed, 17 Sep 2025 09:16:13 +0200 Subject: [PATCH 5/5] Refactor sample attributes and update seed data Updated sample attribute titles and added descriptions for clarity. Adjusted attribute values in seeded data to match new titles. added a pid example and units --- .../example_data/example_samples_seeds.rb | 55 +++++++++++-------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/db/seeds/example_data/example_samples_seeds.rb b/db/seeds/example_data/example_samples_seeds.rb index 053ba2be15..49fe8f8f9d 100644 --- a/db/seeds/example_data/example_samples_seeds.rb +++ b/db/seeds/example_data/example_samples_seeds.rb @@ -20,7 +20,8 @@ title: 'Culture Name', sample_attribute_type: string_attr_type, required: true, - is_title: true + is_title: true, + description: 'A unique name for the bacterial culture' ) culture_sample_type.sample_attributes.build( @@ -31,15 +32,17 @@ ) culture_sample_type.sample_attributes.build( - title: 'Growth Temperature (°C)', + title: 'Growth Temperature', sample_attribute_type: float_attr_type, + unit: Unit.find_by_symbol('°C'), required: true, description: 'Temperature at which the culture was grown' ) culture_sample_type.sample_attributes.build( - title: 'Culture Volume (mL)', + title: 'Culture Volume', sample_attribute_type: float_attr_type, + unit: Unit.find_by_symbol('mL'), required: false, description: 'Volume of the bacterial culture' ) @@ -82,26 +85,30 @@ title: 'EC Number', sample_attribute_type: string_attr_type, required: false, - description: 'Enzyme Commission number' + description: 'Enzyme Commission number', + pid: 'http://purl.uniprot.org/core/enzyme' ) enzyme_sample_type.sample_attributes.build( - title: 'Concentration (mg/mL)', + title: 'Concentration', sample_attribute_type: float_attr_type, + unit: Unit.find_by_symbol('mg/mL'), required: true, description: 'Protein concentration of the enzyme preparation' ) enzyme_sample_type.sample_attributes.build( - title: 'Specific Activity (U/mg)', + title: 'Specific Activity', sample_attribute_type: float_attr_type, + unit: Unit.find_by_symbol('U/mg'), required: false, description: 'Specific enzymatic activity' ) enzyme_sample_type.sample_attributes.build( - title: 'Storage Temperature (°C)', + title: 'Storage Temperature', sample_attribute_type: integer_attr_type, + unit: Unit.find_by_symbol('°C'), required: false, description: 'Temperature for enzyme storage' ) @@ -127,8 +134,8 @@ culture1.policy = Policy.create(name: 'default policy', access_type: 1) culture1.set_attribute_value('Culture Name', 'S. solfataricus Culture #1') culture1.set_attribute_value('Strain Used', 'Sulfolobus solfataricus strain 98/2') -culture1.set_attribute_value('Growth Temperature (°C)', 80.0) -culture1.set_attribute_value('Culture Volume (mL)', 500.0) +culture1.set_attribute_value('Growth Temperature', 80.0) +culture1.set_attribute_value('Culture Volume', 500.0) culture1.set_attribute_value('pH', 2.5) culture1.set_attribute_value('Growth Phase Complete', true) disable_authorization_checks { culture1.save! } @@ -141,8 +148,8 @@ culture2.policy = Policy.create(name: 'default policy', access_type: 1) culture2.set_attribute_value('Culture Name', 'S. solfataricus Culture #2') culture2.set_attribute_value('Strain Used', 'Sulfolobus solfataricus strain 98/2') -culture2.set_attribute_value('Growth Temperature (°C)', 75.0) -culture2.set_attribute_value('Culture Volume (mL)', 1000.0) +culture2.set_attribute_value('Growth Temperature', 75.0) +culture2.set_attribute_value('Culture Volume', 1000.0) culture2.set_attribute_value('pH', 2.8) culture2.set_attribute_value('Growth Phase Complete', false) disable_authorization_checks { culture2.save! } @@ -156,9 +163,9 @@ enzyme1.policy = Policy.create(name: 'default policy', access_type: 1) enzyme1.set_attribute_value('Enzyme Name', 'Phosphoglycerate Kinase') enzyme1.set_attribute_value('EC Number', 'EC 2.7.2.3') -enzyme1.set_attribute_value('Concentration (mg/mL)', 2.5) -enzyme1.set_attribute_value('Specific Activity (U/mg)', 125.0) -enzyme1.set_attribute_value('Storage Temperature (°C)', -20) +enzyme1.set_attribute_value('Concentration', 2.5) +enzyme1.set_attribute_value('Specific Activity', 125.0) +enzyme1.set_attribute_value('Storage Temperature', -20) enzyme1.set_attribute_value('Purification Steps', 4) disable_authorization_checks { enzyme1.save! } puts 'Seeded enzyme sample 1.' @@ -170,9 +177,9 @@ enzyme2.policy = Policy.create(name: 'default policy', access_type: 1) enzyme2.set_attribute_value('Enzyme Name', 'Glyceraldehyde-3-phosphate Dehydrogenase') enzyme2.set_attribute_value('EC Number', 'EC 1.2.1.12') -enzyme2.set_attribute_value('Concentration (mg/mL)', 1.8) -enzyme2.set_attribute_value('Specific Activity (U/mg)', 89.3) -enzyme2.set_attribute_value('Storage Temperature (°C)', -20) +enzyme2.set_attribute_value('Concentration', 1.8) +enzyme2.set_attribute_value('Specific Activity', 89.3) +enzyme2.set_attribute_value('Storage Temperature', -20) enzyme2.set_attribute_value('Purification Steps', 3) disable_authorization_checks { enzyme2.save! } puts 'Seeded enzyme sample 2.' @@ -184,9 +191,9 @@ enzyme3.policy = Policy.create(name: 'default policy', access_type: 1) enzyme3.set_attribute_value('Enzyme Name', 'Triose Phosphate Isomerase') enzyme3.set_attribute_value('EC Number', 'EC 5.3.1.1') -enzyme3.set_attribute_value('Concentration (mg/mL)', 3.2) -enzyme3.set_attribute_value('Specific Activity (U/mg)', 210.5) -enzyme3.set_attribute_value('Storage Temperature (°C)', -20) +enzyme3.set_attribute_value('Concentration', 3.2) +enzyme3.set_attribute_value('Specific Activity', 210.5) +enzyme3.set_attribute_value('Storage Temperature', -20) enzyme3.set_attribute_value('Purification Steps', 2) disable_authorization_checks { enzyme3.save! } puts 'Seeded enzyme sample 3.' @@ -198,9 +205,9 @@ enzyme4.policy = Policy.create(name: 'default policy', access_type: 1) enzyme4.set_attribute_value('Enzyme Name', 'Fructose-1,6-bisphosphate Aldolase/Phosphatase') enzyme4.set_attribute_value('EC Number', 'EC 4.1.2.13') -enzyme4.set_attribute_value('Concentration (mg/mL)', 1.5) -enzyme4.set_attribute_value('Specific Activity (U/mg)', 67.8) -enzyme4.set_attribute_value('Storage Temperature (°C)', -20) +enzyme4.set_attribute_value('Concentration', 1.5) +enzyme4.set_attribute_value('Specific Activity', 67.8) +enzyme4.set_attribute_value('Storage Temperature', -20) enzyme4.set_attribute_value('Purification Steps', 5) disable_authorization_checks { enzyme4.save! } puts 'Seeded enzyme sample 4.' @@ -227,4 +234,4 @@ $enzyme3 = enzyme3 $enzyme4 = enzyme4 -puts 'Seeded sample types and samples - 2 sample types with 6 total samples.' \ No newline at end of file +puts 'Seeded sample types and samples - 2 sample types with 6 total samples.'