diff --git a/lib/bio-assembly/ace.rb b/lib/bio-assembly/ace.rb index bcfb8c9..de10ae8 100644 --- a/lib/bio-assembly/ace.rb +++ b/lib/bio-assembly/ace.rb @@ -28,8 +28,9 @@ def to_ace end private + def parse_contig(attrs) - contig = Bio::Assembly::Contig.new + contig = Contig.new contig.name, base_num, @num_reads, base_segments_num, contig.orientation = attrs.split(" ") # keep track of the number of RD identifiers parsed @num_rds_parsed = 0 @@ -76,7 +77,7 @@ def parse_bq(contig) # parse read meta data def parse_af(contig, attrs) - read = Bio::Assembly::Read.new + read = Read.new read.name , read.orientation, read.from = attrs.split(" ") contig.add_read read end @@ -132,11 +133,9 @@ def parse_wa(contig, attrs) # parse run meta data - ignored def parse_ct(contig, attrs) end - - end # => end class Ace - # open contig class and write ace specific methods for contig objects - class Contig + # extend contig class and write ace specific methods for contig objects + class Contig < Bio::Assembly::Contig def to_ace ace = "" @@ -169,10 +168,10 @@ def to_ace ace end - end # => end Contig class + end # => end Contig class - # open Read class to add ace specific methods for read objects - class Read + # extend Read class to add ace specific methods for read objects + class Read < Bio::Assembly::Read attr_accessor :base_sequences @@ -231,7 +230,7 @@ def initialize(from, to, read_name) end def <=>(other) - unless other.kind_of?(Bio::Assembly::Read::BaseSequence) + unless other.kind_of?(Bio::Assembly::AceRead::BaseSequence) raise "[Error] markers are not comparable" end if self.from == other.from @@ -244,8 +243,8 @@ def <=>(other) end # => end BaseSequence Class - end # => end Read Class - + end # => end Read Class + end # => end class Ace end # => end class Assembly end # => end module Bio \ No newline at end of file