Class: Bio::BWA::Library
- Inherits:
-
Object
- Object
- Bio::BWA::Library
- Defined in:
- lib/bio/bwa/library.rb
Class Method Summary collapse
- .lib_extension ⇒ Object
-
.load ⇒ String
Load the correct library for the OS system in use.
Class Method Details
.lib_extension ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/bio/bwa/library.rb', line 7 def self.lib_extension case Config::CONFIG['host_os'] when /linux/ then return 'so' when /darwin/ then return 'dylib' when /mswin|mingw/ then raise NotImplementedError, "BWA library is not available for Windows platform" end end |
.load ⇒ String
Note:
this method is called automatically when the module is loaded
Load the correct library for the OS system in use
18 19 20 21 22 23 |
# File 'lib/bio/bwa/library.rb', line 18 def self.load warn "BWA library should be run on a 64bit system" if arch_type == "32bit" path = File. File.dirname(__FILE__) path.gsub!(/lib\/bio\/bwa/,'ext') File.join(path,"libbwa.#{self.lib_extension}") end |