Class: Cagnut::Configuration::Base

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/cagnut/configuration/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clusterObject

Returns the value of attribute cluster.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def cluster
  @cluster
end

#data_typeObject

Returns the value of attribute data_type.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def data_type
  @data_type
end

#dbsnp_ref_indelsObject

Returns the value of attribute dbsnp_ref_indels.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def dbsnp_ref_indels
  @dbsnp_ref_indels
end

#dodebugObject

Returns the value of attribute dodebug.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def dodebug
  @dodebug
end

#java_pathObject

Returns the value of attribute java_path.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def java_path
  @java_path
end

#jobs_dirObject

Returns the value of attribute jobs_dir.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def jobs_dir
  @jobs_dir
end

#magic28Object

Returns the value of attribute magic28.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def magic28
  @magic28
end

#pipeline_nameObject

Returns the value of attribute pipeline_name.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def pipeline_name
  @pipeline_name
end

#prefix_nameObject

Returns the value of attribute prefix_name.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def prefix_name
  @prefix_name
end

#ref_fastaObject

Returns the value of attribute ref_fasta.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def ref_fasta
  @ref_fasta
end

#sample_nameObject

Returns the value of attribute sample_name.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def sample_name
  @sample_name
end

#seqs_pathObject

Returns the value of attribute seqs_path.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def seqs_path
  @seqs_path
end

#snpdbObject

Returns the value of attribute snpdb.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def snpdb
  @snpdb
end

#targetObject

Returns the value of attribute target.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def target
  @target
end

#target_flanks_fileObject

Returns the value of attribute target_flanks_file.



7
8
9
# File 'lib/cagnut/configuration/base.rb', line 7

def target_flanks_file
  @target_flanks_file
end

Class Method Details

.load(config) ⇒ Object



12
13
14
# File 'lib/cagnut/configuration/base.rb', line 12

def load config
  instance.load config
end

Instance Method Details

#attributesObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/cagnut/configuration/base.rb', line 24

def attributes
  {
    prefix_name: @config['prefix_name'],
    sample_name: @config['sample']['name'],
    dodebug: @config['dodebug'],
    java_path: @config['tools']['java'],
    ref_fasta: @config['refs']['ref_fasta'],
    snpdb: @config['refs']['dbsnp']['ref'],
    dbsnp_ref_indels: @config['refs']['dbsnp']['indels'],
    target: @config['refs']['targets_file'],
    target_flanks_file: @config['refs']['target_flanks_file'],
    magic28: '1f8b08040000000000ff0600424302001b0003000000000000000000',
    seqs_path: @config['sample']['seqs_path'],
    data_type: @config['info']['data_type'],
    jobs_dir: @config['sample']['jobs'],
    cluster: @config['cluster']
  }
end

#load(config) ⇒ Object



17
18
19
20
21
22
# File 'lib/cagnut/configuration/base.rb', line 17

def load config
  @config = config
  attributes.each do |name, value|
    send "#{name}=", value if respond_to? "#{name}="
  end
end