X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=code_ruby%2Flib%2Fmaasha%2Fgenbank.rb;h=795de75652f1d84f7ec6fd91531e07fc929741b1;hb=7029104c208f9013c0e8804737cc4f5da8bf7524;hp=b1c9f8734a7a7f6dac1df4c7a18a3d59a62e2af1;hpb=58b9ddc3ddfcbe0c4476f36b12cc6cb0dbe88b41;p=biopieces.git diff --git a/code_ruby/lib/maasha/genbank.rb b/code_ruby/lib/maasha/genbank.rb index b1c9f87..795de75 100644 --- a/code_ruby/lib/maasha/genbank.rb +++ b/code_ruby/lib/maasha/genbank.rb @@ -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