Class: Bio::GFASTQC

Inherits:
Object
  • Object
show all
Defined in:
lib/bio-gfastqc/gfastqc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = OpenStruct.new) ⇒ GFASTQC

Returns a new instance of GFASTQC.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/bio-gfastqc/gfastqc.rb', line 9

def initialize(options=OpenStruct.new)
  @options = options
  @config = YAML.load_file(options.config)
  @data = Hash.new { |hash, key| hash[key] = Hash.new { |ihash, ikey| ihash[ikey] = {} } }
  @tables = Hash.new { |hash, key| hash[key] = Hash.new { |ihash, ikey| ihash[ikey] = {} } }
  @base_file_names = []
  @base_file_names << options.first #this must be mandatory
  @base_file_names << options.second if options.second # this can be optional
  @step = options.step

  if options.pipengine 
    unless @config['resources'] && @config['resources']['output']
      raise "Error: If you selected the compatible option -p/--pipengine, an 'output' tag must occour in your configuration file."
    end
  end #pipengine

  @output = get_output

  read_each_sample

end

Instance Attribute Details

#base_file_namesObject

Returns the value of attribute base_file_names.



4
5
6
# File 'lib/bio-gfastqc/gfastqc.rb', line 4

def base_file_names
  @base_file_names
end

#configObject

Returns the value of attribute config.



4
5
6
# File 'lib/bio-gfastqc/gfastqc.rb', line 4

def config
  @config
end

#dataObject

Returns the value of attribute data.



4
5
6
# File 'lib/bio-gfastqc/gfastqc.rb', line 4

def data
  @data
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/bio-gfastqc/gfastqc.rb', line 7

def options
  @options
end

#outputObject

Returns the value of attribute output.



4
5
6
# File 'lib/bio-gfastqc/gfastqc.rb', line 4

def output
  @output
end

#stepObject

Returns the value of attribute step.



4
5
6
# File 'lib/bio-gfastqc/gfastqc.rb', line 4

def step
  @step
end

#tablesObject

Returns the value of attribute tables.



4
5
6
# File 'lib/bio-gfastqc/gfastqc.rb', line 4

def tables
  @tables
end

#type_imagesObject

An array of names of images that must be reported into the html page



5
6
7
# File 'lib/bio-gfastqc/gfastqc.rb', line 5

def type_images
  @type_images
end

#type_tablesObject

An array of names of tables that must be reported into the html page



6
7
8
# File 'lib/bio-gfastqc/gfastqc.rb', line 6

def type_tables
  @type_tables
end

Instance Method Details

#samplesObject



43
44
45
# File 'lib/bio-gfastqc/gfastqc.rb', line 43

def samples
  @config['samples']
end

#use_groups?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/bio-gfastqc/gfastqc.rb', line 35

def use_groups?
  @options.groups
end

#use_pipengine?Boolean

initialize

Returns:

  • (Boolean)


31
32
33
# File 'lib/bio-gfastqc/gfastqc.rb', line 31

def use_pipengine?
  @options.pipengine
end

#use_sample_name?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/bio-gfastqc/gfastqc.rb', line 39

def use_sample_name?
  @options.usename
end