virust-locator-ruby 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61b36ab571a54c1e758d9f472016c7ceb2fb3b89f40a52caa9752cfcb1906303
4
- data.tar.gz: f8ec24020b4a78766e5674190822ec2caf15374d446a849115612136013aa154
3
+ metadata.gz: 4f707c3b610e396fa91ab80019bd33fef85a11537a02a972952da29d27e5eae5
4
+ data.tar.gz: 4530ebbc8774b4a9729015b2373149ecaa68e74d1bf03406e7adcee75e0e0d90
5
5
  SHA512:
6
- metadata.gz: 298fdbe81f8304553f257a6aadb393b2895e986ff72a6075bc5c6ce7833389053abd7e0499234e8632c68f617e5b77c9f322351c77c16dea0fb2dbf10038d912
7
- data.tar.gz: 7ee8da59a5ce256b81700659bc50f93ac288704c1299842a80b320a9a4b6a421af1038f6c7d981995a4615ef49a31c80a3f4a6b3c6b07b2791fb0f7840187dba
6
+ metadata.gz: c301755f05d3f6a0e1936a4ad1cbccd7db99f0d66831064f5d1293b899eefb22bb86c169f88de27444480b122659ebd91847c72678724d2dc12573ed25ba8ac9
7
+ data.tar.gz: 253da967570441b088502d3ed70cb11e20d52c71c7b9133208daba4bb1872c80e387b21bda8d5b00df66255f99883f088767a3a5c0f65980da0c67f2f548aa4d
data/README.md CHANGED
@@ -16,7 +16,10 @@ gem install virust-locator-ruby
16
16
 
17
17
  ## Usage
18
18
 
19
+ ```ruby
20
+ require 'virust_locator'
19
21
  VirustLocator::Locator.exec("GAAAGCATAGTAATATGGGGAAAGACTCCTAAA")
22
+ ```
20
23
 
21
24
  =>
22
25
 
@@ -40,6 +43,20 @@ Options:
40
43
 
41
44
  -V, --version Print version
42
45
 
46
+ ## Change Log
47
+
48
+ ### v0.3.0
49
+
50
+ 1. Fixed a bug for displaying the aligned sequences.
51
+
52
+ 2. Now allow multiple sequences to be run at one time. When running multiple sequences in one query (seperate each with [whitespace]), return object is the locator results one line per query.
53
+
54
+ ### v0.2.0
55
+
56
+ 1. Fixed a bug for showing the aligned sequences.
57
+
58
+ 2. Fixed a bug that slowed down the performance.
59
+
43
60
  ## Contributing
44
61
 
45
62
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/virust-locator-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/virust-locator-ruby/blob/main/CODE_OF_CONDUCT.md).
@@ -10,7 +10,7 @@ module VirustLocator
10
10
  # Locator.exec("GAAAGCATAGTAATATGGGGAAAGACTCCTAAA")
11
11
  # => "3681\t3713\t100\tfalse\tGAAAGCATAGTAATATGGGGAAAGACTCCTAAA\tGAAAGCATAGTAATATGGGGAAAGACTCCTAAA"
12
12
  module Locator
13
- def self.exec(query, type = "nt", algorithm = "1", ref = "HXB2") # rubocop:disable Metrics/MethodLength
13
+ def self.init # rubocop:disable Metrics/MethodLength
14
14
  file = case RUBY_PLATFORM
15
15
  when /arm64-darwin/
16
16
  "virust-locator-aarch64-apple-darwin"
@@ -25,12 +25,15 @@ module VirustLocator
25
25
  else
26
26
  raise "Unsupported platform: #{RUBY_PLATFORM}"
27
27
  end
28
-
29
28
  file = File.join(File.dirname(__FILE__), "runnable", file)
30
- safe_file = Shellwords.escape(file)
31
29
  raise "Excecutable file not found: #{file}" unless File.exist?(file)
32
30
 
33
- `#{safe_file} -q #{Shellwords.escape(query)} -t #{Shellwords.escape(type)} -a #{Shellwords.escape(algorithm)} -r #{Shellwords.escape(ref)}`.strip # rubocop:disable Layout/LineLength
31
+ Shellwords.escape(file)
32
+ end
33
+
34
+ def self.exec(query, type = "nt", algorithm = "1", ref = "HXB2")
35
+ safe_file = init
36
+ `#{safe_file} -q #{query} -t #{type} -a #{algorithm} -r #{ref}`.strip
34
37
  end
35
38
  end
36
39
  end
@@ -3,5 +3,5 @@
3
3
 
4
4
  module VirustLocator
5
5
  # The version of the virust-locator-ruby gem.
6
- VERSION = "0.1.0"
6
+ VERSION = "0.3.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virust-locator-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shuntai Zhou