Class: Dratools::DownloadCandidateBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/dratools/download_candidate_builder.rb

Overview

DDBJ run レコードの downloadUrl/distribution から DownloadCandidate を作る。

Instance Method Summary collapse

Instance Method Details

#build_from_run_record(run_record) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/dratools/download_candidate_builder.rb', line 9

def build_from_run_record(run_record)
  run_accession = run_accession_from(run_record)
  downloads = download_items_from(run_record).filter_map do |download_item|
    build_from_download_item(run_accession, download_item)
  end
  downloads.uniq { |download| download_key(download) }
end