sequencescape
sequencescape copied to clipboard
Y24-410 - [BUG] Unable to update/send EGA sample metadata
Describe the bug Creating accession identifiers for samples works fine however should a user need to update a sample's metadata when this is sent to the EGA webin submit service and error is displayed and the data is not updated in SS (this only applies to EGA accessioning service NOT the ENA). In summary creation is fine but the update is not working.
To Reproduce Steps to reproduce the behaviour: In a Sequencescape console:
def get_next_uat_sample(manifest_id=19348)
sm = SampleManifest.find_by(id:manifest_id) #manifest created for testing data
sample = sm.samples.select {|s| s.ebi_accession_number.nil?}.first #first sample without accession id
sample.sample_metadata.update!(gender:'Unknown',phenotype:'Unknown') #data is initially missing to prevent auto accessioning on manifest upload
puts "https://uat.sequencescape.psd.sanger.ac.uk/samples/#{sample.id}" #goto url
end
irb(main):020:0> get_next_uat_sample(manifest_id=19348)
https://uat.sequencescape.psd.sanger.ac.uk/samples/6970962
On UAT sample page select 'Generate Accession Number'
Next select 'Update EBI Sample data
Expected behaviour
Additional context The error message "Could not get accession number. EBI may be down or invalid data submitted: 500 Internal Server Error" is also returned when attempting to update sample accession metadata within the application script console