gene-matcher 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/alignment.rb +16 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 829cbe42a19bf6eb809358fe514714377cc7a8a856b1d2a21070760962c60d02
4
- data.tar.gz: 04545fb06b196d235531d125575e246e268c7e526f9684db5fb37079b66b9844
3
+ metadata.gz: 994ce901fa0a9e406f841ee1b6ba797c525b25166addf9aec9255e01dbb97946
4
+ data.tar.gz: edce47268a1060b59ab9c070583e4c9473cf815dac0f91dc5acc781d7ae04961
5
5
  SHA512:
6
- metadata.gz: '0854fc5cac30e888a57dda0fbda709145fe206be6acea8a29493e793075e14633a33d5ee4fa57b6b84ea4e3baa660f7a869fc14a1d51a22fc930f16f377ed2ac'
7
- data.tar.gz: 23e94a7632e246589b347ad9c87445780046b3d2bf1e44ae94691ea065fe22141a7d3cb12f3b1d05b855c9f2c76682577aeeef92bad2e6ccabad6b135ef00285
6
+ metadata.gz: 9cbacf6508cc5bb007529092b530ebe8a5f164be10bbab54401f9ef2ffbf823f1ce6c2ea00dff2f451fc31649e370a9e6db6f3f3e4dabb94a53ecaad84ce1a8d
7
+ data.tar.gz: 6d622d0e756f56a15bbe23b9a20ac2d07288c39389f0f64d122521c0eac7dbad1c05b5b6026b020d20550b81445cb5d82299b4c123480b4e18569e6fe36e3f96
data/lib/alignment.rb CHANGED
@@ -3,7 +3,8 @@ class Alignment
3
3
 
4
4
  BLANK = "-"
5
5
 
6
- def initialize
6
+ def initialize(h=nil)
7
+ return init_from_hash(h) if h
7
8
  # スコア
8
9
  @score = 0
9
10
  # 検索対象(データベースに入っていた)配列
@@ -24,6 +25,20 @@ class Alignment
24
25
  @source = ""
25
26
  end
26
27
 
28
+ def init_from_hash(h)
29
+ # 引数のハッシュから初期化
30
+ @score = h[:score]
31
+ @alignmentI = h[:alignmentI]
32
+ @alignmentJ = h[:alignmentJ]
33
+ @startI = h[:startI]
34
+ @startJ = h[:startJ]
35
+ @endI = h[:endI]
36
+ @endJ = h[:endJ]
37
+ @reversed = h[:reversed]
38
+ @aside = h[:aside]
39
+ @source = h[:source]
40
+ end
41
+
27
42
  # 二つの配列の一致部分と不一致部分を表した文字列を返す。
28
43
  # ex. AGTCAAAAAAAAA- :...:::::::::. AT-TAAAAAAAAAG
29
44
  #
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.1
4
+ version: 0.1.2
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-08-02 00:00:00.000000000 Z
11
+ date: 2023-08-20 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