Method: Transrate::Cmdline#check_assembly

Defined in:
lib/transrate/cmdline.rb

#check_assemblyObject



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/transrate/cmdline.rb', line 179

def check_assembly
  if @opts.assembly
    @opts[:assembly] = @opts.assembly.split(',').map do |a|
      File.expand_path a
    end.join(',')
    @opts.assembly.split(',').each do |assembly_file|
      unless File.exist?(assembly_file)
        raise TransrateIOError.new "Assembly fasta file does not exist: " +
                                   " #{assembly_file}"
      end
    end
  else
    raise TransrateArgError.new "Option --assembly must be specified. " +
                                "Try --help for help."
  end
end