Class: OptHandlingBox

Inherits:
Object
  • Object
show all
Defined in:
bin/gfastqc

Class Method Summary collapse

Class Method Details

.parse(args) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'bin/gfastqc', line 45

def  self.parse(args)
  options = OpenStruct.new
  options.config = 'config.yml'
  options.step = ''

  opt_parser =  OptionParser.new do |opts|
    opts.banner = 'Usage: qc_overview.rb '

    opts.on('-c', '--config [config]',
            'choose the config from get info about the samples') do |config|
      options.config = config
    end

    opts.on('-p', '--pipengine',
            'if you used pipengine to produce the fastqc result is better to use this option. gfastqc will look into the output directory specified in the sample.yml') do
      options.pipengine = true
    end

    opts.on('-g', '--groups',
            'if you specified groups in your configuration file, select this option') do
      options.groups = true
    end

    opts.on('-s', '--step [STEP]',
            'choose the step from which extract the fastqc data') do |step|
      options.step = step
    end

    opts.on('-a', '--first [FIRST]',
            'forward strand reads') do |first|
      options.first = first
    end

    opts.on('-b', '--second [SECOND]',
            'reverse strand reads') do |second|
      options.second = second
    end

    opts.on('-n', '--usename',
            'use sample name to build the path (maybe later implement placeholding like pipengine') do
      options.usename = true
    end


    opts.on_tail("-h", "--help", "Show this message") do
      puts opts
      exit
    end
  end #opt_parse

  opt_parser.parse!(args)
  options
end