cagnut_bwa 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a590ef059a51b29608fa778fb7240b15fd35324
4
- data.tar.gz: 84eb55f1953dee48a355399b869b93dca3ae2eda
3
+ metadata.gz: 97a5d23cc8316d1b59b094e87e31d8ee1aac2308
4
+ data.tar.gz: 0b79d3b340ddb09a6c0d685e70d4f0a679cffecf
5
5
  SHA512:
6
- metadata.gz: 30557300233764630040310ac624e8779c6f174833ccea6045c384922e5093ea280d127d70d46002cfb4e82fa03686ecb13941d6b2b67b70b4be568ba5387655
7
- data.tar.gz: c46eb66f3291c6fb55422f50263031698bd1818def78c4b8a7e8a0132e4f92b656a357d5b4aa226f466a1782f8f553329a53d6a2e54de079cfa12282dfea1ea7
6
+ metadata.gz: ec0ef694d43675ba5e27548d63ab818e0fe57c1b574ffae58648a19da42fe84266fb2d0222ada1437c9f7b5ee59cac680e2ba4bde5c84cd4c96b4164cf28157e
7
+ data.tar.gz: c36780081df3e223280c5ac07c917432df5b131f955cd5885d2c82a575850cafe7d2c0eb609b086158f18b5154f5a4d4df0a6b88f2c160998255e403e0071dda
@@ -1,26 +1,24 @@
1
1
  module CagnutBwa
2
2
  module CheckTools
3
- def check_tool tools_path
3
+ def check_tool tools_path, refs=nil
4
4
  super if defined?(super)
5
- check_bwa tools_path['bwa']
6
- check_bwa_index refs['ref_fasta']
5
+ ver = check_bwa tools_path['bwa'], refs['ref_fasta']
6
+ check_bwa_index tools_path['bwa'], refs['ref_fasta'] if ver.blank?
7
7
  end
8
8
 
9
- def check_bwa path
9
+ def check_bwa path, ref_path
10
10
  check_tool_ver 'BWA' do
11
11
  `#{path} 2>&1 | grep Version | cut -f2 -d ' '` if path
12
- check_bwa_index
13
12
  end
14
13
  end
15
14
 
16
- def check_bwa_index ref_path
15
+ def check_bwa_index tool_path, ref_path
17
16
  tool = 'Bwa Index'
18
17
  file = "#{ref_path}.ann"
19
- command = "#{@config['tools']['bwa']} index #{ref_path}"
18
+ command = "#{tool_path} index #{ref_path}"
20
19
  check_ref_related file, tool, command
21
20
  end
22
21
 
23
-
24
22
  def check_ref_related file, tool, command
25
23
  if File.exist?(file)
26
24
  puts "\t#{tool}: Done"
@@ -1,3 +1,3 @@
1
1
  module CagnutBwa
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
data/lib/cagnut_bwa.rb CHANGED
@@ -12,5 +12,6 @@ module CagnutBwa
12
12
  end
13
13
 
14
14
  require 'cagnut_bwa/configuration'
15
+ require 'cagnut_bwa/check_tools'
15
16
  require 'cagnut_bwa/base'
16
17
  require 'cagnut_bwa/util'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cagnut_bwa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shi-Gang Wang