[BioRuby-cvs] bioruby/lib/bio alignment.rb,1.13,1.14
Naohisa Goto
ngoto at pub.open-bio.org
Fri Dec 2 07:01:30 EST 2005
Update of /home/repository/bioruby/bioruby/lib/bio
In directory pub.open-bio.org:/tmp/cvs-serv25760/lib/bio
Modified Files:
alignment.rb
Log Message:
fixed bugs in EnumerableExtension#alignment_rstrip! and #remove_all_gaps!.
Index: alignment.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** alignment.rb 2 Dec 2005 07:01:37 -0000 1.13
--- alignment.rb 2 Dec 2005 12:01:28 -0000 1.14
***************
*** 735,739 ****
each_site_step(len - 1, 0, -1) do |a|
a.remove_gaps!
! if a.empty then
newlen -= 1
else
--- 735,739 ----
each_site_step(len - 1, 0, -1) do |a|
a.remove_gaps!
! if a.empty? then
newlen -= 1
else
***************
*** 743,747 ****
return nil if newlen >= len
each_seq do |s|
! s[len..-1] = '' if s.length > len
end
self
--- 743,747 ----
return nil if newlen >= len
each_seq do |s|
! s[newlen..-1] = '' if s.length > newlen
end
self
***************
*** 792,796 ****
ret = nil
each_seq do |s|
! ret ||= s.gsub!(gap_regexp, '')
end
ret ? self : nil
--- 792,797 ----
ret = nil
each_seq do |s|
! x = s.gsub!(gap_regexp, '')
! ret ||= x
end
ret ? self : nil
More information about the bioruby-cvs
mailing list