From df8a979e4a0fbbf6170b6c30f4693f2cb99d715e Mon Sep 17 00:00:00 2001 From: martinahansen Date: Thu, 9 Dec 2010 15:55:12 +0000 Subject: [PATCH] fixed another locator bug in genbank.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1179 74ccb610-7750-0410-82ae-013aeee3265d --- code_ruby/Maasha/lib/genbank.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code_ruby/Maasha/lib/genbank.rb b/code_ruby/Maasha/lib/genbank.rb index b696774..caf1f45 100644 --- a/code_ruby/Maasha/lib/genbank.rb +++ b/code_ruby/Maasha/lib/genbank.rb @@ -362,9 +362,12 @@ class Locator pos = $1.to_i - 1 newseq = Seq.new(nil, @seq.seq[pos], "dna") - newseq.revcomp if comp - @subseq.seq << (order ? " " + newseq.seq : newseq.seq) + unless newseq.seq.nil? + newseq.revcomp if comp + + @subseq.seq << (order ? " " + newseq.seq : newseq.seq) + end else $stderr.puts "WARNING: Could not match locator -> #{locator}"; @subseq.seq << "" -- 2.39.5