Skip to content

Commit

Permalink
Merge branch 'seek_ena_upload' of github.com:ELIXIR-Belgium/seek into…
Browse files Browse the repository at this point in the history
… fairdom_test

Merge branch 'seek_ena_upload' of github.com:ELIXIR-Belgium/seek into
fairdom_test. Fix failing test
  • Loading branch information
Kevin De Pelseneer committed Oct 11, 2023
2 parents 0dab07b + 88e9455 commit 99bfba3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/isa_exporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def convert_assay_comments(assays)
assay_streams = assays.select { |a| a.position.zero? }
assay_stream_id = assays.pluck(:id).join('_')

linked_assays = assays.map { |assay| { 'id': assay.id, 'title': assay.title } }
linked_assays = assays.map { |assay| { 'id': assay.id, 'title': assay.title } }.to_json

assay_streams.map do |assay|
next if assay.extended_metadata.nil?
Expand Down Expand Up @@ -222,12 +222,12 @@ def convert_publication(publication)
{
"@id": "#publication_comment/#{publication.id}_#{publication.assays.map(&:id).join('_')}",
"name": "linked_assays",
"value": publication.assays.map { |assay| {"id": assay.id, "title": assay.title} }
"value": publication.assays.map { |assay| {"id": assay.id, "title": assay.title} }.to_json
},
{
"@id": "#publication_comment/#{publication.id}_#{publication.studies.map(&:id).join('_')}",
"name": "linked_studies",
"value": publication.studies.map { |study| {"id": study.id, "title": study.title} }
"value": publication.studies.map { |study| {"id": study.id, "title": study.title} }.to_json
}
]

Expand Down Expand Up @@ -290,7 +290,6 @@ def convert_materials_sources(sample_type)
with_tag_source_characteristic =
sample_type.sample_attributes.select { |sa| sa.isa_tag&.isa_source_characteristic? }

# attributes = sample_type.sample_attributes.select{ |sa| sa.isa_tag&.isa_source_characteristic? }
sample_type.samples.map do |s|
{
'@id': "#source/#{s.id}",
Expand Down

0 comments on commit 99bfba3

Please sign in to comment.