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 +4 -4
- data/lib/cagnut_bwa/check_tools.rb +6 -8
- data/lib/cagnut_bwa/version.rb +1 -1
- data/lib/cagnut_bwa.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97a5d23cc8316d1b59b094e87e31d8ee1aac2308
|
4
|
+
data.tar.gz: 0b79d3b340ddb09a6c0d685e70d4f0a679cffecf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 = "#{
|
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"
|
data/lib/cagnut_bwa/version.rb
CHANGED
data/lib/cagnut_bwa.rb
CHANGED