qu-thermo 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c76137b4b3ca987df2112ff6ed774e2aace0be69
4
+ data.tar.gz: bb0c6b08e3b262344a3a441f069a812797c0450b
5
+ SHA512:
6
+ metadata.gz: 3af235456aad35965f49abeda1771313a27122ec846bc029d55ebf434ce82286588783796c5f7f022e38596ba41fe0ec29f7fa91f70a9542df966a18ffd9eeea
7
+ data.tar.gz: 97420eaaeb38f51cbfdab5be8974e90769b031eb4c3a2fa6d623c4f8e6bafc7a5687d6415b94fa02a6fdc5a6016d7063fd7a88a9d5a84246b682a7dc3ad41671
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in qu-thermo.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Wubin Qu
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Qu::Thermo
2
+
3
+ A thermodynamics library for calculating DNA/DNA binding energy
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'qu-thermo'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install qu-thermo
18
+
19
+ ## Usage
20
+
21
+ `tm = Qu::Thermo::Hybrid.new(seq_1, seq_2).tm`
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/lib/qu/thermo.rb ADDED
@@ -0,0 +1,69 @@
1
+ require "qu/thermo/version"
2
+ require_relative "thermo/parameters"
3
+
4
+
5
+ module Qu
6
+ module Thermo
7
+ class Hybrid
8
+ def initialize(qseq, sseq, mono=50, diva=1.5, dntp=0.25, oligo=50)
9
+ # qseq: 5' -> 3'
10
+ # sseq: 3' -> 5'
11
+ @qseq = qseq.upcase
12
+ @sseq = sseq.upcase
13
+ @mono = mono.to_f
14
+ @diva = diva.to_f
15
+ @dntp = dntp.to_f
16
+ @oligo = oligo.to_f
17
+
18
+ @dh, @ds = delta_hs
19
+ @adjusted_mono = (@mono + diva2mono) / 1000.0
20
+ @adjusted_ds = @ds + 0.368 * (@sseq.size - 1) * Math.log(@adjusted_mono, Math::E)
21
+ end
22
+
23
+ def dg
24
+ (@dh * 1000 - (273.15 + 37) * @adjusted_ds) / 1000.0
25
+ end
26
+
27
+ def tm
28
+ @dh * 1000.0 / (@adjusted_ds + 1.987 * Math.log(@oligo / 1000000000.0 / 4, Math::E)) - 273.15
29
+ end
30
+
31
+ def dg_tm
32
+ return dg, tm
33
+ end
34
+
35
+ private
36
+
37
+ def diva2mono
38
+ @dntp = 0 if @diva == 0
39
+
40
+ $stderr.puts "Error conc for diva and mono" if @diva < 0 or @dntp < 0
41
+
42
+ @diva = @dntp if @diva < @dntp
43
+
44
+ return 120 * (Math.sqrt(@diva - @dntp))
45
+ end
46
+
47
+ def delta_hs
48
+ init_start = "init#{@qseq[0]}#{@sseq[0]}"
49
+ init_stop = "init#{@qseq[-1]}#{@sseq[-1]}"
50
+
51
+ dh = ds = 0
52
+ if DH.include?(init_start) and DH.include?(init_stop)
53
+ dh = DH[init_start] + DH[init_stop]
54
+ ds = DS[init_start] + DS[init_stop]
55
+ end
56
+
57
+ (0...(@qseq.size - 1)).each do |i|
58
+ dinuc = "#{@qseq[i...(i+2)]}#{@sseq[i...(i+2)]}"
59
+ if DH.include?(dinuc) and DS.include?(dinuc)
60
+ dh += DH[dinuc]
61
+ ds += DS[dinuc]
62
+ end
63
+ end
64
+
65
+ return dh, ds
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,283 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*- #
3
+ =begin
4
+ Thermodynamics Parameters for calculating Tm and Gibbs free energy
5
+
6
+ References
7
+
8
+ Matched base-pair =>
9
+
10
+ [1] SantaLucia JR (1998) "A unified view of polymer, dumbbell
11
+ and oligonucleotide DNA nearest-neighbor thermodynamics", Proc Natl
12
+ Acad Sci 95=>1460-65 http=>//dx.doi.org/10.1073/pnas.95.4.1460.
13
+
14
+ Mismatched base-pair =>
15
+
16
+ [1]. Allawi, H.T. and SantaLucia, J. (1997) Thermodynamics and NMR
17
+ of internal GT mismatches in DNA, Biochemistry, 36, 10581-10594.
18
+ [2]. Allawi, H.T. and SantaLucia, J. (1998) Nearest-neighbor
19
+ thermodynamics of internal A center dot C mismatches in
20
+ DNA=> Sequence dependence and pH effects, Biochemistry, 37, 9435-9444.
21
+ [3]. Allawi, H.T. and SantaLucia, J. (1998) Nearest neighbor
22
+ thermodynamic parameters for internal G center dot A mismatches
23
+ in DNA, Biochemistry, 37, 2170-2179.
24
+ [4]. Allawi, H.T. and Santalucia, J. (1998) Thermodynamics of
25
+ internal C center dot T mismatches in DNA, Nucleic Acids
26
+ Research, 26, 2694-2701.
27
+
28
+ NN model =>
29
+
30
+ [1] SantaLucia, J. (1998) A unified view of polymer, dumbbell, and oligonucleotide DNA nearest-neighbor thermodynamics, Proceedings of the National Academy of Sci-ences of the United States of America, 95, 1460-1465.
31
+
32
+ [2] von Ahsen, N., Wittwer, C.T. and Schutz, E. (2001) Oligonucleotide melting tempera-tures under PCR conditions=> Nearest-neighbor corrections for Mg2+, deoxynu-cleotide triphosphate, and dimethyl sulfoxide concentrations with comparison to alternative empirical formulas, Clinical Chemistry, 47, 1956-1961.
33
+
34
+ by Wubin Qu <quwubin@gmail.com>
35
+ Copyright @ 2010, All Rights Reserved.
36
+ =end
37
+
38
+ module Qu
39
+ module Thermo
40
+ DH = {
41
+ 'AATT' => -7.9, 'TTAA' => -7.9,
42
+ 'ATTA' => -7.2, 'TAAT' => -7.2,
43
+ 'CAGT' => -8.5, 'TGAC' => -8.5,
44
+ 'GTCA' => -8.4, 'ACTG' => -8.4,
45
+ 'CTGA' => -7.8, 'AGTC' => -7.8,
46
+ 'GACT' => -8.2, 'TCAG' => -8.2,
47
+ 'CGGC' => -10.6, 'GCCG' => -9.8,
48
+ 'GGCC' => -8.0, 'CCGG' => -8.0,
49
+ 'initCG' => 0.1, 'initGC' => 0.1,
50
+ 'initAT' => 2.3, 'initTA' => 2.3,
51
+ # Like pair mismatches
52
+ 'AATA' => 1.2, 'ATAA' => 1.2,
53
+ 'CAGA' => -0.9, 'AGAC' => -0.9,
54
+ 'GACA' => -2.9, 'ACAG' => -2.9,
55
+ 'TAAA' => 4.7, 'AAAT' => 4.7,
56
+ 'ACTC' => 0.0, 'CTCA' => 0.0,
57
+ 'CCGC' => -1.5, 'CGCC' => -1.5,
58
+ 'GCCC' => 3.6, 'CCCG' => 3.6,
59
+ 'TCAC' => 6.1, 'CACT' => 6.1,
60
+ 'AGTG' => -3.1, 'GTGA' => -3.1,
61
+ 'CGGG' => -4.9, 'GGGC' => -4.9,
62
+ 'GGCG' => -6.0, 'GCGG' => -6.0,
63
+ 'TGAG' => 1.6, 'GAGT' => 1.6,
64
+ 'ATTT' => -2.7, 'TTTA' => -2.7,
65
+ 'CTGT' => -5.0, 'TGTC' => -5.0,
66
+ 'GTCT' => -2.2, 'TCTG' => -2.2,
67
+ 'TTAT' => 0.2, 'TATT' => 0.2,
68
+ # G.T mismatches
69
+ 'AGTT' => 1.0, 'TTGA' => 1.0,
70
+ 'ATTG' => -2.5, 'GTTA' => -2.5,
71
+ 'CGGT' => -4.1, 'TGGC' => -4.1,
72
+ 'CTGG' => -2.8, 'GGTC' => -2.8,
73
+ 'GGCT' => 3.3, 'TCGG' => 3.3,
74
+ 'GGTT' => 5.8, 'TTGG' => 5.8,
75
+ 'GTCG' => -4.4, 'GCTG' => -4.4,
76
+ 'GTTG' => 4.1, 'GTTG' => 4.1,
77
+ 'TGAT' => -0.1, 'TAGT' => -0.1,
78
+ 'TGGT' => -1.4, 'TGGT' => -1.4,
79
+ 'TTAG' => -1.3, 'GATT' => -1.3,
80
+ #G.A mismatches
81
+ 'AATG' => -0.6, 'GTAA' => -0.6,
82
+ 'AGTA' => -0.7, 'ATGA' => -0.7,
83
+ 'CAGG' => -0.7, 'GGAC' => -0.7,
84
+ 'CGGA' => -4.0, 'AGGC' => -4.0,
85
+ 'GACG' => -0.6, 'GCAG' => -0.6,
86
+ 'GGCA' => 0.5, 'ACGG' => 0.5,
87
+ 'TAAG' => 0.7, 'GAAT' => 0.7,
88
+ 'TGAA' => 3.0, 'AAGT' => 3.0,
89
+ #C.T mismatches
90
+ 'ACTT' => 0.7, 'TTCA' => 0.7,
91
+ 'ATTC' => -1.2, 'CTTA' => -1.2,
92
+ 'CCGT' => -0.8, 'TGCC' => -0.8,
93
+ 'CTGC' => -1.5, 'CGTC' => -1.5,
94
+ 'GCCT' => 2.3, 'TCCG' => 2.3,
95
+ 'GTCC' => 5.2, 'CCTG' => 5.2,
96
+ 'TCAT' => 1.2, 'TACT' => 1.2,
97
+ 'TTAC' => 1.0, 'CATT' => 1.0,
98
+ #A.C mismatches
99
+ 'AATC' => 2.3, 'CTAA'=>2.3,
100
+ 'ACTA' => 5.3, 'ATCA'=>5.3,
101
+ 'CAGC' => 1.9, 'CGAC'=>1.9,
102
+ 'CCGA' => 0.6, 'AGCC'=>0.6,
103
+ 'GACC' => 5.2, 'CCAG'=>5.2,
104
+ 'GCCA' => -0.7, 'ACCG'=>-0.7,
105
+ 'TAAC' => 3.4, 'CAAT'=>3.4,
106
+ 'TCAA' => 7.6, 'AACT'=>7.6,
107
+
108
+ #tandem mismatch
109
+ 'GGTT' => 5.8, 'TTGG' => 5.8,
110
+ 'GTTG' => 4.1, 'TGGT' => -1.4,
111
+ 'GTTT' => 5.8, 'TTTG' => 5.8,
112
+ 'GTAT' => -0.1, 'TATG' => -0.1,
113
+ #single bulge loop
114
+ 'AAAT-T' => -4.0, 'AATT-A' => -13.5, 'AACT-G' => 10.2, 'AAGT-C' => -0.2,
115
+ 'ATAT-T' => 9.8, 'ATTT-A' => -19.5, 'ATCT-G' => -4.8, 'ATGT-C' => 5.6,
116
+ 'ACAT-T' => 6.1, 'ACTT-A' => -3.4, 'ACCT-G' => -29.1, 'ACGT-C' => -1.2,
117
+ 'AGAT-T' => 15.5, 'AGTT-A' => 5.3, 'AGCT-G' => -7.2, 'AGGT-C' => 5.7,
118
+ 'TAAA-T' => 15.3, 'TATA-A' => 19.8, 'TACA-G' => -2.3, 'TAGA-C' => 15,
119
+ 'TTAA-T' => -2.7, 'TTTA-A' => -8.2, 'TTCA-G' => 8.8, 'TTGA-C' => 7.0,
120
+ 'TCAA-T' => 1.6, 'TCTA-A' => 9.9, 'TCCA-G' => -15.2, 'TCGA-C' => -0.7,
121
+ 'TGAA-T' => -12.3, 'TGTA-A' => 20.9, 'TGCA-G' => 2.6, 'TGGA-C' => -9.2,
122
+ 'CAAG-T' => -14.4, 'CATG-A' => -7.0, 'CACG-G' => 4.3, 'CAGG-C' => -2.9,
123
+ 'CTAG-T' => -18.7, 'CTTG-A' => -4.6, 'CTCG-G' => -14.5, 'CTGG-C' => -4.7,
124
+ 'CCAG-T' => 5.8, 'CCTG-A' => -5.3, 'CCCG-G' => -2.6, 'CCGG-C' => 9.1,
125
+ 'CGAG-T' => -14.7, 'CGTG-A' => 2.1, 'CGCG-G' => -4.4, 'CGGG-C' => -16.4,
126
+ 'GAAC-T' => -6.8, 'GATC-A' => -9.8, 'GACC-G' => -4.8, 'GAGC-C' => -6.5,
127
+ 'GTAC-T' => -7.4, 'GTTC-A' => 1.8, 'GTCC-G' => -12.3, 'GTGC-C' => -2.3,
128
+ 'GCAC-T' => -2.1, 'GCTC-A' => -3.5, 'GCCC-G' => 0.4, 'GCGC-C' => 13.8,
129
+ 'GGAC-T' => 2.7, 'GGTC-A' => -1.2, 'GGCC-G' => -1.7, 'GGGC-C' => 3.5,
130
+ # single dangling_end
131
+ 'AA-T' => 0.2, 'TA-T' => -6.9, 'GA-T' => -1.1, 'CA-T' => 0.6,
132
+ 'AC-G' => -6.3, 'TC-G' => -4.0, 'GC-G' => -5.1, 'CC-G' => -4.4,
133
+ 'AG-C' => -3.7, 'TG-C' => -4.9, 'GG-C' => -3.9, 'CG-C' => -4.0,
134
+ 'AT-A' => -2.9, 'TT-A' => -0.2, 'GT-A' => -4.2, 'CT-A' => -4.1,
135
+ 'AAT-' => -0.5, 'ACT-' => 4.7, 'AGT-' => -4.1, 'ATT-' => -3.8,
136
+ 'TAA-' => -0.7, 'TCA-' => 4.4, 'TGA-' => -1.6, 'TTA-' => 2.9,
137
+ 'GAC-' => -2.1, 'GCC-' => -0.2, 'GGC-' => -3.9, 'GTC-' => -4.4,
138
+ 'CAG-' => -5.9, 'CCG-' => -2.6, 'CGG-' => -3.2, 'CTG-' => -5.2,
139
+ # long dangling_end
140
+ 'CAAG--' => -2.15, 'CAAAG---' => -3.3, 'CAAAAG----' => -4.85,
141
+ 'TAAA--' => -1.0, 'TAAAA---' => -1.95, 'TAAAAA----' => -2.35,
142
+ 'AAA--T' => -1.5, 'AAAA---T' => -1.75, 'AAAAA----T' => -3.95,
143
+ 'AAG--C' => -0.25, 'AAAG---C' => -0.15, 'AAAAG----C' => -0.75,
144
+ }
145
+
146
+ #--------------------#
147
+ # deltaS (cal/K.mol) #
148
+ #--------------------#
149
+ DS = {
150
+ 'AATT' => -22.2, 'TTAA'=>-22.2,
151
+ 'ATTA' => -20.4, 'TAAT'=>-21.3,
152
+ 'CAGT' => -22.7, 'TGAC'=>-22.7,
153
+ 'GTCA' => -22.4, 'ACTG'=>-22.4,
154
+ 'CTGA' => -21.0, 'AGTC'=>-21.0,
155
+ 'GACT' => -22.2, 'TCAG'=>-22.2,
156
+ 'CGGC' => -27.2, 'GCCG'=>-24.4,
157
+ 'GGCC' => -19.9, 'CCGG'=>-19.9,
158
+ 'initCG' => -2.8, 'initGC'=>-2.8,
159
+ 'initAT' => 4.1, 'initTA'=>4.1,
160
+ 'sym' => -1.4,
161
+ # => Like=>pair=>mismatches
162
+ 'AATA' => 1.7, 'ATAA'=>1.7,
163
+ 'CAGA' => -4.2, 'AGAC'=>-4.2,
164
+ 'GACA' => -9.8, 'ACAG'=>-9.8,
165
+ 'TAAA' => 12.9, 'AAAT'=>12.9,
166
+ 'ACTC' => -4.4, 'CTCA'=>-4.4,
167
+ 'CCGC' => -7.2, 'CGCC'=>-7.2,
168
+ 'GCCC' => 8.9, 'CCCG'=>8.9,
169
+ 'TCAC' => 16.4, 'CACT'=>16.4,
170
+ 'AGTG' => -9.5, 'GTGA'=>-9.5,
171
+ 'CGGG' => -15.3, 'GGGC'=>-15.3,
172
+ 'GGCG' => -15.8, 'GCGG'=>-15.8,
173
+ 'TGAG' => 3.6, 'GAGT'=>3.6,
174
+ 'ATTT' => -10.8, 'TTTA'=>-10.8,
175
+ 'CTGT' => -15.8, 'TGTC'=>-15.8,
176
+ 'GTCT' => -8.4, 'TCTG'=>-8.4,
177
+ 'TTAT' => -1.5, 'TATT'=>-1.5,
178
+ # => G.T=>mismatches
179
+ 'AGTT' => 0.9, 'TTGA'=>0.9,
180
+ 'ATTG' => -8.3, 'GTTA'=>-8.3,
181
+ 'CGGT' => -11.7, 'TGGC'=>-11.7,
182
+ 'CTGG' => -8.0, 'GGTC'=>-8.0,
183
+ 'GGCT' => 10.4, 'TCGG'=>10.4,
184
+ 'GGTT' => 16.3, 'TTGG'=>16.3,
185
+ 'GTCG' => -12.3, 'GCTG'=>-12.3,
186
+ 'GTTG' => 9.5, 'GTTG'=>9.5,
187
+ 'TGAT' => -1.7, 'TAGT'=>-1.7,
188
+ 'TGGT' => -6.2, 'TGGT'=>-6.2,
189
+ 'TTAG' => -5.3, 'GATT'=>-5.3,
190
+ # G.A mismatches
191
+ 'AATG' => -2.3, 'GTAA' => -2.3,
192
+ 'AGTA' => -2.3, 'ATGA' => -2.3,
193
+ 'CAGG' => -2.3, 'GGAC' => -2.3,
194
+ 'CGGA' => -13.2, 'AGGC' => -13.2,
195
+ 'GACG' => -1.0, 'GCAG' => -1.0,
196
+ 'GGCA' => 3.2, 'ACGG' => 3.2,
197
+ 'TAAG' => 0.7, 'GAAT' => 0.7,
198
+ 'TGAA' => 7.4, 'AAGT' => 7.4,
199
+ # C.T mismatches
200
+ 'ACTT' => 0.2, 'TTCA' => 0.2,
201
+ 'ATTC' => -6.2, 'CTTA' => -6.2,
202
+ 'CCGT' => -4.5, 'TGCC' => -4.5,
203
+ 'CTGC' => -6.1, 'CGTC' => -6.1,
204
+ 'GCCT' => 5.4, 'TCCG' => 5.4,
205
+ 'GTCC' => 13.5, 'CCTG' => 13.5,
206
+ 'TCAT' => 0.7, 'TACT' => 0.7,
207
+ 'TTAC' => 0.7, 'CATT' => 0.7,
208
+ # A.C mismatches
209
+ 'AATC' => 4.6, 'CTAA' => 4.6,
210
+ 'ACTA' => 14.6, 'ATCA' => 14.6,
211
+ 'CAGC' => 3.7, 'CGAC' => 3.7,
212
+ 'CCGA' => -0.6, 'AGCC' => -0.6,
213
+ 'GACC' => 14.2, 'CCAG' => 14.2,
214
+ 'GCCA' => -3.8, 'ACCG' => -3.8,
215
+ 'TAAC' => 8.0, 'CAAT' => 8.0,
216
+ 'TCAA' => 20.2, 'AACT' => 20.2,
217
+ # tandem mismatch
218
+ 'GGTT' => 16.3, 'TTGG' => 16.3,
219
+ 'GTTG' => 9.5, 'TGGT' => -6.2,
220
+ 'GTTT' => 16.3, 'TTTG' => 16.3,
221
+ 'GTAT' => -1.7, 'TATG' => -1.7,
222
+ # single bulge loop
223
+ 'AAAT-T' => -17.5, 'AATT-A' => -44.6, 'AACT-G' => 25.8, 'AAGT-C' => -4.6,
224
+ 'ATAT-T' => 24.7, 'ATTT-A' => -61.8, 'ATCT-G' => -20.0, 'ATGT-C' => 12.9,
225
+ 'ACAT-T' => 14.0, 'ACTT-A' => -15.3, 'ACCT-G' => -91.3, 'ACGT-C' => -7.4,
226
+ 'AGAT-T' => 43.1, 'AGTT-A' => 10.6, 'AGCT-G' => -28.4, 'AGGT-C' => 14.4,
227
+ 'TAAA-T' => 38.5, 'TATA-A' => 56.7, 'TACA-G' => -12.7, 'TAGA-C' => 40.4,
228
+ 'TTAA-T' => -16.0, 'TTTA-A' => -30.1, 'TTCA-G' => 23.2, 'TTGA-C' => 17.5,
229
+ 'TCAA-T' => -3.9, 'TCTA-A' => 30.5, 'TCCA-G' => -48.7, 'TCGA-C' => -7.0,
230
+ 'TGAA-T' => -47.0, 'TGTA-A' => 59.8, 'TGCA-G' => 1.6, 'TGGA-C' => -31.4,
231
+ 'CAAG-T' => -46.6, 'CATG-A' => -25.8, 'CACG-G' => 8.8, 'CAGG-C' => -13.0,
232
+ 'CTAG-T' => -61.7, 'CTTG-A' => -17.0, 'CTCG-G' => -48.1, 'CTGG-C' => -18.8,
233
+ 'CCAG-T' => 13.4, 'CCTG-A' => -24.8, 'CCCG-G' => -9.4, 'CCGG-C' => 24.4,
234
+ 'CGAG-T' => -49.6, 'CGTG-A' => 6.5, 'CGCG-G' => -17.8, 'CGGG-C' => -51.6,
235
+ 'GAAC-T' => -25.2, 'GATC-A' => -35.6, 'GACC-G' => -18.3, 'GAGC-C' => -21.0,
236
+ 'GTAC-T' => -27.0, 'GTTC-A' => -0.6, 'GTCC-G' => -40.0, 'GTGC-C' => -10.0,
237
+ 'GCAC-T' => -12.5, 'GCTC-A' => -16.1, 'GCCC-G' => -1.0, 'GCGC-C' => 42.9,
238
+ 'GGAC-T' => 3.6, 'GGTC-A' => -9.3, 'GGCC-G' => -7.2, 'GGGC-C' => 8.5,
239
+ # single dangling_end
240
+ 'AA-T' => 2.3, 'TA-T' => -20.0, 'GA-T' => -1.6, 'CA-T' => 3.3,
241
+ 'AC-G' => -17.1, 'TC-G' => -10.9, 'GC-G' => -14.0, 'CC-G' => -12.6,
242
+ 'AG-C' => -10, 'TG-C' => -13.8, 'GG-C' => -10.9, 'CG-C' => -11.9,
243
+ 'AT-A' => -7.6, 'TT-A' => -0.5, 'GT-A' => -15.0, 'CT-A' => -13.0,
244
+ 'AAT-' => -1.1, 'ACT-' => 14.2, 'AGT-' => -13.1, 'ATT-' => -12.6,
245
+ 'TAA-' => -0.8, 'TCA-' => 14.9, 'TGA-' => -3.6, 'TTA-' => 10.4,
246
+ 'GAC-' => -3.9, 'GCC-' => -0.1, 'GGC-' => -11.2, 'GTC-' => -13.1,
247
+ 'CAG-' => -16.5, 'CCG-' => -7.4, 'CGG-' => -10.4, 'CTG-' => -15.0,
248
+ # long dangling_end
249
+ 'CAAG--' => -5.5, 'CAAAG---' => -8.5, 'CAAAAG----' => -13.5,
250
+ 'TAAA--' => -1.0, 'TAAAA---' => -4.5, 'TAAAAA----' => -6.0,
251
+ 'AAA--T' => -2.5, 'AAAA---T' => -3.5, 'AAAAA----T' => -10.5,
252
+ 'AAG--C' => 0.5, 'AAAG---C' => 1.5, 'AAAAG----C' => -0.5,
253
+ }
254
+
255
+ LONG_BULGE_LOOP_DS = {
256
+ '2' => -9.35, '3' => -10.0, '4' => -10.32, '5' => -10.64, '6' => -11.28,
257
+ '7' => -11.93, '8' => -12.57, '9' => -13.22, '10' => -13.86, '11' => -14.15,
258
+ '12' => -14.51, '13' => -15.00, '14' => -15.48, '15' => -15.65, '16' => -16.12,
259
+ '17' => -16.26, '18' => -16.77, '19' => -16.80, '20' => -17.09,
260
+ }
261
+
262
+ TANDEM_MISMATCH = {
263
+ 'GT' => ['TT', 'AT', 'TG'],
264
+ 'TT' => ['TG', 'GG'],
265
+ 'TG' => ['GT'],
266
+ 'GG' => ['TT'],
267
+ 'TA' => ['TG'],
268
+ }
269
+
270
+ PERFECT_MATCH = {
271
+ 'A' => 'T',
272
+ 'T' => 'A',
273
+ 'C' => 'G',
274
+ 'G' => 'C',
275
+ }
276
+
277
+
278
+ end
279
+ end
280
+
281
+ if $0 == __FILE__
282
+ p Qu::Thermo::DH
283
+ end
@@ -0,0 +1,5 @@
1
+ module Qu
2
+ module Thermo
3
+ VERSION = "1.0.0"
4
+ end
5
+ end
data/qu-thermo.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'qu/thermo/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "qu-thermo"
8
+ spec.version = Qu::Thermo::VERSION
9
+ spec.authors = ["Wubin Qu"]
10
+ spec.email = ["quwubin@gmail.com"]
11
+ spec.description = %q{A thermodynamics library for calculating DNA/DNA binding energy}
12
+ spec.summary = %q{Thermodynamics parameters and calculations}
13
+ spec.homepage = "https://github.com/quwubin/qu-thermo"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: qu-thermo
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Wubin Qu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: A thermodynamics library for calculating DNA/DNA binding energy
42
+ email:
43
+ - quwubin@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - lib/qu/thermo.rb
54
+ - lib/qu/thermo/parameters.rb
55
+ - lib/qu/thermo/version.rb
56
+ - qu-thermo.gemspec
57
+ homepage: https://github.com/quwubin/qu-thermo
58
+ licenses:
59
+ - MIT
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.2.0
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: Thermodynamics parameters and calculations
81
+ test_files: []