gene-matcher 0.1.6 → 0.1.8
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 +4 -4
- data/lib/alignment.rb +1 -0
- data/lib/gene-matcher.rb +4 -2
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 5771710c52d3dbbae5d62459a0dc1d8252b328efd052b0237e12e70afea7fd3a
         | 
| 4 | 
            +
              data.tar.gz: '0548219e592497aafbe4c906bf1e516734cd491eb944a4ef42afa867c4f57a0f'
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 83ce39ab33b72100ed8bf91e9721fe327a7c4276f6ee778d166e263f4758278b24c6ea4f2b9f6a94348461c318af21748b52c20f8f6b2042323ea17c5cfcf8c7
         | 
| 7 | 
            +
              data.tar.gz: 882d7151d85c3e8c9f2437a4d7f29c078e643335abe1287a7991996542a30696c0fec2ead401773dc97c26b6757b22a273da5f56eae5f11365ff5e5771b99592
         | 
    
        data/lib/alignment.rb
    CHANGED
    
    
    
        data/lib/gene-matcher.rb
    CHANGED
    
    | @@ -2,11 +2,12 @@ | |
| 2 2 | 
             
            require_relative 'smith-waterman'
         | 
| 3 3 |  | 
| 4 4 | 
             
            class Matcher
         | 
| 5 | 
            -
              attr_accessor :input_sequence, :limit
         | 
| 5 | 
            +
              attr_accessor :input_sequence, :limit, :reserve_target_sequence
         | 
| 6 6 | 
             
              attr_reader :alignments
         | 
| 7 7 |  | 
| 8 8 | 
             
              def initialize(input_sequence, limit = 0.6)
         | 
| 9 9 | 
             
                @limit = limit
         | 
| 10 | 
            +
                @reserve_target_sequence = false
         | 
| 10 11 | 
             
                @input_sequence = input_sequence
         | 
| 11 12 | 
             
                @alignments = []
         | 
| 12 13 | 
             
              end
         | 
| @@ -14,7 +15,8 @@ class Matcher | |
| 14 15 | 
             
              def scan(target_sequence,source = {})
         | 
| 15 16 | 
             
                sw = SmithWaterman.instance
         | 
| 16 17 | 
             
                a = sw.alignment(target_sequence, @input_sequence)
         | 
| 17 | 
            -
                a.source = { | 
| 18 | 
            +
                a.source = {}.merge(source)
         | 
| 19 | 
            +
                a.source[:target_sequence] = target_sequence if @reserve_target_sequence
         | 
| 18 20 | 
             
                puts "#{a.score} / #{a.alignment_count} = #{a.score / a.alignment_count}" if ENV["DEBUG"]
         | 
| 19 21 | 
             
                @alignments += [a] if a.score / a.alignment_count >= @limit
         | 
| 20 22 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: gene-matcher
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.8
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - ITO Yosei
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023-09- | 
| 11 | 
            +
            date: 2023-09-12 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: Algorithm for determining similar regions between nucleic acid sequences.
         | 
| 14 14 | 
             
            email: y-itou@lumber-mill.co.jp
         |