]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed genbank and embl parsing of 5'UTR and 3'UTR
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 24 Jun 2013 10:55:33 +0000 (10:55 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 24 Jun 2013 10:55:33 +0000 (10:55 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@2187 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/lib/maasha/embl.rb
code_ruby/lib/maasha/genbank.rb

index 6d9d6b5e0bd5ef6278d1754698edbfacb2f9cc7c..66a53c066497bb8008694d7d556a05974a8d6d3b 100644 (file)
@@ -152,7 +152,7 @@ class EMBLFeatures
 
   def each
     while @entry[@i] and @entry[@i][0 ... 2] != "SQ"
-      if @entry[@i] =~ /^FT\s{3}([A-Za-z_-]+)/
+      if @entry[@i] =~ /^FT\s{3}([53'A-Za-z_-]+)/
         if want_feat? $1
           record = {}
 
@@ -160,7 +160,7 @@ class EMBLFeatures
 
           @j = @i + 1
 
-          while @entry[@j] and @entry[@j][0 ... 2] == "FT" and @entry[@j] !~ /^FT(\s{19}\/|\s{3}[A-Za-z_-])/
+          while @entry[@j] and @entry[@j][0 ... 2] == "FT" and @entry[@j] !~ /^FT(\s{19}\/|\s{3}[53'A-Za-z_-])/
             loc << @entry[@j].split(/\s+/, 2).last
             @j += 1
           end
@@ -186,7 +186,7 @@ class EMBLFeatures
     quals = {}
     k     = 0
 
-    while @entry[@j] and @entry[@j][0 ... 2] == "FT" and @entry[@j] !~ /^FT\s{3}[A-Za-z_-]/
+    while @entry[@j] and @entry[@j][0 ... 2] == "FT" and @entry[@j] !~ /^FT\s{3}[53'A-Za-z_-]/
       if @entry[@j] =~ /^FT\s{19}\/([^=]+)="([^"]+)/
         qual = $1
         val  = $2
@@ -194,7 +194,7 @@ class EMBLFeatures
         if want_qual? qual
           k = @j + 1
 
-          while @entry[k] and @entry[k][0 ... 2] == "FT" and @entry[k] !~ /^FT(\s{19}\/|\s{3}[A-Za-z_-])/
+          while @entry[k] and @entry[k][0 ... 2] == "FT" and @entry[k] !~ /^FT(\s{19}\/|\s{3}[53'A-Za-z_-])/
             val << @entry[k].split(/\s+/, 2).last.chomp('"')
             k += 1
           end
index b1c9f8734a7a7f6dac1df4c7a18a3d59a62e2af1..795de75652f1d84f7ec6fd91531e07fc929741b1 100644 (file)
@@ -147,7 +147,7 @@ class GenbankFeatures
 
   def each
     while @entry[@i] and @entry[@i] !~ /^ORIGIN/
-      if @entry[@i] =~ /^\s{5}([A-Za-z_-]+)/
+      if @entry[@i] =~ /^\s{5}([53'A-Za-z_-]+)/
         if want_feat? $1
           record = {}
 
@@ -155,7 +155,7 @@ class GenbankFeatures
 
           @j = @i + 1
 
-          while @entry[@j] and @entry[@j] !~ /^(\s{21}\/|\s{5}[A-Za-z_-]|[A-Z])/
+          while @entry[@j] and @entry[@j] !~ /^(\s{21}\/|\s{5}[53'A-Za-z_-]|[A-Z])/
             loc << @entry[@j].lstrip
             @j += 1
           end
@@ -181,7 +181,7 @@ class GenbankFeatures
     quals = {}
     k     = 0
 
-    while @entry[@j] and @entry[@j] !~ /^\s{5}[A-Za-z_-]|^[A-Z]/
+    while @entry[@j] and @entry[@j] !~ /^\s{5}[53'A-Za-z_-]|^[A-Z]/
       if @entry[@j] =~ /^\s{21}\/([^=]+)="([^"]+)/
         qual = $1
         val  = $2
@@ -189,7 +189,7 @@ class GenbankFeatures
         if want_qual? qual
           k = @j + 1
 
-          while @entry[k] and @entry[k] !~ /^(\s{21}\/|\s{5}[A-Za-z_-]|[A-Z])/
+          while @entry[k] and @entry[k] !~ /^(\s{21}\/|\s{5}[53'A-Za-z_-]|[A-Z])/
             val << @entry[k].lstrip.chomp('"')
             k += 1
           end