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



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

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

#accession_optionsObject



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

def accession_options
  configatron.accession.ena!.to_hash
end

#brokerObject



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

def broker
  nil
end

#dac_visibility(_study) ⇒ Object



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

def dac_visibility(_study)
  Hold
end

#policy_visibility(_study) ⇒ Object



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

def policy_visibility(_study)
  Hold
end

#providerObject



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

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



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

def sample_visibility(_sample)
  Hold
end

#study_visibility(_study) ⇒ Object



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

def study_visibility(_study)
  Hold
end

#submit_dac_for_user(_user, _study) ⇒ Object

Raises:



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

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:



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

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