git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
in progress...
[jalview.git]
/
forester
/
ruby
/
evoruby
/
lib
/
evo
/
io
/
parser
/
fasta_parser.rb
diff --git
a/forester/ruby/evoruby/lib/evo/io/parser/fasta_parser.rb
b/forester/ruby/evoruby/lib/evo/io/parser/fasta_parser.rb
index
94c2193
..
f1da2a9
100644
(file)
--- a/
forester/ruby/evoruby/lib/evo/io/parser/fasta_parser.rb
+++ b/
forester/ruby/evoruby/lib/evo/io/parser/fasta_parser.rb
@@
-1,16
+1,14
@@
#
# = lib/evo/io/parser/fasta_parser - FastaParser class
#
#
# = lib/evo/io/parser/fasta_parser - FastaParser class
#
-# Copyright:: Copyright (C) 20017 Christian M. Zmasek
-# License:: GNU Lesser General Public License (LGPL)
+# Copyright:: Copyright (C) 2017 Christian M. Zmasek
+# License:: GNU Lesser General Public License (LGPL)
#
#
-# last modified: 05/17/2007
+# Last modified: 2017/02/07
require 'lib/evo/io/parser/msa_parser'
require 'lib/evo/msa/msa'
require 'lib/evo/io/parser/msa_parser'
require 'lib/evo/msa/msa'
-#require 'iconv'
-
module Evoruby
class FastaParser < MsaParser
module Evoruby
class FastaParser < MsaParser
@@
-24,10
+22,10
@@
module Evoruby
current_seq = String.new()
name = String.new()
saw_first_seq = false
current_seq = String.new()
name = String.new()
saw_first_seq = false
- ic = Iconv.new( 'UTF-8//IGNORE', 'UTF-8' )
File.open( path ) do | file |
while line = file.gets
File.open( path ) do | file |
while line = file.gets
- line = ic.iconv( line )
+
+ line.encode!("UTF-8", :invalid => :replace, :undef => :replace, :replace => "?")
if can_ignore?( line, saw_first_seq )
elsif line =~ /^\s*>\s*(.+)/
if can_ignore?( line, saw_first_seq )
elsif line =~ /^\s*>\s*(.+)/