qu-cmdwrapper 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qu/cmdwrapper/cmd.rb +29 -15
- data/lib/qu/cmdwrapper/ext_bin/linux/64/primer3_core +0 -0
- data/lib/qu/cmdwrapper/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22a58735233b9a808b30cbb3ec75c989fba69561
|
4
|
+
data.tar.gz: 76c421d95079d6550aba99429fc53565ff3c2656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ab46f612eb9dbd84a67198c84a6ec3951ec7ed555f261282e10605b39b05bc229377ac4fadf1424bdd9b8b5f131f886b097aaf23e1fdd35331655bec069a009
|
7
|
+
data.tar.gz: f0faea15335157a4766f6eed4a38ed18d398dcfbedcf7e768f63af41a061f4b73296944b7ca36936e3c6552b83498161422d6af934ff4c3b88e5808b960549a7
|
data/lib/qu/cmdwrapper/cmd.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
3
|
+
require "open3"
|
4
|
+
|
4
5
|
require 'tempfile'
|
5
6
|
require 'qu/utils'
|
6
7
|
|
@@ -14,16 +15,21 @@ module Qu
|
|
14
15
|
|
15
16
|
module_function
|
16
17
|
|
17
|
-
def primer3_core(
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
def primer3_core(paras)
|
19
|
+
cmd = File.join(BIN_PATH, 'primer3_core')
|
20
|
+
|
21
|
+
lines = []
|
22
|
+
paras.each_pair do |key, value|
|
23
|
+
next if value.to_s.empty?
|
24
|
+
lines << "#{key}=#{value}"
|
25
|
+
end
|
26
|
+
lines << "="
|
27
|
+
|
28
|
+
stdout, stderr, status = Open3.capture3(cmd, stdin_data: lines.join("\n"))
|
29
|
+
if status.success?
|
30
|
+
return stdout
|
31
|
+
else
|
32
|
+
$stderr.puts stderr
|
27
33
|
exit
|
28
34
|
end
|
29
35
|
end
|
@@ -34,10 +40,10 @@ module Qu
|
|
34
40
|
if s2
|
35
41
|
# tm = `#{cmd} -mv #{mv} -dv #{dv} -d #{d} -n #{n} -s1 #{s1} -s2 #{s2} -r -path #{THERMO_PATH} -a #{mode}`
|
36
42
|
# out = `#{cmd} -mv #{mv} -dv #{dv} -d #{d} -n #{n} -s1 #{s1} -s2 #{s2} -path #{THERMO_PATH} -a #{mode}`
|
37
|
-
out =
|
43
|
+
out = exec_cmd("#{cmd} -mv #{mv} -dv #{dv} -d #{d} -n #{n} -s1 #{s1} -s2 #{s2} -path #{THERMO_PATH} -a #{mode}")
|
38
44
|
else
|
39
45
|
# out = `#{cmd} -mv #{mv} -dv #{dv} -d #{d} -n #{n} -s1 #{s1} -path #{THERMO_PATH} -a HAIRPIN`
|
40
|
-
out =
|
46
|
+
out = exec_cmd("#{cmd} -mv #{mv} -dv #{dv} -d #{d} -n #{n} -s1 #{s1} -path #{THERMO_PATH} -a HAIRPIN")
|
41
47
|
end
|
42
48
|
|
43
49
|
begin
|
@@ -139,9 +145,17 @@ module Qu
|
|
139
145
|
return amp_seq_list
|
140
146
|
end
|
141
147
|
|
142
|
-
|
148
|
+
def exec_cmd(cmd)
|
149
|
+
stdout, stderr, status = Open3.capture3(cmd)
|
150
|
+
if status.success?
|
151
|
+
return stdout
|
152
|
+
else
|
153
|
+
puts stderr
|
154
|
+
exit
|
155
|
+
end
|
156
|
+
end
|
143
157
|
|
144
|
-
def
|
158
|
+
def system_quietly_old(*cmd)
|
145
159
|
exit_status=nil
|
146
160
|
err=nil
|
147
161
|
out=nil
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qu-cmdwrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wubin Qu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: qu-utils
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.2.
|
140
|
+
rubygems_version: 2.2.2
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: A wrapper for command-line tools
|