text_alignment 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c42bc61965d0707fb1c8bd9815b363b04dc7d598e6c3bbbc7e318e8d7df37c6
4
- data.tar.gz: a699745c6a92a5c980ca90add8d5e46128923fb774f204edb35514ed6b2df097
3
+ metadata.gz: 1ff237d2f6a69a7328f334b39dd355e2f35c45552219d874d4630957d80f3516
4
+ data.tar.gz: 133f403758f32ce67fa340cedab21bd02945525a9a004519e245340f9cd2f9fb
5
5
  SHA512:
6
- metadata.gz: 7f03b5fa91cb4056844c8a02a48321fedc8a8e7f5a617f720b325c5c8bc40f43bc1e0ffebd25bce82777e1efce2421f0926a4a37dbcfe244b3792a7a19fe103f
7
- data.tar.gz: cc5cd6a308fd99188b753ff28eb885e46aaf7b0dd51fa83046e2a12d9b9a4723eebdfa90be21ada755f7819362dc1974ff6f288b0799184880f19d235ae38ec6
6
+ metadata.gz: 050dc4978efd7e63a9862f4a8f5ac58e439e30c737d5a07bd6f5cd6dd9157be36324c12cec0957f4fe8b700265c54147701dd7bfd1d0107ecef84b31a20a95e7
7
+ data.tar.gz: e542e4a90a02e9d8063355edb47fba2284ffc29e02090c9adce691012d1130b7782f624665b2f7bf772140983e548a130476a7d604a2166f0b835a48f245051b
@@ -4,6 +4,7 @@ require 'text_alignment/lcs_min'
4
4
  require 'text_alignment/find_divisions'
5
5
  require 'text_alignment/lcs_comparison'
6
6
  require 'text_alignment/lcs_alignment'
7
+ require 'text_alignment/lcs_cdiff'
7
8
  require 'text_alignment/glcs_alignment'
8
9
  require 'text_alignment/mappings'
9
10
 
@@ -183,40 +184,32 @@ end
183
184
 
184
185
  if __FILE__ == $0
185
186
  require 'json'
186
- require 'text_alignment/lcs_cdiff'
187
+ require 'pp'
187
188
 
188
189
  str1 = "TI - Identification of a region which directs the monocytic activity of the\n colony-stimulating factor 1 (macrophage colony-stimulating factor) receptor\n promoter and binds PEBP2/CBF (AML1)."
189
190
  str2 = "Identification of a region which directs the monocytic activity of the colony-stimulating factor 1 (macrophage colony-stimulating factor) receptor promoter and binds PEBP2/CBF (AML1).\nThe receptor for the macrophage colony-stimulating factor (or colony-stimulating factor 1 [CSF-1]) is expressed from different promoters in monocytic cells and placental trophoblasts. We have demonstrated that the monocyte-specific expression of the CSF-1 receptor is regulated at the level of transcription by a tissue-specific promoter whose activity is stimulated by the monocyte/B-cell-specific transcription factor PU.1 (D.-E. Zhang, C.J. Hetherington, H.-M. Chen, and D.G. Tenen, Mol. Cell. Biol. 14:373-381, 1994). Here we report that the tissue specificity of this promoter is also mediated by sequences in a region II (bp -88 to -59), which lies 10 bp upstream from the PU.1-binding site. When analyzed by DNase footprinting, region II was protected preferentially in monocytic cells. Electrophoretic mobility shift assays confirmed that region II interacts specifically with nuclear proteins from monocytic cells. Two gel shift complexes (Mono A and Mono B) were formed with separate sequence elements within this region. Competition and supershift experiments indicate that Mono B contains a member of the polyomavirus enhancer-binding protein 2/core-binding factor (PEBP2/CBF) family, which includes the AML1 gene product, while Mono A is a distinct complex preferentially expressed in monocytic cells. Promoter constructs with mutations in these sequence elements were no longer expressed specifically in monocytes. Furthermore, multimerized region II sequence elements enhanced the activity of a heterologous thymidine kinase promoter in monocytic cells but not other cell types tested. These results indicate that the monocyte/B-cell-specific transcription factor PU.1 and the Mono A and Mono B protein complexes act in concert to regulate monocyte-specific transcription of the CSF-1 receptor."
190
191
 
191
- # anns1 = JSON.parse File.read(ARGV[0]), :symbolize_names => true
192
- # anns2 = JSON.parse File.read(ARGV[1]), :symbolize_names => true
193
192
 
194
193
  if ARGV.length == 2
195
- str1 = JSON.parse(File.read(ARGV[0]).strip)["text"]
196
- denotations = JSON.parse(File.read(ARGV[0]).strip, symbolize_names:true)[:denotations]
197
- str2 = JSON.parse(File.read(ARGV[1]).strip)["text"]
198
- # str1 = File.read(ARGV[0])
199
- # str2 = File.read(ARGV[1])
194
+ anns1 = JSON.parse File.read(ARGV[0].strip), :symbolize_names => true
195
+ anns2 = JSON.parse File.read(ARGV[1].strip), :symbolize_names => true
200
196
  end
201
197
 
202
- # dictionary = [["β", "beta"]]
203
- # align = TextAlignment::TextAlignment.new(str1, str2)
204
- align = TextAlignment::TextAlignment.new(str1, str2, TextAlignment::MAPPINGS)
198
+ str1 = anns1[:text]
199
+ str2 = anns2[:text]
205
200
 
206
- # p align.common_elements
207
- # puts "---------------"
208
- # p align.mapped_elements
201
+ denotations = anns1[:denotations]
209
202
 
203
+ align = TextAlignment::TextAlignment.new(str1, str2, TextAlignment::MAPPINGS)
210
204
  puts TextAlignment::sdiff2cdiff(align.sdiff)
211
- # p align
212
- # puts "-----"
205
+ puts "\n=====\n\n"
213
206
 
214
- # p denotations
215
- # puts "-----"
216
-
217
- # new_denotations = align.transform_hdenotations(denotations)
218
-
219
- # p new_denotations
220
- # puts "-----"
207
+ pp denotations
208
+ puts "-----"
209
+ new_denotations = align.transform_hdenotations(denotations)
210
+ pp new_denotations
221
211
 
212
+ # p align.common_elements
213
+ # puts "---------------"
214
+ # p align.mapped_elements
222
215
  end
@@ -1,3 +1,3 @@
1
1
  class TextAlignment
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: text_alignment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jin-Dong Kim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-10 00:00:00.000000000 Z
11
+ date: 2019-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-dictionary