vienna_rna 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: 125876026dfe4b5bf2af8e12fe1425c79ce2c41f
4
- data.tar.gz: 28cff69aaabc513509da57f049928b7d1f62dc82
3
+ metadata.gz: 79dd44b4836a93bc3e52e940d0b5c8f489a27eb2
4
+ data.tar.gz: d6a763e1548196913b62d0bf94f828fd4070b475
5
5
  SHA512:
6
- metadata.gz: ce4c556d37c020f386d076a96372602eb68ff3bbc6248ce801f2e8048e550bb5aac94daae9e200cf3c2db2deb9704123141c3d07ef1ff6f63a5b44d0cd940961
7
- data.tar.gz: dce9820a4cd5a0ae1b86b6aa329cff3b6373d5ea9892a156940097e58955f793be3e7ecbd902ab7340cc6db112169151302998805e1278842780ce3e6a3fb6d7
6
+ metadata.gz: c8998ee77448b339a1daef102e735a47e8e4e4a6fe83dff9f2ed90473e05bff114fa6aba2a542b8b5e7c82a1ac9916fedfd648b31ece9df3f411a2091ee51be1
7
+ data.tar.gz: 54dfa5dd360117d3fa3429c9dc49100097e8a3572130f059b0aed6db67c2af7c52ae5e4969b05f604027c25123aacaf5f67bc0a24da6dddcd117fd24792bfd45
data/README.md CHANGED
@@ -1,11 +1,18 @@
1
1
  A simple gem for facilitating bindings to the ViennaRNA package (http://www.tbi.univie.ac.at/~ivo/RNA/). Note that this gem makes no effort to build and install the ViennaRNA suite locally at this time, and instead relies on its presence on the host machine. Leverages the BioRuby gem (http://bioruby.open-bio.org/) libraries for file parsing.
2
2
 
3
3
  Simple use case:
4
- ruby-1.9.3-p125 :001 > require "vienna_rna"
5
- => true
6
- ruby-1.9.3-p125 :002 > rna = ViennaRna::Fold.run(seq: "CCUCGAGGGGAACCCGAAAGGGACCCGAGAGG")
7
- => #<ViennaRna::Fold:0x007f9c48839dc0>
8
- ruby-1.9.3-p125 :003 > rna.structure
9
- => "((((..(((...(((....))).)))..))))"
10
- ruby-1.9.3-p125 :004 > rna.mfe
11
- => -19.7
4
+ > require "vienna_rna"
5
+ #=> true
6
+ > rna = ViennaRna::Fold.run(seq: "CCUCGAGGGGAACCCGAAAGGGACCCGAGAGG")
7
+ #=> #<ViennaRna::Fold:0x007f9c48839dc0>
8
+ > rna.structure
9
+ #=> "((((..(((...(((....))).)))..))))"
10
+ > rna.mfe
11
+ #=> -19.7
12
+
13
+ ... now an even easier way ...
14
+
15
+ > mfe_rna = RNA("CCUCGAGGGGAACCCGAAAGGGACCCGAGAGG").run(:fold).mfe_rna
16
+ #=> echo CCUCGAGGGGAACCCGAAAGGGACCCGAGAGG | rnafold --noPS
17
+ #=> Total runtime: 0.013 sec.
18
+ #=> #<ViennaRna::ViennaRna::Rna CCUCGAGGGGAACCCGAAAG... ((((..(((...(((....) [truncated]>
@@ -4,7 +4,8 @@ module ViennaRna
4
4
  base.extend(ClassMethods)
5
5
  base.send(:include, InstanceMethods)
6
6
  base.extend(StructureBasedClassAndInstanceMethods)
7
-
7
+
8
+ # All the methods in here are also copied in as instance methods, where the first argument is the ViennaRna::Rna#structure
8
9
  base.class_eval do
9
10
  StructureBasedClassAndInstanceMethods.public_instance_methods.each do |class_method|
10
11
  define_method(class_method) do |*args|
@@ -34,8 +35,6 @@ module ViennaRna
34
35
  end
35
36
 
36
37
  module StructureBasedClassAndInstanceMethods
37
- # All the methods in here are also copied in as instance methods, where the first argument is the ViennaRna::Rna#structure
38
-
39
38
  def bp_distance(structure_1, structure_2)
40
39
  # Takes two structures and calculates the distance between them by |symmetric difference(bp_in_a, bp_in_b)|
41
40
  raise "The two structures are not the same length" unless structure_1.length == structure_2.length
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vienna_rna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Senter