From 698ad57140a5b1e4bf110fb694c5726a290629b1 Mon Sep 17 00:00:00 2001 From: Stuart Owen Date: Mon, 16 Dec 2024 15:48:33 +0000 Subject: [PATCH] rename Isa -> ISA --- app/controllers/assays_controller.rb | 2 +- app/controllers/collections_controller.rb | 2 +- app/controllers/data_files_controller.rb | 2 +- app/controllers/documents_controller.rb | 2 +- app/controllers/file_templates_controller.rb | 2 +- app/controllers/investigations_controller.rb | 6 +-- app/controllers/isa_assays_controller.rb | 10 ++--- app/controllers/isa_studies_controller.rb | 8 ++-- app/controllers/models_controller.rb | 2 +- .../observation_units_controller.rb | 2 +- app/controllers/presentations_controller.rb | 2 +- app/controllers/programmes_controller.rb | 2 +- app/controllers/projects_controller.rb | 2 +- app/controllers/publications_controller.rb | 2 +- app/controllers/samples_controller.rb | 2 +- app/controllers/sops_controller.rb | 2 +- app/controllers/studies_controller.rb | 2 +- app/controllers/templates_controller.rb | 2 +- app/controllers/workflows_controller.rb | 2 +- app/forms/isa_assay.rb | 2 +- app/forms/isa_study.rb | 2 +- app/helpers/isa_helper.rb | 2 +- app/helpers/isa_tab_converter.rb | 2 +- app/jobs/populate_templates_job.rb | 2 +- app/models/application_record.rb | 2 +- app/models/isa_tag.rb | 38 +++++++++---------- app/models/template.rb | 28 +++++++------- app/views/assays/show.html.erb | 2 +- app/views/general/_isa_graph.html.erb | 2 +- app/views/homes/isa_colours.html.erb | 2 +- .../_sample_attribute_form.html.erb | 2 +- .../_template_attribute_form.html.erb | 2 +- config/initializers/inflections.rb | 1 + db/seeds/015_isa_tags.seeds.rb | 20 +++++----- ...017_minimal_starter_isa_templates.seeds.rb | 28 +++++++------- lib/isa_exporter.rb | 2 +- lib/seek/acts_as_asset.rb | 4 +- lib/seek/acts_as_asset/isa.rb | 2 +- lib/seek/acts_as_isa.rb | 12 +++--- lib/seek/acts_as_isa/relationships.rb | 2 +- lib/seek/isa/tag_type.rb | 2 +- lib/seek/isa_graph_extensions.rb | 4 +- lib/seek/isa_graph_generator.rb | 8 ++-- lib/seek/isa_templates/template_extractor.rb | 6 +-- lib/tasks/populate_templates.rake | 2 +- test/factories/isa_tags.rb | 22 +++++------ test/functional/isa_assays_controller_test.rb | 2 +- .../functional/isa_studies_controller_test.rb | 2 +- test/unit/investigation_test.rb | 2 +- test/unit/isa_exporter_test.rb | 4 +- test/unit/isa_graph_generator_test.rb | 14 +++---- 51 files changed, 142 insertions(+), 141 deletions(-) diff --git a/app/controllers/assays_controller.rb b/app/controllers/assays_controller.rb index af6ff39228..21a2b1af9a 100644 --- a/app/controllers/assays_controller.rb +++ b/app/controllers/assays_controller.rb @@ -23,7 +23,7 @@ class AssaysController < ApplicationController include Seek::Publishing::PublishingCommon - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/collections_controller.rb b/app/controllers/collections_controller.rb index 369cf3d7f8..76d21ce8de 100644 --- a/app/controllers/collections_controller.rb +++ b/app/controllers/collections_controller.rb @@ -8,7 +8,7 @@ class CollectionsController < ApplicationController include Seek::Publishing::PublishingCommon - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/data_files_controller.rb b/app/controllers/data_files_controller.rb index 5de397f4b6..dc45ae16c4 100644 --- a/app/controllers/data_files_controller.rb +++ b/app/controllers/data_files_controller.rb @@ -30,7 +30,7 @@ class DataFilesController < ApplicationController include Seek::Doi::Minting - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 363e69d59f..7a3f232848 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -13,7 +13,7 @@ class DocumentsController < ApplicationController include Seek::Doi::Minting - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/file_templates_controller.rb b/app/controllers/file_templates_controller.rb index a9876a72f6..43369db181 100644 --- a/app/controllers/file_templates_controller.rb +++ b/app/controllers/file_templates_controller.rb @@ -18,7 +18,7 @@ class FileTemplatesController < ApplicationController include Seek::Doi::Minting - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/investigations_controller.rb b/app/controllers/investigations_controller.rb index 78a291df50..d5fe63098d 100644 --- a/app/controllers/investigations_controller.rb +++ b/app/controllers/investigations_controller.rb @@ -19,7 +19,7 @@ class InvestigationsController < ApplicationController include Seek::AnnotationCommon - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy @@ -60,12 +60,12 @@ def submit_fairdata_station end def export_isatab_json - the_hash = IsaTabConverter.convert_investigation(Investigation.find(params[:id])) + the_hash = ISATabConverter.convert_investigation(Investigation.find(params[:id])) send_data JSON.pretty_generate(the_hash) , filename: 'isatab.json' end def export_isa - isa = IsaExporter::Exporter.new(Investigation.find(params[:id]), current_user).export + isa = ISAExporter::Exporter.new(Investigation.find(params[:id]), current_user).export send_data isa, filename: 'isa.json', type: 'application/json', deposition: 'attachment' rescue Exception => e respond_to do |format| diff --git a/app/controllers/isa_assays_controller.rb b/app/controllers/isa_assays_controller.rb index a7bfb214a3..00c21ef677 100644 --- a/app/controllers/isa_assays_controller.rb +++ b/app/controllers/isa_assays_controller.rb @@ -1,4 +1,4 @@ -class IsaAssaysController < ApplicationController +class ISAAssaysController < ApplicationController include Seek::AssetsCommon include Seek::Publishing::PublishingCommon @@ -29,12 +29,12 @@ def new @isa_assay = if params[:is_assay_stream] - IsaAssay.new({ assay: { assay_class_id: AssayClass.assay_stream.id, + ISAAssay.new({ assay: { assay_class_id: AssayClass.assay_stream.id, study_id: study.id, position: new_position }, input_sample_type_id: }) else - IsaAssay.new({ assay: { assay_class_id: AssayClass.experimental.id, + ISAAssay.new({ assay: { assay_class_id: AssayClass.experimental.id, assay_stream_id: params[:assay_stream_id], study_id: study.id, position: new_position }, @@ -118,7 +118,7 @@ def rearrange_assay_positions_create_isa_assay end def initialize_isa_assay - @isa_assay = IsaAssay.new(isa_assay_params) + @isa_assay = ISAAssay.new(isa_assay_params) update_sharing_policies @isa_assay.assay @isa_assay.assay.contributor = current_person @isa_assay.sample_type.contributor = User.current_user.person if isa_assay_params[:sample_type] @@ -199,7 +199,7 @@ def set_up_instance_variable end def find_requested_item - @isa_assay = IsaAssay.new + @isa_assay = ISAAssay.new @isa_assay.populate(params[:id]) if @isa_assay.assay.nil? diff --git a/app/controllers/isa_studies_controller.rb b/app/controllers/isa_studies_controller.rb index e2b9c5c151..72d8b44b20 100644 --- a/app/controllers/isa_studies_controller.rb +++ b/app/controllers/isa_studies_controller.rb @@ -1,4 +1,4 @@ -class IsaStudiesController < ApplicationController +class ISAStudiesController < ApplicationController include Seek::AssetsCommon include Seek::Publishing::PublishingCommon @@ -6,11 +6,11 @@ class IsaStudiesController < ApplicationController before_action :find_requested_item, only: %i[edit update] def new - @isa_study = IsaStudy.new({ study: { investigation_id: params[:investigation_id] } }) + @isa_study = ISAStudy.new({ study: { investigation_id: params[:investigation_id] } }) end def create - @isa_study = IsaStudy.new(isa_study_params) + @isa_study = ISAStudy.new(isa_study_params) update_sharing_policies @isa_study.study @isa_study.source.policy = @isa_study.study.policy @isa_study.sample_collection.policy = @isa_study.study.policy @@ -129,7 +129,7 @@ def set_up_instance_variable end def find_requested_item - @isa_study = IsaStudy.new + @isa_study = ISAStudy.new @isa_study.populate(params[:id]) @isa_study.errors.add(:study, "The #{t('isa_study')} was not found.") if @isa_study.study.nil? diff --git a/app/controllers/models_controller.rb b/app/controllers/models_controller.rb index 76f83a13c3..ebfa52f9d5 100644 --- a/app/controllers/models_controller.rb +++ b/app/controllers/models_controller.rb @@ -18,7 +18,7 @@ class ModelsController < ApplicationController include Bives include Seek::Doi::Minting - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/observation_units_controller.rb b/app/controllers/observation_units_controller.rb index 52e43dff41..107133511f 100644 --- a/app/controllers/observation_units_controller.rb +++ b/app/controllers/observation_units_controller.rb @@ -11,7 +11,7 @@ class ObservationUnitsController < ApplicationController before_action :find_assets, only: [:index] include Seek::Publishing::PublishingCommon - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/presentations_controller.rb b/app/controllers/presentations_controller.rb index 5938f8946f..4270b62acb 100644 --- a/app/controllers/presentations_controller.rb +++ b/app/controllers/presentations_controller.rb @@ -12,7 +12,7 @@ class PresentationsController < ApplicationController include Seek::Publishing::PublishingCommon - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/programmes_controller.rb b/app/controllers/programmes_controller.rb index 745f29d4ac..5a9f524a2b 100644 --- a/app/controllers/programmes_controller.rb +++ b/app/controllers/programmes_controller.rb @@ -14,7 +14,7 @@ class ProgrammesController < ApplicationController skip_before_action :project_membership_required - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions respond_to :html, :json diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index de061dd517..6434daa1df 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -47,7 +47,7 @@ class ProjectsController < ApplicationController cache_sweeper :projects_sweeper, only: %i[update create destroy] - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions respond_to :html, :json diff --git a/app/controllers/publications_controller.rb b/app/controllers/publications_controller.rb index 2a3e9970ed..707fe727bc 100644 --- a/app/controllers/publications_controller.rb +++ b/app/controllers/publications_controller.rb @@ -13,7 +13,7 @@ class PublicationsController < ApplicationController before_action :suggest_authors, only: [:manage] before_action :find_display_asset, :only=>[:show, :download] - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions include PublicationsHelper api_actions :index, :show diff --git a/app/controllers/samples_controller.rb b/app/controllers/samples_controller.rb index e71fa98022..73d769c239 100644 --- a/app/controllers/samples_controller.rb +++ b/app/controllers/samples_controller.rb @@ -13,7 +13,7 @@ class SamplesController < ApplicationController before_action :auth_to_create, only: %i[new create batch_create] - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions include Seek::Publishing::PublishingCommon api_actions :index, :show, :create, :update, :destroy, :batch_create diff --git a/app/controllers/sops_controller.rb b/app/controllers/sops_controller.rb index e6e0e803c5..bdca4425b7 100644 --- a/app/controllers/sops_controller.rb +++ b/app/controllers/sops_controller.rb @@ -14,7 +14,7 @@ class SopsController < ApplicationController include Seek::Doi::Minting - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/studies_controller.rb b/app/controllers/studies_controller.rb index a588dc699f..067c2828fa 100644 --- a/app/controllers/studies_controller.rb +++ b/app/controllers/studies_controller.rb @@ -18,7 +18,7 @@ class StudiesController < ApplicationController include Seek::Publishing::PublishingCommon include Seek::AnnotationCommon - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions api_actions :index, :show, :create, :update, :destroy diff --git a/app/controllers/templates_controller.rb b/app/controllers/templates_controller.rb index 821b8082b6..3228799377 100644 --- a/app/controllers/templates_controller.rb +++ b/app/controllers/templates_controller.rb @@ -124,7 +124,7 @@ def template_attributes def filter_isa_tags_by_level level = params[:level] - all_isa_tags_options = IsaTag.all.map { |it| { text: it.title, value: it.id } } + all_isa_tags_options = ISATag.all.map { |it| { text: it.title, value: it.id } } case level when 'study source' diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 1ad621f5c2..483b84b6e1 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -17,7 +17,7 @@ class WorkflowsController < ApplicationController include Seek::Publishing::PublishingCommon include Seek::Doi::Minting - include Seek::IsaGraphExtensions + include Seek::ISAGraphExtensions include RoCrateHandling include Legacy::WorkflowSupport diff --git a/app/forms/isa_assay.rb b/app/forms/isa_assay.rb index 7e90b8751f..c977e9ff4f 100644 --- a/app/forms/isa_assay.rb +++ b/app/forms/isa_assay.rb @@ -1,4 +1,4 @@ -class IsaAssay +class ISAAssay include ActiveModel::Model attr_accessor :assay, :sample_type, :input_sample_type_id diff --git a/app/forms/isa_study.rb b/app/forms/isa_study.rb index 906c382a82..2739fcb0ed 100644 --- a/app/forms/isa_study.rb +++ b/app/forms/isa_study.rb @@ -1,4 +1,4 @@ -class IsaStudy +class ISAStudy include ActiveModel::Model attr_accessor :study, :source_sample_type, :sample_collection_sample_type diff --git a/app/helpers/isa_helper.rb b/app/helpers/isa_helper.rb index 2b932965de..8a650c4536 100644 --- a/app/helpers/isa_helper.rb +++ b/app/helpers/isa_helper.rb @@ -1,6 +1,6 @@ require 'tempfile' -module IsaHelper +module ISAHelper OLD_FILL_COLOURS = { 'Sop' => '#7AC5CD', # cadetblue3 'Model' => '#CDCD00', # yellow3 diff --git a/app/helpers/isa_tab_converter.rb b/app/helpers/isa_tab_converter.rb index 1be450be05..777f8b1e20 100644 --- a/app/helpers/isa_tab_converter.rb +++ b/app/helpers/isa_tab_converter.rb @@ -1,5 +1,5 @@ # noinspection ALL -class IsaTabConverter +class ISATabConverter include Seek::Util.routes JERM_ONTOLOGY_URL = 'http://jermontology.org/ontology/JERMOntology' diff --git a/app/jobs/populate_templates_job.rb b/app/jobs/populate_templates_job.rb index e9b8afc086..c1827711f3 100644 --- a/app/jobs/populate_templates_job.rb +++ b/app/jobs/populate_templates_job.rb @@ -5,6 +5,6 @@ class PopulateTemplatesJob < ApplicationJob def perform return unless Seek::Config.isa_json_compliance_enabled - Seek::IsaTemplates::TemplateExtractor.extract_templates + Seek::ISATemplates::TemplateExtractor.extract_templates end end diff --git a/app/models/application_record.rb b/app/models/application_record.rb index c7fc21bb00..488f83cc7e 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -14,7 +14,7 @@ class ApplicationRecord < ActiveRecord::Base include Seek::GroupedPagination include Seek::TitleTrimmer include Seek::ActsAsAsset - include Seek::ActsAsIsa + include Seek::ActsAsISA include HasExtendedMetadata include Seek::Doi::ActsAsDoiMintable include Seek::Doi::ActsAsDoiParent diff --git a/app/models/isa_tag.rb b/app/models/isa_tag.rb index 49c8e94617..70145e2c79 100644 --- a/app/models/isa_tag.rb +++ b/app/models/isa_tag.rb @@ -1,63 +1,63 @@ -class IsaTag < ApplicationRecord +class ISATag < ApplicationRecord validates :title, presence: true - has_many :template_attributes, inverse_of: :isa_tag - has_many :sample_attributes, inverse_of: :isa_tag + has_many :template_attributes, inverse_of: :ISATag + has_many :sample_attributes, inverse_of: :ISATag def isa_source? - title == Seek::Isa::TagType::SOURCE + title == Seek::ISA::TagType::SOURCE end def isa_source_characteristic? - title == Seek::Isa::TagType::SOURCE_CHARACTERISTIC + title == Seek::ISA::TagType::SOURCE_CHARACTERISTIC end def isa_sample? - title == Seek::Isa::TagType::SAMPLE + title == Seek::ISA::TagType::SAMPLE end def isa_sample_characteristic? - title == Seek::Isa::TagType::SAMPLE_CHARACTERISTIC + title == Seek::ISA::TagType::SAMPLE_CHARACTERISTIC end def isa_protocol? - title == Seek::Isa::TagType::PROTOCOL + title == Seek::ISA::TagType::PROTOCOL end def isa_other_material? - title == Seek::Isa::TagType::OTHER_MATERIAL + title == Seek::ISA::TagType::OTHER_MATERIAL end def isa_other_material_characteristic? - title == Seek::Isa::TagType::OTHER_MATERIAL_CHARACTERISTIC + title == Seek::ISA::TagType::OTHER_MATERIAL_CHARACTERISTIC end def isa_data_file? - title == Seek::Isa::TagType::DATA_FILE + title == Seek::ISA::TagType::DATA_FILE end def isa_data_file_comment? - title == Seek::Isa::TagType::DATA_FILE_COMMENT + title == Seek::ISA::TagType::DATA_FILE_COMMENT end def isa_parameter_value? - title == Seek::Isa::TagType::PARAMETER_VALUE + title == Seek::ISA::TagType::PARAMETER_VALUE end def self.allowed_isa_tags_for_level(level) tags = case level when 'study source' - Seek::Isa::TagType::SOURCE_TAGS + Seek::ISA::TagType::SOURCE_TAGS when 'study sample' - Seek::Isa::TagType::SAMPLE_TAGS + Seek::ISA::TagType::SAMPLE_TAGS when 'assay - material' - Seek::Isa::TagType::OTHER_MATERIAL_TAGS + Seek::ISA::TagType::OTHER_MATERIAL_TAGS when 'assay - data file' - Seek::Isa::TagType::DATA_FILE_TAGS + Seek::ISA::TagType::DATA_FILE_TAGS else - Seek::Isa::TagType::ALL_TYPES + Seek::ISA::TagType::ALL_TYPES end - tags.map { |tag| IsaTag.find_by(title: tag) } + tags.map { |tag| ISATag.find_by(title: tag) } end end diff --git a/app/models/template.rb b/app/models/template.rb index 16712d6e19..44801865a8 100644 --- a/app/models/template.rb +++ b/app/models/template.rb @@ -90,23 +90,23 @@ def test_attribute_title_uniqueness def isa_tag_white_list(template_level) case template_level when 'study source' - [Seek::Isa::TagType::SOURCE, - Seek::Isa::TagType::SOURCE_CHARACTERISTIC] + [Seek::ISA::TagType::SOURCE, + Seek::ISA::TagType::SOURCE_CHARACTERISTIC] when 'study sample' - [Seek::Isa::TagType::SAMPLE, - Seek::Isa::TagType::SAMPLE_CHARACTERISTIC, - Seek::Isa::TagType::PROTOCOL, - Seek::Isa::TagType::PARAMETER_VALUE] + [Seek::ISA::TagType::SAMPLE, + Seek::ISA::TagType::SAMPLE_CHARACTERISTIC, + Seek::ISA::TagType::PROTOCOL, + Seek::ISA::TagType::PARAMETER_VALUE] when 'assay - material' - [Seek::Isa::TagType::OTHER_MATERIAL, - Seek::Isa::TagType::OTHER_MATERIAL_CHARACTERISTIC, - Seek::Isa::TagType::PROTOCOL, - Seek::Isa::TagType::PARAMETER_VALUE] + [Seek::ISA::TagType::OTHER_MATERIAL, + Seek::ISA::TagType::OTHER_MATERIAL_CHARACTERISTIC, + Seek::ISA::TagType::PROTOCOL, + Seek::ISA::TagType::PARAMETER_VALUE] when 'assay - data file' - [Seek::Isa::TagType::PROTOCOL, - Seek::Isa::TagType::DATA_FILE, - Seek::Isa::TagType::DATA_FILE_COMMENT, - Seek::Isa::TagType::PARAMETER_VALUE] + [Seek::ISA::TagType::PROTOCOL, + Seek::ISA::TagType::DATA_FILE, + Seek::ISA::TagType::DATA_FILE_COMMENT, + Seek::ISA::TagType::PARAMETER_VALUE] else [] end diff --git a/app/views/assays/show.html.erb b/app/views/assays/show.html.erb index e5b1008f92..89bd3cb6ba 100644 --- a/app/views/assays/show.html.erb +++ b/app/views/assays/show.html.erb @@ -154,7 +154,7 @@ <% end %> <% if Seek::Config.isa_json_compliance_enabled && @assay.is_isa_json_compliant? && !@assay.is_assay_stream? %> <%= tab_pane('assay_design') do %> - <%= render :partial=>"isa_assays/assay_design", locals: { assay: @assay} -%> + <%= render :partial=> "isa_assays/assay_design", locals: { assay: @assay} -%> <%= render partial: 'single_pages/change_batch_persmission_modal' %> <%= render partial: 'single_pages/upload_excel_modal' %> <% end %> diff --git a/app/views/general/_isa_graph.html.erb b/app/views/general/_isa_graph.html.erb index 8b4df15100..cc90e31752 100644 --- a/app/views/general/_isa_graph.html.erb +++ b/app/views/general/_isa_graph.html.erb @@ -1,7 +1,7 @@ <% return if !display_isa_graph? options ||= { depth: 4, parent_depth: nil, sibling_depth: nil, include_self: true } - hash = Seek::IsaGraphGenerator.new(root_item).generate(**options) + hash = Seek::ISAGraphGenerator.new(root_item).generate(**options) elements = cytoscape_elements(hash) default_view ||= 'tree' only_tree ||= false diff --git a/app/views/homes/isa_colours.html.erb b/app/views/homes/isa_colours.html.erb index 7f3f01ac69..97d52c1d12 100644 --- a/app/views/homes/isa_colours.html.erb +++ b/app/views/homes/isa_colours.html.erb @@ -30,7 +30,7 @@

<%= gen %>

<% groups.each do |group| %> <% group.each do |type| %> -
;"> +
;"> <%= image_tag(asset_path(icon_filename_for_key("#{type.downcase}_avatar") || icon_filename_for_key('misc_file'))) unless type == 'HiddenItem' %> <%= type.titleize %>
diff --git a/app/views/sample_types/_sample_attribute_form.html.erb b/app/views/sample_types/_sample_attribute_form.html.erb index 6ccedf1c0a..f5b2fe7f04 100644 --- a/app/views/sample_types/_sample_attribute_form.html.erb +++ b/app/views/sample_types/_sample_attribute_form.html.erb @@ -24,7 +24,7 @@ <% display_isa_tag ||= false %> <% hide_seek_sample_multi = display_isa_tag ? (sample_attribute&.input_attribute? && displaying_single_page?) : false %> <% level = sample_type.level if display_isa_tag %> -<% isa_tags_options = IsaTag.allowed_isa_tags_for_level(level).map { |it| [it.title, it.id] } if display_isa_tag %> +<% isa_tags_options = ISATag.allowed_isa_tags_for_level(level).map { |it| [it.title, it.id] } if display_isa_tag %> <% isa_tag_id = sample_attribute&.isa_tag_id %> <% template_attribute_id = sample_attribute&.template_attribute_id if display_isa_tag %> <% allow_isa_tag_change = constraints.allow_isa_tag_change?(sample_attribute) if display_isa_tag %> diff --git a/app/views/templates/_template_attribute_form.html.erb b/app/views/templates/_template_attribute_form.html.erb index 286c3dfebd..5bdbb57e4b 100644 --- a/app/views/templates/_template_attribute_form.html.erb +++ b/app/views/templates/_template_attribute_form.html.erb @@ -15,7 +15,7 @@ <% seek_sample_multi = template_attribute.try(:seek_sample_multi?) %> <% is_title = template_attribute ? template_attribute.is_title : false %> <% level = template&.level %> -<% isa_tag_options = IsaTag.allowed_isa_tags_for_level(level).map { |it| [it.title, it.id] } %> +<% isa_tag_options = ISATag.allowed_isa_tags_for_level(level).map { |it| [it.title, it.id] } %> <% isa_tag_id = template_attribute&.isa_tag_id %> <% isa_tag_title = template_attribute&.isa_tag&.title %> <% allow_cv_free_text = template_attribute&.allow_cv_free_text || false %> diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index f2f0d8d7e7..b7ef5d6d0d 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -15,5 +15,6 @@ inflect.acronym "CWL" inflect.acronym "KNIME" inflect.acronym "CFF" + inflect.acronym "ISA" end end diff --git a/db/seeds/015_isa_tags.seeds.rb b/db/seeds/015_isa_tags.seeds.rb index 82a4781629..5a46b14824 100644 --- a/db/seeds/015_isa_tags.seeds.rb +++ b/db/seeds/015_isa_tags.seeds.rb @@ -1,23 +1,23 @@ # ISA tags -source = IsaTag.find_or_initialize_by(title: 'source') +source = ISATag.find_or_initialize_by(title: 'source') source.save -source_characteristic = IsaTag.find_or_initialize_by(title: 'source_characteristic') +source_characteristic = ISATag.find_or_initialize_by(title: 'source_characteristic') source_characteristic.save -sample = IsaTag.find_or_initialize_by(title: 'sample') +sample = ISATag.find_or_initialize_by(title: 'sample') sample.save -sample_characteristic = IsaTag.find_or_initialize_by(title: 'sample_characteristic') +sample_characteristic = ISATag.find_or_initialize_by(title: 'sample_characteristic') sample_characteristic.save -protocol = IsaTag.find_or_initialize_by(title: 'protocol') +protocol = ISATag.find_or_initialize_by(title: 'protocol') protocol.save -other_material = IsaTag.find_or_initialize_by(title: 'other_material') +other_material = ISATag.find_or_initialize_by(title: 'other_material') other_material.save -other_material_characteristic = IsaTag.find_or_initialize_by(title: 'other_material_characteristic') +other_material_characteristic = ISATag.find_or_initialize_by(title: 'other_material_characteristic') other_material_characteristic.save -data_file = IsaTag.find_or_initialize_by(title: 'data_file') +data_file = ISATag.find_or_initialize_by(title: 'data_file') data_file.save -data_file_comment = IsaTag.find_or_initialize_by(title: 'data_file_comment') +data_file_comment = ISATag.find_or_initialize_by(title: 'data_file_comment') data_file_comment.save -parameter_value = IsaTag.find_or_initialize_by(title: 'parameter_value') +parameter_value = ISATag.find_or_initialize_by(title: 'parameter_value') parameter_value.save puts 'Seeded isa tags' diff --git a/db/seeds/017_minimal_starter_isa_templates.seeds.rb b/db/seeds/017_minimal_starter_isa_templates.seeds.rb index 8413acf657..085669b29a 100644 --- a/db/seeds/017_minimal_starter_isa_templates.seeds.rb +++ b/db/seeds/017_minimal_starter_isa_templates.seeds.rb @@ -23,7 +23,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: true, required: true, - isa_tag: IsaTag.find_by(title: 'source') + isa_tag: ISATag.find_by(title: 'source') ) source_temp_attributes << upsert_template_attribute('Source Characteristic 1', @@ -32,7 +32,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'source_characteristic')) + isa_tag: ISATag.find_by(title: 'source_characteristic')) disable_authorization_checks do source_template.update(group_order: 1, @@ -66,7 +66,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'protocol')) + isa_tag: ISATag.find_by(title: 'protocol')) sample_temp_attributes << upsert_template_attribute('Name of protocol parameter 1', sample_template.id, @@ -74,7 +74,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'parameter_value')) + isa_tag: ISATag.find_by(title: 'parameter_value')) sample_temp_attributes << upsert_template_attribute('Sample Name', sample_template.id, @@ -82,7 +82,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: true, required: true, - isa_tag: IsaTag.find_by(title: 'sample')) + isa_tag: ISATag.find_by(title: 'sample')) sample_temp_attributes << upsert_template_attribute('Sample Characteristic 1', sample_template.id, @@ -91,7 +91,7 @@ def upsert_template_attribute(title, template_id, **fields) is_title: false, required: true, sample_controlled_vocab: nil, - isa_tag: IsaTag.find_by(title: 'sample_characteristic')) + isa_tag: ISATag.find_by(title: 'sample_characteristic')) disable_authorization_checks do sample_template.update(group_order: 2, @@ -127,7 +127,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'protocol')) + isa_tag: ISATag.find_by(title: 'protocol')) material_temp_attributes << upsert_template_attribute('Name of protocol parameter 1', material_template.id, @@ -135,7 +135,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'parameter_value')) + isa_tag: ISATag.find_by(title: 'parameter_value')) material_temp_attributes << upsert_template_attribute('Output material Name', material_template.id, @@ -143,7 +143,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: true, required: true, - isa_tag: IsaTag.find_by(title: 'other_material')) + isa_tag: ISATag.find_by(title: 'other_material')) material_temp_attributes << upsert_template_attribute('Output material characteristic 1', material_template.id, @@ -151,7 +151,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'other_material_characteristic')) + isa_tag: ISATag.find_by(title: 'other_material_characteristic')) disable_authorization_checks do material_template.update(group_order: 3, @@ -188,7 +188,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'protocol')) + isa_tag: ISATag.find_by(title: 'protocol')) data_file_temp_attributes << upsert_template_attribute('Name of protocol parameter 1', data_file_template.id, @@ -196,7 +196,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'data_file_comment')) + isa_tag: ISATag.find_by(title: 'data_file_comment')) data_file_temp_attributes << upsert_template_attribute('Data file Name', data_file_template.id, @@ -204,7 +204,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: true, required: true, - isa_tag: IsaTag.find_by(title: 'data_file')) + isa_tag: ISATag.find_by(title: 'data_file')) data_file_temp_attributes << upsert_template_attribute('Data file characteristic 1', data_file_template.id, @@ -212,7 +212,7 @@ def upsert_template_attribute(title, template_id, **fields) sample_attribute_type: SampleAttributeType.find_by(title: 'String'), is_title: false, required: true, - isa_tag: IsaTag.find_by(title: 'data_file_comment')) + isa_tag: ISATag.find_by(title: 'data_file_comment')) disable_authorization_checks do data_file_template.update(group_order: 4, diff --git a/lib/isa_exporter.rb b/lib/isa_exporter.rb index 853cb4f489..549889e01a 100644 --- a/lib/isa_exporter.rb +++ b/lib/isa_exporter.rb @@ -1,5 +1,5 @@ # noinspection ALL -module IsaExporter +module ISAExporter class Exporter def initialize(investigation, user) @investigation = investigation diff --git a/lib/seek/acts_as_asset.rb b/lib/seek/acts_as_asset.rb index b5e6a5bf57..644fa116d2 100644 --- a/lib/seek/acts_as_asset.rb +++ b/lib/seek/acts_as_asset.rb @@ -54,7 +54,7 @@ def acts_as_asset include Seek::Stats::ActivityCounts - include Seek::ActsAsAsset::Isa::Associations + include Seek::ActsAsAsset::ISA::Associations include Seek::ActsAsAsset::Folders::Associations include Seek::ActsAsAsset::Relationships::Associations @@ -104,7 +104,7 @@ def can_create? module InstanceMethods include Seek::ActsAsAsset::ContentBlobs::InstanceMethods - include Seek::ActsAsAsset::Isa::InstanceMethods + include Seek::ActsAsAsset::ISA::InstanceMethods include Seek::ActsAsAsset::Relationships::InstanceMethods include Seek::ActsAsAsset::Folders::InstanceMethods include Seek::ResearchObjects::Packaging diff --git a/lib/seek/acts_as_asset/isa.rb b/lib/seek/acts_as_asset/isa.rb index 330b074a9a..ce11083614 100644 --- a/lib/seek/acts_as_asset/isa.rb +++ b/lib/seek/acts_as_asset/isa.rb @@ -1,7 +1,7 @@ module Seek module ActsAsAsset # Acts as Asset behaviour that relates to the ISA framework - module Isa + module ISA module InstanceMethods def assay_type_titles assays.map { |at| at.try(:assay_type_label) }.compact diff --git a/lib/seek/acts_as_isa.rb b/lib/seek/acts_as_isa.rb index 7e32aac701..1c21010b16 100644 --- a/lib/seek/acts_as_isa.rb +++ b/lib/seek/acts_as_isa.rb @@ -1,7 +1,7 @@ module Seek - module ActsAsIsa + module ActsAsISA def self.included(mod) mod.extend(ClassMethods) end @@ -29,9 +29,9 @@ def acts_as_isa grouped_pagination - include Seek::ActsAsIsa::Relationships::Associations + include Seek::ActsAsISA::Relationships::Associations - include Seek::ActsAsIsa::InstanceMethods + include Seek::ActsAsISA::InstanceMethods include Seek::Stats::ActivityCounts include Seek::Search::CommonFields, Seek::Search::BackgroundReindexing include Seek::Subscribable @@ -40,11 +40,11 @@ def acts_as_isa include Seek::ResearchObjects::Packaging has_many :programmes, ->{ distinct }, through: :projects - extend Seek::ActsAsIsa::SingletonMethods + extend Seek::ActsAsISA::SingletonMethods end def is_isa? - include?(Seek::ActsAsIsa::InstanceMethods) + include?(Seek::ActsAsISA::InstanceMethods) end end @@ -59,7 +59,7 @@ def can_create? end module InstanceMethods - include Seek::ActsAsIsa::Relationships::InstanceMethods + include Seek::ActsAsISA::Relationships::InstanceMethods end end end diff --git a/lib/seek/acts_as_isa/relationships.rb b/lib/seek/acts_as_isa/relationships.rb index 7e3ce30746..1ccdb30b50 100644 --- a/lib/seek/acts_as_isa/relationships.rb +++ b/lib/seek/acts_as_isa/relationships.rb @@ -1,5 +1,5 @@ module Seek - module ActsAsIsa + module ActsAsISA module Relationships module InstanceMethods # includes publications directly related, plus those related to associated assays diff --git a/lib/seek/isa/tag_type.rb b/lib/seek/isa/tag_type.rb index 6ffdfc513f..70f6001e10 100644 --- a/lib/seek/isa/tag_type.rb +++ b/lib/seek/isa/tag_type.rb @@ -1,5 +1,5 @@ module Seek - module Isa + module ISA module TagType ALL_TYPES = %w(source source_characteristic sample sample_characteristic protocol other_material other_material_characteristic data_file data_file_comment parameter_value) diff --git a/lib/seek/isa_graph_extensions.rb b/lib/seek/isa_graph_extensions.rb index aaba702c30..0b949f1caf 100644 --- a/lib/seek/isa_graph_extensions.rb +++ b/lib/seek/isa_graph_extensions.rb @@ -1,6 +1,6 @@ module Seek - module IsaGraphExtensions - include IsaHelper + module ISAGraphExtensions + include ISAHelper end end diff --git a/lib/seek/isa_graph_generator.rb b/lib/seek/isa_graph_generator.rb index 2a26c9a663..202ec08e6f 100644 --- a/lib/seek/isa_graph_generator.rb +++ b/lib/seek/isa_graph_generator.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Seek - class IsaGraphNode + class ISAGraphNode attr_accessor :object, :child_count, :can_view def initialize(object) @@ -50,7 +50,7 @@ def initialize(object, type, children) end end - class IsaGraphGenerator + class ISAGraphGenerator def initialize(object) @object = object end @@ -113,7 +113,7 @@ def ancestors(object, max_depth = nil, depth = 0) end def traverse(method, object, max_depth = nil, depth = 0) - node = Seek::IsaGraphNode.new(object) + node = Seek::ISAGraphNode.new(object) node.can_view = object.can_view? if @auth children = send(method, object) @@ -127,7 +127,7 @@ def traverse(method, object, max_depth = nil, depth = 0) associations = resolve_association(object, method) next unless associations.any? agg = Seek::ObjectAggregation.new(object, type, associations) - agg_node = Seek::IsaGraphNode.new(agg) + agg_node = Seek::ISAGraphNode.new(agg) agg_node.can_view = true nodes << agg_node edges << [object, agg] diff --git a/lib/seek/isa_templates/template_extractor.rb b/lib/seek/isa_templates/template_extractor.rb index 4f11d633db..30c50ffb92 100644 --- a/lib/seek/isa_templates/template_extractor.rb +++ b/lib/seek/isa_templates/template_extractor.rb @@ -1,7 +1,7 @@ require 'json-schema' # singleton class for extracting Templates and their attributes from json files module Seek - module IsaTemplates + module ISATemplates module TemplateExtractor def self.extract_templates FileUtils.touch(resultfile) @@ -180,14 +180,14 @@ def self.get_sample_attribute_type(title) def self.get_isa_tag_id(title) return nil if title.blank? - it = IsaTag.find_by(title:) + it = ISATag.find_by(title:) @errors.append "
  • Could not find an ISA Tag named '#{title}'
  • " if it.nil? it.id end def self.seed_isa_tags - Rake::Task['db:seed:015_isa_tags'].invoke if IsaTag.all.blank? + Rake::Task['db:seed:015_isa_tags'].invoke if ISATag.all.blank? end def self.lockfile diff --git a/lib/tasks/populate_templates.rake b/lib/tasks/populate_templates.rake index 89b4f591a1..7b6f5070f4 100644 --- a/lib/tasks/populate_templates.rake +++ b/lib/tasks/populate_templates.rake @@ -4,6 +4,6 @@ require 'rake' namespace :seek do desc 'Fetch ontology terms from EBI API' task populate_templates: :environment do - Seek::IsaTemplates::TemplateExtractor.extract_templates + Seek::ISATemplates::TemplateExtractor.extract_templates end end diff --git a/test/factories/isa_tags.rb b/test/factories/isa_tags.rb index bae289a309..0ca55501b9 100644 --- a/test/factories/isa_tags.rb +++ b/test/factories/isa_tags.rb @@ -1,56 +1,56 @@ FactoryBot.define do # source ISA tag - factory(:source_isa_tag, class: IsaTag) do + factory(:source_isa_tag, class: ISATag) do title { "source" } end # sample ISA tag - factory(:sample_isa_tag, class: IsaTag) do + factory(:sample_isa_tag, class: ISATag) do title { "sample" } end # protocol ISA tag - factory(:protocol_isa_tag, class: IsaTag) do + factory(:protocol_isa_tag, class: ISATag) do title { "protocol" } end # source characteristic ISA tag - factory(:source_characteristic_isa_tag, class: IsaTag) do + factory(:source_characteristic_isa_tag, class: ISATag) do title { "source_characteristic" } end # sample characteristic ISA tag - factory(:sample_characteristic_isa_tag, class: IsaTag) do + factory(:sample_characteristic_isa_tag, class: ISATag) do title { "sample_characteristic" } end # other material ISA tag - factory(:other_material_isa_tag, class: IsaTag) do + factory(:other_material_isa_tag, class: ISATag) do title { "other_material" } end # other material characteristic ISA tag - factory(:other_material_characteristic_isa_tag, class: IsaTag) do + factory(:other_material_characteristic_isa_tag, class: ISATag) do title { "other_material_characteristic" } end # data file ISA tag - factory(:data_file_isa_tag, class: IsaTag) do + factory(:data_file_isa_tag, class: ISATag) do title { "data_file" } end # data file comment ISA tag - factory(:data_file_comment_isa_tag, class: IsaTag) do + factory(:data_file_comment_isa_tag, class: ISATag) do title { "data_file_comment" } end # parameter value ISA tag - factory(:parameter_value_isa_tag, class: IsaTag) do + factory(:parameter_value_isa_tag, class: ISATag) do title { "parameter_value" } end # default ISA tag - factory(:default_isa_tag, class: IsaTag) do + factory(:default_isa_tag, class: ISATag) do title { "default isa-tag" } end diff --git a/test/functional/isa_assays_controller_test.rb b/test/functional/isa_assays_controller_test.rb index 61230cb8a4..058af8db27 100644 --- a/test/functional/isa_assays_controller_test.rb +++ b/test/functional/isa_assays_controller_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class IsaAssaysControllerTest < ActionController::TestCase +class ISAAssaysControllerTest < ActionController::TestCase fixtures :all include AuthenticatedTestHelper diff --git a/test/functional/isa_studies_controller_test.rb b/test/functional/isa_studies_controller_test.rb index abd131df95..42adeca894 100644 --- a/test/functional/isa_studies_controller_test.rb +++ b/test/functional/isa_studies_controller_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class IsaStudiesControllerTest < ActionController::TestCase +class ISAStudiesControllerTest < ActionController::TestCase fixtures :all include AuthenticatedTestHelper diff --git a/test/unit/investigation_test.rb b/test/unit/investigation_test.rb index f7093a60fa..6532437076 100644 --- a/test/unit/investigation_test.rb +++ b/test/unit/investigation_test.rb @@ -65,7 +65,7 @@ class InvestigationTest < ActiveSupport::TestCase assay.save! end - the_hash = IsaTabConverter.convert_investigation(object) + the_hash = ISATabConverter.convert_investigation(object) json = JSON.pretty_generate(the_hash) # write out to a temporary file diff --git a/test/unit/isa_exporter_test.rb b/test/unit/isa_exporter_test.rb index c4cd891778..30ee274073 100644 --- a/test/unit/isa_exporter_test.rb +++ b/test/unit/isa_exporter_test.rb @@ -1,9 +1,9 @@ require 'test_helper' -class IsaExporterTest < ActionController::TestCase +class ISAExporterTest < ActionController::TestCase test 'find sample origin' do current_user = FactoryBot.create(:user) - controller = IsaExporter::Exporter.new(FactoryBot.create(:investigation), current_user) + controller = ISAExporter::Exporter.new(FactoryBot.create(:investigation), current_user) project = FactoryBot.create(:project) type_1 = FactoryBot.create(:simple_sample_type, project_ids: [project.id]) diff --git a/test/unit/isa_graph_generator_test.rb b/test/unit/isa_graph_generator_test.rb index e2f4d9c884..c5682d1f78 100644 --- a/test/unit/isa_graph_generator_test.rb +++ b/test/unit/isa_graph_generator_test.rb @@ -2,14 +2,14 @@ require 'test_helper' -class IsaGraphGeneratorTest < ActiveSupport::TestCase +class ISAGraphGeneratorTest < ActiveSupport::TestCase test 'investigation with studies and assays' do assay = FactoryBot.create(:assay) study = assay.study investigation = assay.investigation assay2 = FactoryBot.create(:assay, contributor: assay.contributor, study: study) - generator = Seek::IsaGraphGenerator.new(investigation) + generator = Seek::ISAGraphGenerator.new(investigation) # Shallow shallow_result = generator.generate @@ -54,7 +54,7 @@ class IsaGraphGeneratorTest < ActiveSupport::TestCase AssayAsset.create!(assay: sibling_assay, asset: niece_sop) end - result = Seek::IsaGraphGenerator.new(assay).generate(parent_depth: nil, sibling_depth: 1) + result = Seek::ISAGraphGenerator.new(assay).generate(parent_depth: nil, sibling_depth: 1) assert_equal 5, result[:nodes].length # Investigation, Study, 2 Assays, DataFile assert_equal 4, result[:edges].length @@ -81,7 +81,7 @@ class IsaGraphGeneratorTest < ActiveSupport::TestCase AssayAsset.create!(assay: sibling_assay, asset: niece_sop) end - result = Seek::IsaGraphGenerator.new(assay).generate(parent_depth: nil, sibling_depth: nil) + result = Seek::ISAGraphGenerator.new(assay).generate(parent_depth: nil, sibling_depth: nil) assert_equal 7, result[:nodes].length # Investigation, Study, 2 Assays, DataFile, Model, Sop assert_equal 6, result[:edges].length @@ -98,7 +98,7 @@ class IsaGraphGeneratorTest < ActiveSupport::TestCase study = assay.study investigation = assay.investigation assay2 = FactoryBot.create(:assay, contributor: assay.contributor, study: study) - generator = Seek::IsaGraphGenerator.new(investigation) + generator = Seek::ISAGraphGenerator.new(investigation) result = generator.generate study_node = result[:nodes].detect { |n| n.object == study } @@ -120,7 +120,7 @@ class IsaGraphGeneratorTest < ActiveSupport::TestCase study4 = FactoryBot.create(:study, contributor: person, investigation: investigation) assay = FactoryBot.create(:assay, contributor: person, study: study) - generator = Seek::IsaGraphGenerator.new(assay) + generator = Seek::ISAGraphGenerator.new(assay) result = generator.generate(parent_depth: nil) investigation_node = result[:nodes].detect { |n| n.object == investigation } @@ -154,7 +154,7 @@ class IsaGraphGeneratorTest < ActiveSupport::TestCase assert_empty assay.study.investigation.publications assert_equal [publication, publication2].sort, assay.study.investigation.related_publications.sort - generator = Seek::IsaGraphGenerator.new(assay) + generator = Seek::ISAGraphGenerator.new(assay) result = generator.generate(parent_depth: nil) assert_equal 5, result[:nodes].count