Skip to content

Commit

Permalink
response to empty peptide list
Browse files Browse the repository at this point in the history
  • Loading branch information
pverscha committed Feb 29, 2024
1 parent 37375c9 commit 250ad18
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/controllers/mpa_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ def pept2data
missed = params[:missed] || false
@equate_il = params[:equate_il].nil? ? true : params[:equate_il]

if peptides.empty?
@response = Hash.new
@lineages = Hash.new

return
end

File.open("/mnt/data/suffix-array/unipept_query.txt", "w+") do |f|
peptides.each { |element| f.puts(element) }
end
Expand Down

0 comments on commit 250ad18

Please sign in to comment.