Class: EnaAccessionService

Inherits:
AccessionService show all
Defined in:
app/models/ena_accession_service.rb

Constant Summary

Constants inherited from AccessionService

AccessionService::AccessionServiceError, AccessionService::CenterName, AccessionService::Hold, AccessionService::NumberNotGenerated, AccessionService::NumberNotRequired, AccessionService::Protect

Instance Method Summary collapse

Methods inherited from AccessionService

#accession_dac_xml, #accession_policy_xml, #accession_sample_xml, #accession_study_xml, #private?, #submit, #submit_sample_for_user, #submit_study_for_user

Instance Method Details

#accession_loginObject


13
14
15
# File 'app/models/ena_accession_service.rb', line 13

def 
  configatron. or raise "Can't find ENA accession login in configuration file"
end

#accession_optionsObject


9
10
11
# File 'app/models/ena_accession_service.rb', line 9

def accession_options
  configatron.accession.ena!.to_hash
end

#brokerObject


35
36
37
# File 'app/models/ena_accession_service.rb', line 35

def broker
  nil
end

#dac_visibility(_study) ⇒ Object


31
32
33
# File 'app/models/ena_accession_service.rb', line 31

def dac_visibility(_study)
  Hold
end

#policy_visibility(_study) ⇒ Object


27
28
29
# File 'app/models/ena_accession_service.rb', line 27

def policy_visibility(_study)
  Hold
end

#providerObject


5
6
7
# File 'app/models/ena_accession_service.rb', line 5

def provider
  :ENA
end

#sample_visibility(_sample) ⇒ Object

Most uses of this feature have been human error, so its better to hold off on releasing data than accidentally releasing data


19
20
21
# File 'app/models/ena_accession_service.rb', line 19

def sample_visibility(_sample)
  Hold
end

#study_visibility(_study) ⇒ Object


23
24
25
# File 'app/models/ena_accession_service.rb', line 23

def study_visibility(_study)
  Hold
end

#submit_dac_for_user(_user, _study) ⇒ Object

Raises:


43
44
45
# File 'app/models/ena_accession_service.rb', line 43

def submit_dac_for_user(_user, _study)
  raise NumberNotGenerated, 'no need to submit DAC  to ERA'
end

#submit_policy_for_user(_user, _study) ⇒ Object

Raises:


39
40
41
# File 'app/models/ena_accession_service.rb', line 39

def submit_policy_for_user(_user, _study)
  raise NumberNotGenerated, 'no need to submit Policy to ERA'
end